@omniviewdev/ui 0.1.0
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/LICENSE +661 -0
- package/dist/Button-Dmu1cikC.cjs +1 -0
- package/dist/Button-lr02bh_m.js +51 -0
- package/dist/CodeBlock-B1iQO7zU.js +73 -0
- package/dist/CodeBlock-CIyG0DbW.cjs +2 -0
- package/dist/CopyButton-CACe3RCF.cjs +1 -0
- package/dist/CopyButton-DPBgL0K8.js +77 -0
- package/dist/ErrorState-CexYrMpy.js +188 -0
- package/dist/ErrorState-CnIR-1xa.cjs +1 -0
- package/dist/HotkeyHint-6SOi-MaU.js +37 -0
- package/dist/HotkeyHint-DrTOTrIM.cjs +1 -0
- package/dist/Icon-CKdIOrjZ.cjs +1 -0
- package/dist/Icon-CuO9W7cA.js +27 -0
- package/dist/SearchInput-CFBBNdI2.cjs +1 -0
- package/dist/SearchInput-D3AsCI5H.js +41 -0
- package/dist/Select-CnRBSc5w.cjs +1 -0
- package/dist/Select-DTUF31OP.js +206 -0
- package/dist/Skeleton-BUYyXUiC.js +32 -0
- package/dist/Skeleton-CfdQWLQM.cjs +1 -0
- package/dist/StatusDot-CYyJxjJK.cjs +1 -0
- package/dist/StatusDot-CncykBAY.js +68 -0
- package/dist/StatusPill-C1NaiCzd.js +29 -0
- package/dist/StatusPill-C7yn7dSA.cjs +1 -0
- package/dist/TabPanel-CkUSl6Bt.cjs +1 -0
- package/dist/TabPanel-DLHbgKpl.js +124 -0
- package/dist/Text-By4P3in5.js +71 -0
- package/dist/Text-Mk6Uyg1w.cjs +1 -0
- package/dist/Tooltip-44-P5KfQ.cjs +1 -0
- package/dist/Tooltip-BEVuYuZ3.js +41 -0
- package/dist/_commonjsHelpers-CvWRHxnb.js +26 -0
- package/dist/_commonjsHelpers-D3HyQheV.cjs +1 -0
- package/dist/buttons/ActionMenu.d.ts +21 -0
- package/dist/buttons/Button.d.ts +31 -0
- package/dist/buttons/ButtonGroup.d.ts +18 -0
- package/dist/buttons/ConfirmButton.d.ts +10 -0
- package/dist/buttons/CopyButton.d.ts +11 -0
- package/dist/buttons/IconButton.d.ts +21 -0
- package/dist/buttons/SearchBar.d.ts +22 -0
- package/dist/buttons/ToggleButton.d.ts +18 -0
- package/dist/buttons/ToggleGroup.d.ts +23 -0
- package/dist/buttons/Toolbar.d.ts +15 -0
- package/dist/buttons/ToolbarGroup.d.ts +11 -0
- package/dist/buttons/index.d.ts +22 -0
- package/dist/buttons.cjs +1 -0
- package/dist/buttons.js +430 -0
- package/dist/cells/BadgesCell.d.ts +19 -0
- package/dist/cells/ChipCell.d.ts +16 -0
- package/dist/cells/SelectBoxHeader.d.ts +11 -0
- package/dist/cells/SelectBoxRow.d.ts +11 -0
- package/dist/cells/TextCell.d.ts +25 -0
- package/dist/cells/index.d.ts +5 -0
- package/dist/cells.cjs +1 -0
- package/dist/cells.js +284 -0
- package/dist/charts/BarChart.d.ts +15 -0
- package/dist/charts/ChartContainer.d.ts +12 -0
- package/dist/charts/ChartLegend.d.ts +11 -0
- package/dist/charts/GaugeCard.d.ts +18 -0
- package/dist/charts/MetricsPanel.d.ts +61 -0
- package/dist/charts/PieChart.d.ts +13 -0
- package/dist/charts/ScatterChart.d.ts +25 -0
- package/dist/charts/Sparkline.d.ts +16 -0
- package/dist/charts/StackedAreaChart.d.ts +18 -0
- package/dist/charts/TimeSeriesChart.d.ts +43 -0
- package/dist/charts/formatters.d.ts +17 -0
- package/dist/charts/index.d.ts +21 -0
- package/dist/charts/palette.d.ts +7 -0
- package/dist/charts/types.d.ts +67 -0
- package/dist/charts/useChartTheme.d.ts +13 -0
- package/dist/charts.cjs +1 -0
- package/dist/charts.js +967 -0
- package/dist/components/ActionCard.d.ts +22 -0
- package/dist/components/AspectRatio.d.ts +13 -0
- package/dist/components/Avatar.d.ts +19 -0
- package/dist/components/Badge.d.ts +22 -0
- package/dist/components/Card.d.ts +24 -0
- package/dist/components/Chip.d.ts +32 -0
- package/dist/components/ClipboardText.d.ts +14 -0
- package/dist/components/DetailsCard.d.ts +25 -0
- package/dist/components/EmptySearch.d.ts +12 -0
- package/dist/components/ExpandableSections.d.ts +51 -0
- package/dist/components/FileIcon.d.ts +12 -0
- package/dist/components/HotkeyHint.d.ts +8 -0
- package/dist/components/Icon.d.ts +7 -0
- package/dist/components/InlineEdit.d.ts +14 -0
- package/dist/components/KVCard.d.ts +12 -0
- package/dist/components/Kbd.d.ts +8 -0
- package/dist/components/List.d.ts +29 -0
- package/dist/components/ListCard.d.ts +30 -0
- package/dist/components/ListItem.d.ts +27 -0
- package/dist/components/LoadingOverlay.d.ts +14 -0
- package/dist/components/MediaCard.d.ts +24 -0
- package/dist/components/MetricsSection.d.ts +37 -0
- package/dist/components/OverflowText.d.ts +12 -0
- package/dist/components/StatCard.d.ts +26 -0
- package/dist/components/StatusCard.d.ts +29 -0
- package/dist/components/TruncatedList.d.ts +13 -0
- package/dist/domain/DescriptionList.d.ts +12 -0
- package/dist/domain/EventsList.d.ts +11 -0
- package/dist/domain/FilterBar.d.ts +23 -0
- package/dist/domain/LogsViewer.d.ts +15 -0
- package/dist/domain/MetricCard.d.ts +14 -0
- package/dist/domain/ObjectInspector.d.ts +19 -0
- package/dist/domain/ResourceBreadcrumb.d.ts +19 -0
- package/dist/domain/ResourceRef.d.ts +15 -0
- package/dist/domain/ResourceStatus.d.ts +17 -0
- package/dist/domain/SecretValueMask.d.ts +11 -0
- package/dist/domain/Timeline.d.ts +21 -0
- package/dist/domain/index.d.ts +23 -0
- package/dist/domain/types.d.ts +25 -0
- package/dist/domain.cjs +1 -0
- package/dist/domain.js +871 -0
- package/dist/editors/CodeEditor.d.ts +19 -0
- package/dist/editors/CommandPalette.d.ts +22 -0
- package/dist/editors/DiffViewer.d.ts +14 -0
- package/dist/editors/MarkdownPreview.d.ts +9 -0
- package/dist/editors/Terminal.d.ts +18 -0
- package/dist/editors/index.d.ts +11 -0
- package/dist/editors/themes.d.ts +4 -0
- package/dist/editors.cjs +42 -0
- package/dist/editors.js +38396 -0
- package/dist/feedback/Alert.d.ts +21 -0
- package/dist/feedback/ConnectionIndicator.d.ts +15 -0
- package/dist/feedback/EmptyState.d.ts +17 -0
- package/dist/feedback/ErrorState.d.ts +12 -0
- package/dist/feedback/IDEStatusFooter.d.ts +104 -0
- package/dist/feedback/NotificationStack.d.ts +32 -0
- package/dist/feedback/ProgressBar.d.ts +16 -0
- package/dist/feedback/ProgressRing.d.ts +26 -0
- package/dist/feedback/RunButton.d.ts +17 -0
- package/dist/feedback/Skeleton.d.ts +13 -0
- package/dist/feedback/StatusBar.d.ts +12 -0
- package/dist/feedback/StatusBarItem.d.ts +18 -0
- package/dist/feedback/StatusDot.d.ts +14 -0
- package/dist/feedback/StatusPill.d.ts +13 -0
- package/dist/feedback/index.d.ts +29 -0
- package/dist/feedback.cjs +1 -0
- package/dist/feedback.js +1011 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +1632 -0
- package/dist/inputs/Autocomplete.d.ts +30 -0
- package/dist/inputs/Checkbox.d.ts +17 -0
- package/dist/inputs/ColorPicker.d.ts +13 -0
- package/dist/inputs/DebouncedInput.d.ts +10 -0
- package/dist/inputs/FormField.d.ts +15 -0
- package/dist/inputs/FormSection.d.ts +14 -0
- package/dist/inputs/KeyValueEditor.d.ts +17 -0
- package/dist/inputs/RadioGroup.d.ts +23 -0
- package/dist/inputs/SearchInput.d.ts +14 -0
- package/dist/inputs/Select.d.ts +32 -0
- package/dist/inputs/Slider.d.ts +24 -0
- package/dist/inputs/Switch.d.ts +17 -0
- package/dist/inputs/TagInput.d.ts +18 -0
- package/dist/inputs/TextArea.d.ts +26 -0
- package/dist/inputs/TextField.d.ts +39 -0
- package/dist/inputs/TimeRangePicker.d.ts +21 -0
- package/dist/inputs/index.d.ts +31 -0
- package/dist/inputs.cjs +21 -0
- package/dist/inputs.js +15834 -0
- package/dist/layout/AppShell.d.ts +18 -0
- package/dist/layout/DockLayout.d.ts +23 -0
- package/dist/layout/Inline.d.ts +15 -0
- package/dist/layout/Panel.d.ts +17 -0
- package/dist/layout/ResizableSplitPane.d.ts +18 -0
- package/dist/layout/Spacer.d.ts +9 -0
- package/dist/layout/Stack.d.ts +19 -0
- package/dist/layout/index.d.ts +16 -0
- package/dist/layout/useResizablePanel.d.ts +18 -0
- package/dist/layout.cjs +5 -0
- package/dist/layout.js +378 -0
- package/dist/menus/ContextMenu.d.ts +12 -0
- package/dist/menus/DropdownMenu.d.ts +20 -0
- package/dist/menus/MenuBar.d.ts +11 -0
- package/dist/menus/NestedMenuItem.d.ts +13 -0
- package/dist/menus/SplitButton.d.ts +15 -0
- package/dist/menus/index.d.ts +11 -0
- package/dist/menus/types.d.ts +24 -0
- package/dist/menus.cjs +1 -0
- package/dist/menus.js +355 -0
- package/dist/navigation/Breadcrumbs.d.ts +18 -0
- package/dist/navigation/DraggableTabs.d.ts +24 -0
- package/dist/navigation/Pagination.d.ts +15 -0
- package/dist/navigation/PersistentTabPanel.d.ts +13 -0
- package/dist/navigation/Stepper.d.ts +19 -0
- package/dist/navigation/TabPanel.d.ts +11 -0
- package/dist/navigation/Tabs.d.ts +26 -0
- package/dist/navigation/TreeView.d.ts +27 -0
- package/dist/navigation/index.d.ts +16 -0
- package/dist/navigation.cjs +1 -0
- package/dist/navigation.js +429 -0
- package/dist/overlays/Dialog.d.ts +18 -0
- package/dist/overlays/Drawer.d.ts +17 -0
- package/dist/overlays/ErrorOverlay.d.ts +21 -0
- package/dist/overlays/Modal.d.ts +14 -0
- package/dist/overlays/NotificationCenter.d.ts +31 -0
- package/dist/overlays/Popover.d.ts +15 -0
- package/dist/overlays/Spotlight.d.ts +24 -0
- package/dist/overlays/ToastProvider.d.ts +32 -0
- package/dist/overlays/Tooltip.d.ts +15 -0
- package/dist/overlays/index.d.ts +20 -0
- package/dist/overlays/useToast.d.ts +21 -0
- package/dist/overlays.cjs +1 -0
- package/dist/overlays.js +865 -0
- package/dist/sidebars/ActivityBar.d.ts +16 -0
- package/dist/sidebars/NavMenu.d.ts +27 -0
- package/dist/sidebars/NavMenu.test.d.ts +1 -0
- package/dist/sidebars/PropertyGrid.d.ts +16 -0
- package/dist/sidebars/SidebarGroup.d.ts +15 -0
- package/dist/sidebars/SidebarPanel.d.ts +19 -0
- package/dist/sidebars/SidebarTreeItem.d.ts +21 -0
- package/dist/sidebars/index.d.ts +13 -0
- package/dist/sidebars/types.d.ts +29 -0
- package/dist/sidebars.cjs +1 -0
- package/dist/sidebars.js +762 -0
- package/dist/table/ColumnFilter.d.ts +10 -0
- package/dist/table/DataTable.d.ts +23 -0
- package/dist/table/IDETable.d.ts +48 -0
- package/dist/table/TableEmptyState.d.ts +12 -0
- package/dist/table/TableSkeleton.d.ts +11 -0
- package/dist/table/TableToolbar.d.ts +15 -0
- package/dist/table/index.d.ts +12 -0
- package/dist/table/types.d.ts +4 -0
- package/dist/table.cjs +1 -0
- package/dist/table.js +580 -0
- package/dist/theme/AppTheme.d.ts +14 -0
- package/dist/theme/customizations/dataDisplay.d.ts +2 -0
- package/dist/theme/customizations/feedback.d.ts +2 -0
- package/dist/theme/customizations/inputs.d.ts +2 -0
- package/dist/theme/customizations/navigation.d.ts +2 -0
- package/dist/theme/index.d.ts +36 -0
- package/dist/theme/primitives.d.ts +234 -0
- package/dist/theme.cjs +1 -0
- package/dist/theme.js +1362 -0
- package/dist/tokens.css +252 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/maps.d.ts +25 -0
- package/dist/types/variants.d.ts +21 -0
- package/dist/types.cjs +1 -0
- package/dist/types.js +96 -0
- package/dist/typography/CodeBlock.d.ts +15 -0
- package/dist/typography/CodeInline.d.ts +10 -0
- package/dist/typography/Heading.d.ts +13 -0
- package/dist/typography/Link.d.ts +18 -0
- package/dist/typography/Text.d.ts +22 -0
- package/dist/typography/index.d.ts +10 -0
- package/dist/typography.cjs +1 -0
- package/dist/typography.js +120 -0
- package/dist/ui.css +1 -0
- package/dist/units-BuBKbqQ7.js +54 -0
- package/dist/units-CDpdlN1W.cjs +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/language.d.ts +4 -0
- package/dist/utils/time.d.ts +5 -0
- package/dist/utils/units.d.ts +7 -0
- package/dist/utils.cjs +1 -0
- package/dist/utils.js +78 -0
- package/package.json +261 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { T as vr, a as ur } from "./TabPanel-DLHbgKpl.js";
|
|
2
|
+
import { jsx as e, jsxs as x } from "react/jsx-runtime";
|
|
3
|
+
import { useState as D, useCallback as w } from "react";
|
|
4
|
+
import h from "@mui/material/Box";
|
|
5
|
+
import N from "@mui/material/Collapse";
|
|
6
|
+
import k from "@mui/material/Typography";
|
|
7
|
+
import B from "@mui/material/Checkbox";
|
|
8
|
+
import L from "@mui/material/CircularProgress";
|
|
9
|
+
import { LuChevronDown as W, LuChevronRight as M, LuChevronLeft as j, LuX as E, LuPlus as O } from "react-icons/lu";
|
|
10
|
+
import V from "@mui/material/Breadcrumbs";
|
|
11
|
+
import P from "@mui/material/Link";
|
|
12
|
+
import X from "@mui/material/Stepper";
|
|
13
|
+
import _ from "@mui/material/Step";
|
|
14
|
+
import q from "@mui/material/StepLabel";
|
|
15
|
+
import F from "@mui/material/Pagination";
|
|
16
|
+
import T from "@mui/material/IconButton";
|
|
17
|
+
import { toMuiSize as I } from "./types.js";
|
|
18
|
+
function A({
|
|
19
|
+
node: r,
|
|
20
|
+
depth: n,
|
|
21
|
+
selected: p,
|
|
22
|
+
onSelect: a,
|
|
23
|
+
expanded: i,
|
|
24
|
+
onToggle: t,
|
|
25
|
+
checkboxes: d,
|
|
26
|
+
lazyLoad: f,
|
|
27
|
+
onLoadChildren: u,
|
|
28
|
+
loadingNodes: y,
|
|
29
|
+
setLoadingNodes: b,
|
|
30
|
+
dynamicChildren: g,
|
|
31
|
+
setDynamicChildren: o
|
|
32
|
+
}) {
|
|
33
|
+
const v = i.has(r.id), s = p === r.id, l = g.get(r.id) ?? r.children, S = l && l.length > 0 || f && !g.has(r.id), m = y.has(r.id), C = async () => {
|
|
34
|
+
if (f && !g.has(r.id) && u) {
|
|
35
|
+
b((c) => new Set(c).add(r.id));
|
|
36
|
+
try {
|
|
37
|
+
const c = await u(r.id);
|
|
38
|
+
o((z) => new Map(z).set(r.id, c));
|
|
39
|
+
} finally {
|
|
40
|
+
b((c) => {
|
|
41
|
+
const z = new Set(c);
|
|
42
|
+
return z.delete(r.id), z;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
t(r.id);
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ x(h, { children: [
|
|
49
|
+
/* @__PURE__ */ x(
|
|
50
|
+
h,
|
|
51
|
+
{
|
|
52
|
+
onClick: () => {
|
|
53
|
+
r.disabled || a?.(r.id);
|
|
54
|
+
},
|
|
55
|
+
sx: {
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
gap: 0.5,
|
|
59
|
+
py: 0.25,
|
|
60
|
+
px: 1,
|
|
61
|
+
pl: n * 2 + 1,
|
|
62
|
+
cursor: r.disabled ? "default" : "pointer",
|
|
63
|
+
opacity: r.disabled ? 0.5 : 1,
|
|
64
|
+
borderRadius: "4px",
|
|
65
|
+
bgcolor: s ? "var(--ov-accent-subtle)" : "transparent",
|
|
66
|
+
color: s ? "var(--ov-accent-fg)" : "var(--ov-fg-default)",
|
|
67
|
+
"&:hover": {
|
|
68
|
+
bgcolor: s ? "var(--ov-accent-subtle)" : "var(--ov-state-hover)"
|
|
69
|
+
},
|
|
70
|
+
fontSize: "0.8125rem"
|
|
71
|
+
},
|
|
72
|
+
children: [
|
|
73
|
+
S ? /* @__PURE__ */ e(
|
|
74
|
+
h,
|
|
75
|
+
{
|
|
76
|
+
onClick: (c) => {
|
|
77
|
+
c.stopPropagation(), C();
|
|
78
|
+
},
|
|
79
|
+
sx: { display: "flex", alignItems: "center", cursor: "pointer", flexShrink: 0 },
|
|
80
|
+
children: m ? /* @__PURE__ */ e(L, { size: 12 }) : v ? /* @__PURE__ */ e(W, { size: 14 }) : /* @__PURE__ */ e(M, { size: 14 })
|
|
81
|
+
}
|
|
82
|
+
) : /* @__PURE__ */ e(h, { sx: { width: 14, flexShrink: 0 } }),
|
|
83
|
+
d && /* @__PURE__ */ e(
|
|
84
|
+
B,
|
|
85
|
+
{
|
|
86
|
+
size: "small",
|
|
87
|
+
checked: s,
|
|
88
|
+
disabled: r.disabled,
|
|
89
|
+
onClick: (c) => c.stopPropagation(),
|
|
90
|
+
onChange: () => a?.(r.id),
|
|
91
|
+
sx: { p: 0 }
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
r.icon && /* @__PURE__ */ e(h, { sx: { display: "flex", alignItems: "center", flexShrink: 0 }, children: r.icon }),
|
|
95
|
+
/* @__PURE__ */ e(k, { variant: "body2", sx: { flex: 1, fontSize: "inherit", color: "inherit" }, noWrap: !0, children: r.label }),
|
|
96
|
+
r.badge
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
S && l && /* @__PURE__ */ e(N, { in: v, unmountOnExit: !0, children: l.map((c) => /* @__PURE__ */ e(
|
|
101
|
+
A,
|
|
102
|
+
{
|
|
103
|
+
node: c,
|
|
104
|
+
depth: n + 1,
|
|
105
|
+
selected: p,
|
|
106
|
+
onSelect: a,
|
|
107
|
+
expanded: i,
|
|
108
|
+
onToggle: t,
|
|
109
|
+
checkboxes: d,
|
|
110
|
+
lazyLoad: f,
|
|
111
|
+
onLoadChildren: u,
|
|
112
|
+
loadingNodes: y,
|
|
113
|
+
setLoadingNodes: b,
|
|
114
|
+
dynamicChildren: g,
|
|
115
|
+
setDynamicChildren: o
|
|
116
|
+
},
|
|
117
|
+
c.id
|
|
118
|
+
)) })
|
|
119
|
+
] });
|
|
120
|
+
}
|
|
121
|
+
function G({
|
|
122
|
+
nodes: r,
|
|
123
|
+
selected: n,
|
|
124
|
+
onSelect: p,
|
|
125
|
+
expanded: a,
|
|
126
|
+
onToggle: i,
|
|
127
|
+
checkboxes: t = !1,
|
|
128
|
+
lazyLoad: d = !1,
|
|
129
|
+
onLoadChildren: f,
|
|
130
|
+
sx: u
|
|
131
|
+
}) {
|
|
132
|
+
const [y, b] = D(/* @__PURE__ */ new Set()), [g, o] = D(/* @__PURE__ */ new Set()), [v, s] = D(/* @__PURE__ */ new Map()), l = a ? new Set(a) : y, S = w(
|
|
133
|
+
(m) => {
|
|
134
|
+
i ? i(m) : b((C) => {
|
|
135
|
+
const c = new Set(C);
|
|
136
|
+
return c.has(m) ? c.delete(m) : c.add(m), c;
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
[i]
|
|
140
|
+
);
|
|
141
|
+
return /* @__PURE__ */ e(h, { sx: u, children: r.map((m) => /* @__PURE__ */ e(
|
|
142
|
+
A,
|
|
143
|
+
{
|
|
144
|
+
node: m,
|
|
145
|
+
depth: 0,
|
|
146
|
+
selected: n,
|
|
147
|
+
onSelect: p,
|
|
148
|
+
expanded: l,
|
|
149
|
+
onToggle: S,
|
|
150
|
+
checkboxes: t,
|
|
151
|
+
lazyLoad: d,
|
|
152
|
+
onLoadChildren: f,
|
|
153
|
+
loadingNodes: g,
|
|
154
|
+
setLoadingNodes: o,
|
|
155
|
+
dynamicChildren: v,
|
|
156
|
+
setDynamicChildren: s
|
|
157
|
+
},
|
|
158
|
+
m.id
|
|
159
|
+
)) });
|
|
160
|
+
}
|
|
161
|
+
G.displayName = "TreeView";
|
|
162
|
+
function H({
|
|
163
|
+
items: r,
|
|
164
|
+
separator: n,
|
|
165
|
+
maxItems: p,
|
|
166
|
+
sx: a
|
|
167
|
+
}) {
|
|
168
|
+
return /* @__PURE__ */ e(
|
|
169
|
+
V,
|
|
170
|
+
{
|
|
171
|
+
separator: n ?? "/",
|
|
172
|
+
maxItems: p,
|
|
173
|
+
sx: {
|
|
174
|
+
fontSize: "0.8125rem",
|
|
175
|
+
color: "var(--ov-fg-muted)",
|
|
176
|
+
...typeof a == "object" && !Array.isArray(a) ? a : {}
|
|
177
|
+
},
|
|
178
|
+
children: r.map((i, t) => {
|
|
179
|
+
const d = t === r.length - 1, f = /* @__PURE__ */ x(h, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: [
|
|
180
|
+
i.icon,
|
|
181
|
+
/* @__PURE__ */ e("span", { children: i.label })
|
|
182
|
+
] });
|
|
183
|
+
return d ? /* @__PURE__ */ e(k, { variant: "body2", sx: { fontSize: "inherit", color: "var(--ov-fg-base)", fontWeight: 500 }, children: f }, t) : i.onClick ? /* @__PURE__ */ e(
|
|
184
|
+
P,
|
|
185
|
+
{
|
|
186
|
+
component: "button",
|
|
187
|
+
variant: "body2",
|
|
188
|
+
onClick: i.onClick,
|
|
189
|
+
underline: "hover",
|
|
190
|
+
sx: { fontSize: "inherit", cursor: "pointer", color: "inherit" },
|
|
191
|
+
children: f
|
|
192
|
+
},
|
|
193
|
+
t
|
|
194
|
+
) : i.href ? /* @__PURE__ */ e(P, { href: i.href, variant: "body2", underline: "hover", sx: { fontSize: "inherit", color: "inherit" }, children: f }, t) : /* @__PURE__ */ e(k, { variant: "body2", sx: { fontSize: "inherit", color: "inherit" }, children: f }, t);
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
H.displayName = "Breadcrumbs";
|
|
200
|
+
function J({
|
|
201
|
+
steps: r,
|
|
202
|
+
activeStep: n,
|
|
203
|
+
orientation: p = "horizontal",
|
|
204
|
+
variant: a = "linear",
|
|
205
|
+
sx: i
|
|
206
|
+
}) {
|
|
207
|
+
return /* @__PURE__ */ e(
|
|
208
|
+
X,
|
|
209
|
+
{
|
|
210
|
+
activeStep: n,
|
|
211
|
+
orientation: p,
|
|
212
|
+
nonLinear: a === "nonLinear",
|
|
213
|
+
sx: i,
|
|
214
|
+
children: r.map((t, d) => /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
215
|
+
q,
|
|
216
|
+
{
|
|
217
|
+
icon: t.icon,
|
|
218
|
+
optional: t.optional ? /* @__PURE__ */ e(k, { variant: "caption", sx: { color: "var(--ov-fg-muted)" }, children: "Optional" }) : t.description ? /* @__PURE__ */ e(k, { variant: "caption", sx: { color: "var(--ov-fg-muted)" }, children: t.description }) : void 0,
|
|
219
|
+
children: t.label
|
|
220
|
+
}
|
|
221
|
+
) }, d))
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
J.displayName = "Stepper";
|
|
226
|
+
function K({
|
|
227
|
+
count: r,
|
|
228
|
+
page: n,
|
|
229
|
+
onChange: p,
|
|
230
|
+
variant: a = "full",
|
|
231
|
+
size: i = "md",
|
|
232
|
+
sx: t
|
|
233
|
+
}) {
|
|
234
|
+
if (a === "compact") {
|
|
235
|
+
const d = I(i);
|
|
236
|
+
return /* @__PURE__ */ x(h, { sx: { display: "flex", alignItems: "center", gap: 1, ...typeof t == "object" && !Array.isArray(t) ? t : {} }, children: [
|
|
237
|
+
/* @__PURE__ */ e(
|
|
238
|
+
T,
|
|
239
|
+
{
|
|
240
|
+
size: d,
|
|
241
|
+
disabled: n <= 1,
|
|
242
|
+
onClick: () => p(n - 1),
|
|
243
|
+
children: /* @__PURE__ */ e(j, {})
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ x(h, { sx: { fontSize: "0.8125rem", color: "var(--ov-fg-default)" }, children: [
|
|
247
|
+
n,
|
|
248
|
+
" / ",
|
|
249
|
+
r
|
|
250
|
+
] }),
|
|
251
|
+
/* @__PURE__ */ e(
|
|
252
|
+
T,
|
|
253
|
+
{
|
|
254
|
+
size: d,
|
|
255
|
+
disabled: n >= r,
|
|
256
|
+
onClick: () => p(n + 1),
|
|
257
|
+
children: /* @__PURE__ */ e(M, {})
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
] });
|
|
261
|
+
}
|
|
262
|
+
return /* @__PURE__ */ e(
|
|
263
|
+
F,
|
|
264
|
+
{
|
|
265
|
+
count: r,
|
|
266
|
+
page: n,
|
|
267
|
+
onChange: (d, f) => p(f),
|
|
268
|
+
size: I(i),
|
|
269
|
+
sx: t
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
K.displayName = "Pagination";
|
|
274
|
+
function Q({
|
|
275
|
+
tabs: r,
|
|
276
|
+
activeId: n,
|
|
277
|
+
onSelect: p,
|
|
278
|
+
onClose: a,
|
|
279
|
+
onReorder: i,
|
|
280
|
+
onAdd: t,
|
|
281
|
+
onContextMenu: d,
|
|
282
|
+
maxTabWidth: f = 180,
|
|
283
|
+
sx: u
|
|
284
|
+
}) {
|
|
285
|
+
const y = w((o, v) => {
|
|
286
|
+
o.dataTransfer.setData("text/plain", String(v)), o.dataTransfer.effectAllowed = "move";
|
|
287
|
+
}, []), b = w((o, v) => {
|
|
288
|
+
o.preventDefault();
|
|
289
|
+
const s = parseInt(o.dataTransfer.getData("text/plain"), 10);
|
|
290
|
+
if (isNaN(s) || s === v || !i) return;
|
|
291
|
+
const l = [...r], [S] = l.splice(s, 1);
|
|
292
|
+
l.splice(v, 0, S), i(l);
|
|
293
|
+
}, [r, i]), g = w((o) => {
|
|
294
|
+
o.preventDefault(), o.dataTransfer.dropEffect = "move";
|
|
295
|
+
}, []);
|
|
296
|
+
return /* @__PURE__ */ x(
|
|
297
|
+
h,
|
|
298
|
+
{
|
|
299
|
+
sx: {
|
|
300
|
+
display: "flex",
|
|
301
|
+
alignItems: "end",
|
|
302
|
+
height: 36,
|
|
303
|
+
overflow: "auto",
|
|
304
|
+
bgcolor: "var(--ov-bg-surface)",
|
|
305
|
+
borderBottom: "1px solid var(--ov-border-default)",
|
|
306
|
+
scrollbarWidth: "none",
|
|
307
|
+
"&::-webkit-scrollbar": { display: "none" },
|
|
308
|
+
...typeof u == "object" && !Array.isArray(u) ? u : {}
|
|
309
|
+
},
|
|
310
|
+
children: [
|
|
311
|
+
r.map((o, v) => {
|
|
312
|
+
const s = o.id === n;
|
|
313
|
+
return /* @__PURE__ */ x(
|
|
314
|
+
h,
|
|
315
|
+
{
|
|
316
|
+
draggable: !!i,
|
|
317
|
+
onDragStart: (l) => y(l, v),
|
|
318
|
+
onDragOver: g,
|
|
319
|
+
onDrop: (l) => b(l, v),
|
|
320
|
+
onContextMenu: (l) => {
|
|
321
|
+
d && (l.preventDefault(), d(o.id, l));
|
|
322
|
+
},
|
|
323
|
+
onClick: () => p(o.id),
|
|
324
|
+
sx: {
|
|
325
|
+
display: "flex",
|
|
326
|
+
alignItems: "center",
|
|
327
|
+
gap: 0.75,
|
|
328
|
+
maxWidth: f,
|
|
329
|
+
height: s ? 35 : 32,
|
|
330
|
+
px: 1.5,
|
|
331
|
+
cursor: "pointer",
|
|
332
|
+
flexShrink: 0,
|
|
333
|
+
borderBottom: s ? "2px solid var(--ov-accent)" : "2px solid transparent",
|
|
334
|
+
bgcolor: s ? "var(--ov-bg-base)" : "transparent",
|
|
335
|
+
color: s ? "var(--ov-fg-base)" : "var(--ov-fg-muted)",
|
|
336
|
+
"&:hover": {
|
|
337
|
+
bgcolor: s ? "var(--ov-bg-base)" : "var(--ov-state-hover)",
|
|
338
|
+
"& .tab-close": { opacity: 1 }
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
children: [
|
|
342
|
+
o.icon && /* @__PURE__ */ e(h, { sx: { display: "flex", flexShrink: 0, fontSize: 14 }, children: o.icon }),
|
|
343
|
+
/* @__PURE__ */ e(
|
|
344
|
+
k,
|
|
345
|
+
{
|
|
346
|
+
noWrap: !0,
|
|
347
|
+
sx: {
|
|
348
|
+
fontSize: "var(--ov-text-xs)",
|
|
349
|
+
fontWeight: s ? 500 : 400,
|
|
350
|
+
flex: 1,
|
|
351
|
+
minWidth: 0
|
|
352
|
+
},
|
|
353
|
+
children: o.label
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
o.closable !== !1 && a && /* @__PURE__ */ e(
|
|
357
|
+
T,
|
|
358
|
+
{
|
|
359
|
+
className: "tab-close",
|
|
360
|
+
size: "small",
|
|
361
|
+
onClick: (l) => {
|
|
362
|
+
l.stopPropagation(), a(o.id);
|
|
363
|
+
},
|
|
364
|
+
sx: {
|
|
365
|
+
p: "1px",
|
|
366
|
+
opacity: s ? 0.7 : 0,
|
|
367
|
+
color: "inherit",
|
|
368
|
+
"&:hover": { opacity: 1, bgcolor: "var(--ov-state-hover)" }
|
|
369
|
+
},
|
|
370
|
+
children: /* @__PURE__ */ e(E, { size: 12 })
|
|
371
|
+
}
|
|
372
|
+
)
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
o.id
|
|
376
|
+
);
|
|
377
|
+
}),
|
|
378
|
+
t && /* @__PURE__ */ e(
|
|
379
|
+
T,
|
|
380
|
+
{
|
|
381
|
+
size: "small",
|
|
382
|
+
onClick: t,
|
|
383
|
+
sx: {
|
|
384
|
+
mx: 0.5,
|
|
385
|
+
p: "4px",
|
|
386
|
+
color: "var(--ov-fg-muted)",
|
|
387
|
+
"&:hover": { bgcolor: "var(--ov-state-hover)" }
|
|
388
|
+
},
|
|
389
|
+
children: /* @__PURE__ */ e(O, { size: 14 })
|
|
390
|
+
}
|
|
391
|
+
)
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
Q.displayName = "DraggableTabs";
|
|
397
|
+
function U({
|
|
398
|
+
children: r,
|
|
399
|
+
value: n,
|
|
400
|
+
activeValue: p,
|
|
401
|
+
sx: a
|
|
402
|
+
}) {
|
|
403
|
+
const i = n === p;
|
|
404
|
+
return /* @__PURE__ */ e(
|
|
405
|
+
h,
|
|
406
|
+
{
|
|
407
|
+
role: "tabpanel",
|
|
408
|
+
hidden: !i,
|
|
409
|
+
sx: {
|
|
410
|
+
display: i ? "block" : "none",
|
|
411
|
+
flex: 1,
|
|
412
|
+
overflow: "auto",
|
|
413
|
+
...typeof a == "object" && !Array.isArray(a) ? a : {}
|
|
414
|
+
},
|
|
415
|
+
children: r
|
|
416
|
+
}
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
U.displayName = "PersistentTabPanel";
|
|
420
|
+
export {
|
|
421
|
+
H as Breadcrumbs,
|
|
422
|
+
Q as DraggableTabs,
|
|
423
|
+
K as Pagination,
|
|
424
|
+
U as PersistentTabPanel,
|
|
425
|
+
J as Stepper,
|
|
426
|
+
vr as TabPanel,
|
|
427
|
+
ur as Tabs,
|
|
428
|
+
G as TreeView
|
|
429
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
|
|
8
|
+
variant?: 'default' | 'confirm' | 'danger';
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
disableBackdropClose?: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
13
|
+
}
|
|
14
|
+
declare function Dialog({ open, onClose, title, icon, size, variant, actions, disableBackdropClose, children, sx, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace Dialog {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
18
|
+
export default Dialog;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface DrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
anchor?: 'left' | 'right' | 'bottom';
|
|
6
|
+
size?: number | string;
|
|
7
|
+
resizable?: boolean;
|
|
8
|
+
persistent?: boolean;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
title?: string;
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
12
|
+
}
|
|
13
|
+
declare function Drawer({ open, onClose, anchor, size, resizable, persistent, children, title, sx, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare namespace Drawer {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
export default Drawer;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface ErrorOverlayAction {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface ErrorOverlayProps {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
title?: string;
|
|
10
|
+
message: string;
|
|
11
|
+
file?: string;
|
|
12
|
+
line?: number;
|
|
13
|
+
stack?: string;
|
|
14
|
+
actions?: ErrorOverlayAction[];
|
|
15
|
+
sx?: SxProps<Theme>;
|
|
16
|
+
}
|
|
17
|
+
declare function ErrorOverlay({ open, onClose, title, message, file, line, stack, actions, sx, }: ErrorOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
declare namespace ErrorOverlay {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export default ErrorOverlay;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
backdrop?: boolean;
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
}
|
|
10
|
+
declare function Modal({ open, onClose, children, size, backdrop, sx, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare namespace Modal {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
14
|
+
export default Modal;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { SemanticColor } from '../types';
|
|
4
|
+
export interface NotificationItem {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
message?: string;
|
|
8
|
+
timestamp: Date;
|
|
9
|
+
read?: boolean;
|
|
10
|
+
color?: SemanticColor;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
action?: {
|
|
13
|
+
label: string;
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface NotificationCenterProps {
|
|
18
|
+
open: boolean;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
notifications: NotificationItem[];
|
|
21
|
+
onDismiss?: (id: string) => void;
|
|
22
|
+
onMarkRead?: (id: string) => void;
|
|
23
|
+
onClearAll?: () => void;
|
|
24
|
+
width?: number;
|
|
25
|
+
sx?: SxProps<Theme>;
|
|
26
|
+
}
|
|
27
|
+
declare function NotificationCenter({ open, onClose, notifications, onDismiss, onMarkRead, onClearAll, width, sx, }: NotificationCenterProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare namespace NotificationCenter {
|
|
29
|
+
var displayName: string;
|
|
30
|
+
}
|
|
31
|
+
export default NotificationCenter;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
}
|
|
11
|
+
declare function Popover({ open, onClose, anchorEl, children, width, placement, sx, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Popover {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export default Popover;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
export interface SpotlightResultItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
section?: string;
|
|
9
|
+
onSelect: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface SpotlightProps {
|
|
12
|
+
open: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onSearch: (query: string) => SpotlightResultItem[] | Promise<SpotlightResultItem[]>;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
recentItems?: SpotlightResultItem[];
|
|
17
|
+
width?: number;
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
}
|
|
20
|
+
declare function Spotlight({ open, onClose, onSearch, placeholder, recentItems, width, sx, }: SpotlightProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare namespace Spotlight {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export default Spotlight;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { SemanticColor } from '../types';
|
|
2
|
+
export interface ToastItem {
|
|
3
|
+
id: string;
|
|
4
|
+
message: string;
|
|
5
|
+
color?: SemanticColor;
|
|
6
|
+
duration?: number;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
timestamp: number;
|
|
9
|
+
}
|
|
10
|
+
type ToastAction = {
|
|
11
|
+
type: 'ADD';
|
|
12
|
+
toast: ToastItem;
|
|
13
|
+
} | {
|
|
14
|
+
type: 'DISMISS';
|
|
15
|
+
id: string;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'DISMISS_ALL';
|
|
18
|
+
};
|
|
19
|
+
export interface ToastContextValue {
|
|
20
|
+
dispatch: React.Dispatch<ToastAction>;
|
|
21
|
+
}
|
|
22
|
+
export declare const ToastContext: import('react').Context<ToastContextValue | null>;
|
|
23
|
+
export interface ToastProviderProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
maxVisible?: number;
|
|
26
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
27
|
+
}
|
|
28
|
+
declare function ToastProvider({ children, maxVisible, position, }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare namespace ToastProvider {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
export default ToastProvider;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface TooltipProps {
|
|
2
|
+
/** Tooltip content — `content` is an alias for `title` */
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
/** Alias for title */
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
variant?: 'default' | 'rich' | 'code';
|
|
7
|
+
placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
8
|
+
delay?: number;
|
|
9
|
+
children: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
declare function Tooltip({ title, content, variant, placement, delay, children, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Tooltip {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export default Tooltip;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as Dialog } from './Dialog';
|
|
2
|
+
export type { DialogProps } from './Dialog';
|
|
3
|
+
export { default as Modal } from './Modal';
|
|
4
|
+
export type { ModalProps } from './Modal';
|
|
5
|
+
export { default as Drawer } from './Drawer';
|
|
6
|
+
export type { DrawerProps } from './Drawer';
|
|
7
|
+
export { default as Tooltip } from './Tooltip';
|
|
8
|
+
export type { TooltipProps } from './Tooltip';
|
|
9
|
+
export { default as Popover } from './Popover';
|
|
10
|
+
export type { PopoverProps } from './Popover';
|
|
11
|
+
export { default as ToastProvider } from './ToastProvider';
|
|
12
|
+
export type { ToastProviderProps, ToastItem } from './ToastProvider';
|
|
13
|
+
export { useToast } from './useToast';
|
|
14
|
+
export type { UseToastReturn } from './useToast';
|
|
15
|
+
export { default as NotificationCenter } from './NotificationCenter';
|
|
16
|
+
export type { NotificationCenterProps, NotificationItem } from './NotificationCenter';
|
|
17
|
+
export { default as ErrorOverlay } from './ErrorOverlay';
|
|
18
|
+
export type { ErrorOverlayProps, ErrorOverlayAction } from './ErrorOverlay';
|
|
19
|
+
export { default as Spotlight } from './Spotlight';
|
|
20
|
+
export type { SpotlightProps, SpotlightResultItem } from './Spotlight';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SemanticColor } from '../types';
|
|
2
|
+
interface ToastOptions {
|
|
3
|
+
message: string;
|
|
4
|
+
color?: SemanticColor;
|
|
5
|
+
duration?: number;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface ToastFn {
|
|
9
|
+
(options: ToastOptions): void;
|
|
10
|
+
success: (message: string) => void;
|
|
11
|
+
error: (message: string) => void;
|
|
12
|
+
warning: (message: string) => void;
|
|
13
|
+
info: (message: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface UseToastReturn {
|
|
16
|
+
toast: ToastFn;
|
|
17
|
+
dismiss: (id: string) => void;
|
|
18
|
+
dismissAll: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useToast(): UseToastReturn;
|
|
21
|
+
export {};
|