@upbound/monarch-blocks 0.7.3 → 0.8.1
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/code-block.d.ts +4 -2
- package/dist/code-block.js +237 -40
- package/dist/code-block.js.map +1 -1
- package/dist/data-table.d.ts +24 -6
- package/dist/data-table.js +45 -27
- package/dist/data-table.js.map +1 -1
- package/dist/{empty-view-DO36LNvk.d.ts → empty-view-CQtcr_Ew.d.ts} +1 -2
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +22 -7
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +300 -97
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -167,13 +167,12 @@ type DataTableEmptyView = {
|
|
|
167
167
|
error?: DataTableEmptyConfig;
|
|
168
168
|
filter?: DataTableEmptyConfig;
|
|
169
169
|
};
|
|
170
|
-
declare function DataTableEmptyView({ emptyView, tableState, filterCount, resetFilters,
|
|
170
|
+
declare function DataTableEmptyView({ emptyView, tableState, filterCount, resetFilters, }: {
|
|
171
171
|
emptyView?: DataTableEmptyView;
|
|
172
172
|
/** `'success'`/`'loading'` render nothing here — the table body handles those. */
|
|
173
173
|
tableState: TableDataState;
|
|
174
174
|
filterCount: number;
|
|
175
175
|
resetFilters: () => void;
|
|
176
|
-
className?: string;
|
|
177
176
|
}): React.JSX.Element;
|
|
178
177
|
|
|
179
178
|
export { type DataTableEmptyConfig as D, type TableDataState as T, DataTableEmptyView as a, defaultErrorConfig as b, defaultNoFilterFoundConfig as c, defaultEmptyConfig as d };
|
package/dist/graph.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Node, NodeProps, Edge, EdgeProps, NodeTypes, EdgeTypes } from 'reactflo
|
|
|
2
2
|
export { Edge, Node } from 'reactflow';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ColumnDef, ColumnFiltersState } from '@tanstack/react-table';
|
|
5
|
-
import { D as DataTableEmptyConfig, T as TableDataState } from './empty-view-
|
|
5
|
+
import { D as DataTableEmptyConfig, T as TableDataState } from './empty-view-CQtcr_Ew.js';
|
|
6
6
|
import '@upbound/monarch-core';
|
|
7
7
|
|
|
8
8
|
type GraphBadgeVariant = 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' | 'healthy' | 'unhealthy' | 'warning' | 'stale' | 'info' | 'unknown';
|
package/dist/graph.js
CHANGED
|
@@ -489,6 +489,21 @@ function getTableState({
|
|
|
489
489
|
return rowCount === 0 ? "empty" : "success";
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
+
// src/lib/search-input.ts
|
|
493
|
+
var SEARCH_INPUT_PROPS = {
|
|
494
|
+
type: "search",
|
|
495
|
+
autoComplete: "off",
|
|
496
|
+
"data-1p-ignore": true,
|
|
497
|
+
// 1Password
|
|
498
|
+
"data-lpignore": "true",
|
|
499
|
+
// LastPass
|
|
500
|
+
"data-bwignore": true,
|
|
501
|
+
// Bitwarden
|
|
502
|
+
"data-form-type": "other"
|
|
503
|
+
// Dashlane
|
|
504
|
+
};
|
|
505
|
+
var SEARCH_INPUT_CLASS = "[&::-webkit-search-cancel-button]:appearance-none";
|
|
506
|
+
|
|
492
507
|
// src/data-table/empty-view.tsx
|
|
493
508
|
import { Alert, AlertDescription } from "@upbound/monarch-core";
|
|
494
509
|
import { Button } from "@upbound/monarch-core";
|
|
@@ -515,8 +530,7 @@ function DataTableEmptyView({
|
|
|
515
530
|
emptyView,
|
|
516
531
|
tableState,
|
|
517
532
|
filterCount,
|
|
518
|
-
resetFilters
|
|
519
|
-
className
|
|
533
|
+
resetFilters
|
|
520
534
|
}) {
|
|
521
535
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
522
536
|
const isFilteredEmpty = tableState === "empty" && filterCount > 0;
|
|
@@ -526,9 +540,7 @@ function DataTableEmptyView({
|
|
|
526
540
|
/* @__PURE__ */ jsx4(Icon2, { name: "xmark" }),
|
|
527
541
|
"Clear filters"
|
|
528
542
|
] }) : null;
|
|
529
|
-
return /* @__PURE__ */ jsx4("div", { className: cn("flex size-full flex-col justify-center
|
|
530
|
-
// padding, matching the source's forced `pt-0` on that branch.
|
|
531
|
-
/* @__PURE__ */ jsxs3(Empty, { className: tableState === "error" ? "pt-0" : config.className, children: [
|
|
543
|
+
return /* @__PURE__ */ jsx4("div", { className: cn("flex size-full flex-col justify-center", wrapperClassName), children: config && /* @__PURE__ */ jsxs3(Empty, { className: cn("border border-dashed", config.className), children: [
|
|
532
544
|
/* @__PURE__ */ jsxs3(EmptyHeader, { children: [
|
|
533
545
|
config.icon && /* @__PURE__ */ jsx4(EmptyMedia, { children: /* @__PURE__ */ jsx4(IconTile, { variant: "branded", children: /* @__PURE__ */ jsx4(Icon2, { name: config.icon }) }) }),
|
|
534
546
|
config.header && /* @__PURE__ */ jsx4(EmptyTitle, { children: config.header }),
|
|
@@ -1561,6 +1573,7 @@ function Graph({
|
|
|
1561
1573
|
}) {
|
|
1562
1574
|
var _a, _b, _c;
|
|
1563
1575
|
const graphRef = React7.useRef(null);
|
|
1576
|
+
const searchInputId = `graph-search-${React7.useId()}`;
|
|
1564
1577
|
const [innerGlobalFilter, setInnerGlobalFilter] = React7.useState("");
|
|
1565
1578
|
const [innerColumnFilters, setInnerColumnFilters] = React7.useState([]);
|
|
1566
1579
|
const globalFilter = parentGlobalFilter != null ? parentGlobalFilter : innerGlobalFilter;
|
|
@@ -1630,13 +1643,15 @@ function Graph({
|
|
|
1630
1643
|
/* @__PURE__ */ jsx9(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsx9(Icon4, { name: "magnifying-glass" }) }),
|
|
1631
1644
|
/* @__PURE__ */ jsx9(
|
|
1632
1645
|
InputGroupInput,
|
|
1633
|
-
{
|
|
1646
|
+
__spreadProps(__spreadValues({}, SEARCH_INPUT_PROPS), {
|
|
1647
|
+
id: searchInputId,
|
|
1648
|
+
className: SEARCH_INPUT_CLASS,
|
|
1634
1649
|
"aria-label": "Search",
|
|
1635
1650
|
placeholder: "Search\u2026",
|
|
1636
1651
|
disabled: shouldDisable,
|
|
1637
1652
|
value: globalFilter,
|
|
1638
1653
|
onChange: (e) => setGlobalFilter(e.target.value)
|
|
1639
|
-
}
|
|
1654
|
+
})
|
|
1640
1655
|
)
|
|
1641
1656
|
] }),
|
|
1642
1657
|
!!Actions && /* @__PURE__ */ jsx9("div", { className: "ml-auto flex items-center gap-2", children: /* @__PURE__ */ jsx9(Actions, { state: graphState }) })
|