@drawbridge/components 0.1.31 → 0.1.33
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/bridge/template-modal.js +2 -1
- package/dist/bridge/template-modal.mjs +2 -1
- package/dist/dashboard/buttons-subscription.js +65 -20
- package/dist/dashboard/buttons-subscription.mjs +64 -20
- package/dist/dashboard/card-payment-method.js +1 -1
- package/dist/dashboard/card-payment-method.mjs +1 -1
- package/dist/dashboard/card-section.js +2 -2
- package/dist/dashboard/card-section.mjs +2 -2
- package/dist/dashboard/card-setting.js +4 -3
- package/dist/dashboard/card-setting.mjs +4 -3
- package/dist/dashboard/card-task.js +22 -4
- package/dist/dashboard/card-task.mjs +22 -4
- package/dist/dashboard/card-tile.js +6 -6
- package/dist/dashboard/card-tile.mjs +6 -6
- package/dist/dashboard/drawer.js +7 -2
- package/dist/dashboard/drawer.mjs +8 -3
- package/dist/dashboard/form-organization-workflow.js +87 -65
- package/dist/dashboard/form-organization-workflow.mjs +87 -65
- package/dist/dashboard/input-combobox.js +7 -2
- package/dist/dashboard/input-combobox.mjs +7 -2
- package/dist/dashboard/lib/escape.js +48 -0
- package/dist/dashboard/lib/escape.mjs +25 -0
- package/dist/dashboard/lib/rail.js +75 -0
- package/dist/dashboard/lib/rail.mjs +46 -0
- package/dist/dashboard/lib/throttle.js +57 -0
- package/dist/dashboard/lib/throttle.mjs +34 -0
- package/dist/dashboard/list.js +1 -1
- package/dist/dashboard/list.mjs +1 -1
- package/dist/dashboard/menu.js +188 -96
- package/dist/dashboard/menu.mjs +189 -97
- package/dist/dashboard/modal.js +9 -3
- package/dist/dashboard/modal.mjs +10 -4
- package/dist/dashboard/notice.js +5 -3
- package/dist/dashboard/notice.mjs +5 -3
- package/dist/dashboard/table-cell-title.js +2 -0
- package/dist/dashboard/table-cell-title.mjs +2 -0
- package/dist/dashboard/table.js +61 -20
- package/dist/dashboard/table.mjs +61 -20
- package/dist/dashboard/template-dashboard.js +35 -133
- package/dist/dashboard/template-dashboard.mjs +36 -134
- package/dist/dashboard/template-rail.js +674 -0
- package/dist/dashboard/template-rail.mjs +640 -0
- package/dist/dashboard/template-socket.js +19 -3
- package/dist/dashboard/template-socket.mjs +19 -3
- package/dist/dashboard/template-ui.js +150 -186
- package/dist/dashboard/template-ui.mjs +151 -187
- package/dist/icons/book-open.js +46 -0
- package/dist/icons/book-open.mjs +27 -0
- package/dist/icons/task.js +46 -0
- package/dist/icons/task.mjs +27 -0
- package/dist/shared/lib/helpers.js +9 -2
- package/dist/shared/lib/helpers.mjs +9 -2
- package/dist/shared/lib/motion.js +27 -0
- package/dist/shared/lib/motion.mjs +4 -0
- package/dist/shared/overlay.js +5 -3
- package/dist/shared/overlay.mjs +5 -3
- package/package.json +28 -13
- package/types/dashboard/card-task.d.ts +5 -1
- package/types/dashboard/lib/rail.d.ts +32 -0
- package/types/dashboard/lib/throttle.d.ts +5 -0
- package/types/dashboard/table.d.ts +3 -1
- package/types/dashboard/template-dashboard.d.ts +4 -1
- package/types/dashboard/template-rail.d.ts +36 -0
- package/types/dashboard/template-ui.d.ts +2 -2
- package/types/icons/book-open.d.ts +5 -0
- package/types/icons/task.d.ts +5 -0
- package/dist/dashboard/guide.js +0 -238
- package/dist/dashboard/guide.mjs +0 -209
- package/types/dashboard/guide.d.ts +0 -23
package/dist/dashboard/table.mjs
CHANGED
|
@@ -20,6 +20,7 @@ import FormAction from "./form-action.mjs";
|
|
|
20
20
|
import Warning from "../icons/warning.mjs";
|
|
21
21
|
import Tooltip from "../shared/tooltip.mjs";
|
|
22
22
|
import { useWrapperGradient } from "../wrapper-gradient.mjs";
|
|
23
|
+
const CELL_PADDING = "px-4 @max-[1279px]:px-1.5";
|
|
23
24
|
const STICKY_ACTIONS_FADE_BASE = "before:content-[''] before:absolute before:right-full before:top-0 before:bottom-0 before:w-8 before:bg-gradient-to-l before:from-30% before:to-transparent before:pointer-events-none";
|
|
24
25
|
const STICKY_ACTIONS_FADE_BODY = STICKY_ACTIONS_FADE_BASE + " before:from-white";
|
|
25
26
|
const STICKY_ACTIONS_FADE_HEADER = STICKY_ACTIONS_FADE_BASE + " before:from-gray-light";
|
|
@@ -83,7 +84,7 @@ const TableContainer = ({
|
|
|
83
84
|
);
|
|
84
85
|
};
|
|
85
86
|
const TableHeader = ({
|
|
86
|
-
classNameHeader =
|
|
87
|
+
classNameHeader = CELL_PADDING,
|
|
87
88
|
classNameRow,
|
|
88
89
|
headers,
|
|
89
90
|
headerGroups
|
|
@@ -223,7 +224,7 @@ const TableCell = ({
|
|
|
223
224
|
// alignment (e.g. text-right) pass their own full className — the
|
|
224
225
|
// default is replaced rather than merged, so there's no source-order
|
|
225
226
|
// collision on `text-align`.
|
|
226
|
-
className = "
|
|
227
|
+
className = CELL_PADDING + " text-left",
|
|
227
228
|
truncate = true,
|
|
228
229
|
...rest
|
|
229
230
|
}) => {
|
|
@@ -241,6 +242,28 @@ const TableCell = ({
|
|
|
241
242
|
}
|
|
242
243
|
);
|
|
243
244
|
};
|
|
245
|
+
const TableCellShrink = ({
|
|
246
|
+
children,
|
|
247
|
+
first,
|
|
248
|
+
truncate
|
|
249
|
+
}) => /* @__PURE__ */ jsx(
|
|
250
|
+
"div",
|
|
251
|
+
{
|
|
252
|
+
...{
|
|
253
|
+
className: "grid grid-cols-[minmax(0,max-content)] " + (first ? "min-w-30" : "min-w-16")
|
|
254
|
+
},
|
|
255
|
+
children: /* @__PURE__ */ jsx(
|
|
256
|
+
"div",
|
|
257
|
+
{
|
|
258
|
+
...{
|
|
259
|
+
// A table that wraps its text ( truncate false ) wraps here too.
|
|
260
|
+
className: truncate ? "min-w-0 truncate" : "min-w-0"
|
|
261
|
+
},
|
|
262
|
+
children
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
);
|
|
244
267
|
const TableBody = ({
|
|
245
268
|
children
|
|
246
269
|
}) => {
|
|
@@ -348,19 +371,25 @@ const TableActionsCell = ({
|
|
|
348
371
|
children: buttonConfig.text
|
|
349
372
|
}
|
|
350
373
|
);
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
{
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
374
|
+
const shown = buttonConfig.tooltip ? /* @__PURE__ */ jsx(
|
|
375
|
+
Tooltip,
|
|
376
|
+
{
|
|
377
|
+
...{
|
|
378
|
+
content: buttonConfig.tooltip
|
|
379
|
+
},
|
|
380
|
+
children: buttonEl
|
|
381
|
+
}
|
|
382
|
+
) : buttonEl;
|
|
383
|
+
if (controls.length > 0) return /* @__PURE__ */ jsx(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
...{
|
|
387
|
+
className: "flex justify-end min-w-24"
|
|
388
|
+
},
|
|
389
|
+
children: shown
|
|
390
|
+
}
|
|
391
|
+
);
|
|
392
|
+
return shown;
|
|
364
393
|
})()
|
|
365
394
|
]
|
|
366
395
|
}
|
|
@@ -621,6 +650,9 @@ const TableRowProcessing = ({
|
|
|
621
650
|
);
|
|
622
651
|
};
|
|
623
652
|
const Table = ({
|
|
653
|
+
// false: the actions scroll with the row. For a list too wide for any laptop,
|
|
654
|
+
// whose last columns would otherwise sit under them.
|
|
655
|
+
fixedActions = true,
|
|
624
656
|
actions,
|
|
625
657
|
className,
|
|
626
658
|
classNameColumn,
|
|
@@ -652,7 +684,7 @@ const Table = ({
|
|
|
652
684
|
header: "",
|
|
653
685
|
enableSorting: false,
|
|
654
686
|
meta: {
|
|
655
|
-
className: "sticky right-0 z-10",
|
|
687
|
+
className: fixedActions ? "sticky right-0 z-10" : "z-10",
|
|
656
688
|
classNameHeader: "bg-gray-light",
|
|
657
689
|
classNameCell: "bg-white"
|
|
658
690
|
},
|
|
@@ -667,7 +699,7 @@ const Table = ({
|
|
|
667
699
|
}
|
|
668
700
|
];
|
|
669
701
|
},
|
|
670
|
-
[actions, columns]
|
|
702
|
+
[actions, columns, fixedActions]
|
|
671
703
|
);
|
|
672
704
|
const table = useReactTable({
|
|
673
705
|
columns: tableColumns,
|
|
@@ -708,9 +740,18 @@ const Table = ({
|
|
|
708
740
|
row.id
|
|
709
741
|
);
|
|
710
742
|
}
|
|
711
|
-
return /* @__PURE__ */ jsx(TableRow, { className: classNameRow, children: row.getVisibleCells().map((cell) => {
|
|
712
|
-
var _a2, _b;
|
|
713
|
-
return /* @__PURE__ */ jsx(TableCell, { truncate, className: [(_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.className, (_b = cell.column.columnDef.meta) == null ? void 0 : _b.classNameCell, classNameColumn].filter(Boolean).join(" ") || void 0, children:
|
|
743
|
+
return /* @__PURE__ */ jsx(TableRow, { className: classNameRow, children: row.getVisibleCells().map((cell, index) => {
|
|
744
|
+
var _a2, _b, _c;
|
|
745
|
+
return /* @__PURE__ */ jsx(TableCell, { truncate, className: [(_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.className, (_b = cell.column.columnDef.meta) == null ? void 0 : _b.classNameCell, classNameColumn].filter(Boolean).join(" ") || void 0, children: index === 0 || ((_c = cell.column.columnDef.meta) == null ? void 0 : _c.shrink) ? /* @__PURE__ */ jsx(
|
|
746
|
+
TableCellShrink,
|
|
747
|
+
{
|
|
748
|
+
...{
|
|
749
|
+
first: index === 0,
|
|
750
|
+
truncate
|
|
751
|
+
},
|
|
752
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
753
|
+
}
|
|
754
|
+
) : flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
714
755
|
}) }, row.id);
|
|
715
756
|
}) })
|
|
716
757
|
] });
|
|
@@ -39,16 +39,16 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
39
39
|
var import_react = require("react");
|
|
40
40
|
var import_react_query = require("@tanstack/react-query");
|
|
41
41
|
var import_navigation = require("next/navigation");
|
|
42
|
-
var import_hooks = require("./lib/hooks");
|
|
43
42
|
var import_icon_labels = require("../shared/lib/icon-labels");
|
|
44
43
|
var import_provider_resource = __toESM(require("./provider-resource"));
|
|
44
|
+
var import_rail = require("./lib/rail");
|
|
45
|
+
var import_template_rail = require("./template-rail");
|
|
45
46
|
var import_arrow_right = __toESM(require("../icons/arrow-right"));
|
|
46
47
|
var import_loader = __toESM(require("../icons/loader"));
|
|
47
48
|
var import_refresh = __toESM(require("../icons/refresh"));
|
|
48
49
|
var import_empty = __toESM(require("../shared/empty"));
|
|
49
50
|
var import_badge = __toESM(require("../shared/badge"));
|
|
50
51
|
var import_button = __toESM(require("../shared/button"));
|
|
51
|
-
var import_list = __toESM(require("./list"));
|
|
52
52
|
var import_link_back = __toESM(require("./link-back"));
|
|
53
53
|
var import_wrapper_gradient = __toESM(require("../wrapper-gradient"));
|
|
54
54
|
var import_image = __toESM(require("next/image"));
|
|
@@ -377,143 +377,45 @@ const TemplateDashboardError = ({
|
|
|
377
377
|
const TemplateDashboardTasks = ({
|
|
378
378
|
items = []
|
|
379
379
|
}) => {
|
|
380
|
-
const
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
396
|
-
|
|
380
|
+
const { set } = (0, import_template_rail.useRail)();
|
|
381
|
+
const first = (0, import_rail.railFirst)(items);
|
|
382
|
+
if (!first) return null;
|
|
383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
...{
|
|
387
|
+
className: "px-6 md:px-12"
|
|
388
|
+
},
|
|
389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
390
|
+
"div",
|
|
391
|
+
{
|
|
392
|
+
...{
|
|
393
|
+
className: "bg-white border border-gray rounded px-4 py-3"
|
|
394
|
+
},
|
|
395
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
396
|
+
import_button.default,
|
|
397
397
|
{
|
|
398
398
|
...{
|
|
399
|
-
|
|
399
|
+
icon: import_arrow_right.default,
|
|
400
|
+
justify: "between",
|
|
401
|
+
onClick: () => set("next"),
|
|
402
|
+
variant: "link"
|
|
400
403
|
},
|
|
401
|
-
children:
|
|
402
|
-
|
|
403
|
-
)
|
|
404
|
-
]
|
|
405
|
-
}
|
|
406
|
-
),
|
|
407
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
408
|
-
"div",
|
|
409
|
-
{
|
|
410
|
-
...{
|
|
411
|
-
className: "p-6"
|
|
412
|
-
},
|
|
413
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
414
|
-
import_list.default,
|
|
415
|
-
{
|
|
416
|
-
...{
|
|
417
|
-
items: [
|
|
404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
405
|
+
"span",
|
|
418
406
|
{
|
|
419
|
-
...
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}))
|
|
426
|
-
]
|
|
407
|
+
...{
|
|
408
|
+
className: "flex-1 min-w-0 text-left whitespace-normal hover:underline"
|
|
409
|
+
},
|
|
410
|
+
children: first.title
|
|
411
|
+
}
|
|
412
|
+
)
|
|
427
413
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
});
|
|
433
|
-
const shown = (0, import_react.useRef)(null);
|
|
434
|
-
const openAll = () => {
|
|
435
|
-
const props = nextSteps();
|
|
436
|
-
shown.current = props.children;
|
|
437
|
-
open(props);
|
|
438
|
-
};
|
|
439
|
-
(0, import_react.useEffect)(
|
|
440
|
-
() => {
|
|
441
|
-
const drawer = queryClient.getQueryData(["drawer"]);
|
|
442
|
-
if (!shown.current || !(drawer == null ? void 0 : drawer.active) || drawer.children !== shown.current) return;
|
|
443
|
-
if (!first) {
|
|
444
|
-
shown.current = null;
|
|
445
|
-
close();
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
openAll();
|
|
449
|
-
},
|
|
450
|
-
// The tasks are the trigger; the rest follows them.
|
|
451
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
452
|
-
[items]
|
|
414
|
+
)
|
|
415
|
+
}
|
|
416
|
+
)
|
|
417
|
+
}
|
|
453
418
|
);
|
|
454
|
-
if (first) {
|
|
455
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
456
|
-
"div",
|
|
457
|
-
{
|
|
458
|
-
...{
|
|
459
|
-
className: "px-6 md:px-12"
|
|
460
|
-
},
|
|
461
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
462
|
-
"div",
|
|
463
|
-
{
|
|
464
|
-
...{
|
|
465
|
-
className: "bg-white border border-gray rounded px-4 py-3"
|
|
466
|
-
},
|
|
467
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
468
|
-
"div",
|
|
469
|
-
{
|
|
470
|
-
...{
|
|
471
|
-
className: "flex items-center justify-between space-x-6"
|
|
472
|
-
},
|
|
473
|
-
children: [
|
|
474
|
-
first && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
475
|
-
import_list.default,
|
|
476
|
-
{
|
|
477
|
-
...{
|
|
478
|
-
items: [
|
|
479
|
-
{
|
|
480
|
-
...first,
|
|
481
|
-
onClick: () => close()
|
|
482
|
-
}
|
|
483
|
-
],
|
|
484
|
-
svg: false
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
),
|
|
488
|
-
(array == null ? void 0 : array.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
489
|
-
import_button.default,
|
|
490
|
-
{
|
|
491
|
-
...{
|
|
492
|
-
icon: import_arrow_right.default,
|
|
493
|
-
inline: true,
|
|
494
|
-
onClick: openAll,
|
|
495
|
-
variant: "link"
|
|
496
|
-
},
|
|
497
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
498
|
-
import_badge.default,
|
|
499
|
-
{
|
|
500
|
-
...{
|
|
501
|
-
type: "warning"
|
|
502
|
-
},
|
|
503
|
-
children: array.length + 1
|
|
504
|
-
}
|
|
505
|
-
)
|
|
506
|
-
}
|
|
507
|
-
)
|
|
508
|
-
]
|
|
509
|
-
}
|
|
510
|
-
)
|
|
511
|
-
}
|
|
512
|
-
)
|
|
513
|
-
}
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
|
-
return null;
|
|
517
419
|
};
|
|
518
420
|
const SETTLE_QUIET = 50;
|
|
519
421
|
const SETTLE_CAP = 3e3;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { isValidElement, useEffect,
|
|
2
|
+
import { isValidElement, useEffect, useState } from "react";
|
|
3
3
|
import { keepPreviousData, useIsFetching, useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import { notFound } from "next/navigation";
|
|
5
|
-
import { useDrawer } from "./lib/hooks.mjs";
|
|
6
5
|
import { iconLabel } from "../shared/lib/icon-labels.mjs";
|
|
7
6
|
import ProviderResource from "./provider-resource.mjs";
|
|
7
|
+
import { railFirst } from "./lib/rail.mjs";
|
|
8
|
+
import { useRail } from "./template-rail.mjs";
|
|
8
9
|
import ArrowRight from "../icons/arrow-right.mjs";
|
|
9
10
|
import LoaderIcon from "../icons/loader.mjs";
|
|
10
11
|
import Refresh from "../icons/refresh.mjs";
|
|
11
12
|
import Empty from "../shared/empty.mjs";
|
|
12
13
|
import Badge from "../shared/badge.mjs";
|
|
13
14
|
import Button from "../shared/button.mjs";
|
|
14
|
-
import List from "./list.mjs";
|
|
15
15
|
import LinkBack from "./link-back.mjs";
|
|
16
16
|
import WrapperGradient from "../wrapper-gradient.mjs";
|
|
17
17
|
import Image from "next/image";
|
|
@@ -340,143 +340,45 @@ const TemplateDashboardError = ({
|
|
|
340
340
|
const TemplateDashboardTasks = ({
|
|
341
341
|
items = []
|
|
342
342
|
}) => {
|
|
343
|
-
const
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
/* @__PURE__ */ jsx(
|
|
359
|
-
|
|
343
|
+
const { set } = useRail();
|
|
344
|
+
const first = railFirst(items);
|
|
345
|
+
if (!first) return null;
|
|
346
|
+
return /* @__PURE__ */ jsx(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
...{
|
|
350
|
+
className: "px-6 md:px-12"
|
|
351
|
+
},
|
|
352
|
+
children: /* @__PURE__ */ jsx(
|
|
353
|
+
"div",
|
|
354
|
+
{
|
|
355
|
+
...{
|
|
356
|
+
className: "bg-white border border-gray rounded px-4 py-3"
|
|
357
|
+
},
|
|
358
|
+
children: /* @__PURE__ */ jsx(
|
|
359
|
+
Button,
|
|
360
360
|
{
|
|
361
361
|
...{
|
|
362
|
-
|
|
362
|
+
icon: ArrowRight,
|
|
363
|
+
justify: "between",
|
|
364
|
+
onClick: () => set("next"),
|
|
365
|
+
variant: "link"
|
|
363
366
|
},
|
|
364
|
-
children:
|
|
365
|
-
|
|
366
|
-
)
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
),
|
|
370
|
-
children: /* @__PURE__ */ jsx(
|
|
371
|
-
"div",
|
|
372
|
-
{
|
|
373
|
-
...{
|
|
374
|
-
className: "p-6"
|
|
375
|
-
},
|
|
376
|
-
children: /* @__PURE__ */ jsx(
|
|
377
|
-
List,
|
|
378
|
-
{
|
|
379
|
-
...{
|
|
380
|
-
items: [
|
|
367
|
+
children: /* @__PURE__ */ jsx(
|
|
368
|
+
"span",
|
|
381
369
|
{
|
|
382
|
-
...
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}))
|
|
389
|
-
]
|
|
370
|
+
...{
|
|
371
|
+
className: "flex-1 min-w-0 text-left whitespace-normal hover:underline"
|
|
372
|
+
},
|
|
373
|
+
children: first.title
|
|
374
|
+
}
|
|
375
|
+
)
|
|
390
376
|
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
});
|
|
396
|
-
const shown = useRef(null);
|
|
397
|
-
const openAll = () => {
|
|
398
|
-
const props = nextSteps();
|
|
399
|
-
shown.current = props.children;
|
|
400
|
-
open(props);
|
|
401
|
-
};
|
|
402
|
-
useEffect(
|
|
403
|
-
() => {
|
|
404
|
-
const drawer = queryClient.getQueryData(["drawer"]);
|
|
405
|
-
if (!shown.current || !(drawer == null ? void 0 : drawer.active) || drawer.children !== shown.current) return;
|
|
406
|
-
if (!first) {
|
|
407
|
-
shown.current = null;
|
|
408
|
-
close();
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
openAll();
|
|
412
|
-
},
|
|
413
|
-
// The tasks are the trigger; the rest follows them.
|
|
414
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
415
|
-
[items]
|
|
377
|
+
)
|
|
378
|
+
}
|
|
379
|
+
)
|
|
380
|
+
}
|
|
416
381
|
);
|
|
417
|
-
if (first) {
|
|
418
|
-
return /* @__PURE__ */ jsx(
|
|
419
|
-
"div",
|
|
420
|
-
{
|
|
421
|
-
...{
|
|
422
|
-
className: "px-6 md:px-12"
|
|
423
|
-
},
|
|
424
|
-
children: /* @__PURE__ */ jsx(
|
|
425
|
-
"div",
|
|
426
|
-
{
|
|
427
|
-
...{
|
|
428
|
-
className: "bg-white border border-gray rounded px-4 py-3"
|
|
429
|
-
},
|
|
430
|
-
children: /* @__PURE__ */ jsxs(
|
|
431
|
-
"div",
|
|
432
|
-
{
|
|
433
|
-
...{
|
|
434
|
-
className: "flex items-center justify-between space-x-6"
|
|
435
|
-
},
|
|
436
|
-
children: [
|
|
437
|
-
first && /* @__PURE__ */ jsx(
|
|
438
|
-
List,
|
|
439
|
-
{
|
|
440
|
-
...{
|
|
441
|
-
items: [
|
|
442
|
-
{
|
|
443
|
-
...first,
|
|
444
|
-
onClick: () => close()
|
|
445
|
-
}
|
|
446
|
-
],
|
|
447
|
-
svg: false
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
),
|
|
451
|
-
(array == null ? void 0 : array.length) > 0 && /* @__PURE__ */ jsx(
|
|
452
|
-
Button,
|
|
453
|
-
{
|
|
454
|
-
...{
|
|
455
|
-
icon: ArrowRight,
|
|
456
|
-
inline: true,
|
|
457
|
-
onClick: openAll,
|
|
458
|
-
variant: "link"
|
|
459
|
-
},
|
|
460
|
-
children: /* @__PURE__ */ jsx(
|
|
461
|
-
Badge,
|
|
462
|
-
{
|
|
463
|
-
...{
|
|
464
|
-
type: "warning"
|
|
465
|
-
},
|
|
466
|
-
children: array.length + 1
|
|
467
|
-
}
|
|
468
|
-
)
|
|
469
|
-
}
|
|
470
|
-
)
|
|
471
|
-
]
|
|
472
|
-
}
|
|
473
|
-
)
|
|
474
|
-
}
|
|
475
|
-
)
|
|
476
|
-
}
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
return null;
|
|
480
382
|
};
|
|
481
383
|
const SETTLE_QUIET = 50;
|
|
482
384
|
const SETTLE_CAP = 3e3;
|