@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.
Files changed (257) hide show
  1. package/LICENSE +661 -0
  2. package/dist/Button-Dmu1cikC.cjs +1 -0
  3. package/dist/Button-lr02bh_m.js +51 -0
  4. package/dist/CodeBlock-B1iQO7zU.js +73 -0
  5. package/dist/CodeBlock-CIyG0DbW.cjs +2 -0
  6. package/dist/CopyButton-CACe3RCF.cjs +1 -0
  7. package/dist/CopyButton-DPBgL0K8.js +77 -0
  8. package/dist/ErrorState-CexYrMpy.js +188 -0
  9. package/dist/ErrorState-CnIR-1xa.cjs +1 -0
  10. package/dist/HotkeyHint-6SOi-MaU.js +37 -0
  11. package/dist/HotkeyHint-DrTOTrIM.cjs +1 -0
  12. package/dist/Icon-CKdIOrjZ.cjs +1 -0
  13. package/dist/Icon-CuO9W7cA.js +27 -0
  14. package/dist/SearchInput-CFBBNdI2.cjs +1 -0
  15. package/dist/SearchInput-D3AsCI5H.js +41 -0
  16. package/dist/Select-CnRBSc5w.cjs +1 -0
  17. package/dist/Select-DTUF31OP.js +206 -0
  18. package/dist/Skeleton-BUYyXUiC.js +32 -0
  19. package/dist/Skeleton-CfdQWLQM.cjs +1 -0
  20. package/dist/StatusDot-CYyJxjJK.cjs +1 -0
  21. package/dist/StatusDot-CncykBAY.js +68 -0
  22. package/dist/StatusPill-C1NaiCzd.js +29 -0
  23. package/dist/StatusPill-C7yn7dSA.cjs +1 -0
  24. package/dist/TabPanel-CkUSl6Bt.cjs +1 -0
  25. package/dist/TabPanel-DLHbgKpl.js +124 -0
  26. package/dist/Text-By4P3in5.js +71 -0
  27. package/dist/Text-Mk6Uyg1w.cjs +1 -0
  28. package/dist/Tooltip-44-P5KfQ.cjs +1 -0
  29. package/dist/Tooltip-BEVuYuZ3.js +41 -0
  30. package/dist/_commonjsHelpers-CvWRHxnb.js +26 -0
  31. package/dist/_commonjsHelpers-D3HyQheV.cjs +1 -0
  32. package/dist/buttons/ActionMenu.d.ts +21 -0
  33. package/dist/buttons/Button.d.ts +31 -0
  34. package/dist/buttons/ButtonGroup.d.ts +18 -0
  35. package/dist/buttons/ConfirmButton.d.ts +10 -0
  36. package/dist/buttons/CopyButton.d.ts +11 -0
  37. package/dist/buttons/IconButton.d.ts +21 -0
  38. package/dist/buttons/SearchBar.d.ts +22 -0
  39. package/dist/buttons/ToggleButton.d.ts +18 -0
  40. package/dist/buttons/ToggleGroup.d.ts +23 -0
  41. package/dist/buttons/Toolbar.d.ts +15 -0
  42. package/dist/buttons/ToolbarGroup.d.ts +11 -0
  43. package/dist/buttons/index.d.ts +22 -0
  44. package/dist/buttons.cjs +1 -0
  45. package/dist/buttons.js +430 -0
  46. package/dist/cells/BadgesCell.d.ts +19 -0
  47. package/dist/cells/ChipCell.d.ts +16 -0
  48. package/dist/cells/SelectBoxHeader.d.ts +11 -0
  49. package/dist/cells/SelectBoxRow.d.ts +11 -0
  50. package/dist/cells/TextCell.d.ts +25 -0
  51. package/dist/cells/index.d.ts +5 -0
  52. package/dist/cells.cjs +1 -0
  53. package/dist/cells.js +284 -0
  54. package/dist/charts/BarChart.d.ts +15 -0
  55. package/dist/charts/ChartContainer.d.ts +12 -0
  56. package/dist/charts/ChartLegend.d.ts +11 -0
  57. package/dist/charts/GaugeCard.d.ts +18 -0
  58. package/dist/charts/MetricsPanel.d.ts +61 -0
  59. package/dist/charts/PieChart.d.ts +13 -0
  60. package/dist/charts/ScatterChart.d.ts +25 -0
  61. package/dist/charts/Sparkline.d.ts +16 -0
  62. package/dist/charts/StackedAreaChart.d.ts +18 -0
  63. package/dist/charts/TimeSeriesChart.d.ts +43 -0
  64. package/dist/charts/formatters.d.ts +17 -0
  65. package/dist/charts/index.d.ts +21 -0
  66. package/dist/charts/palette.d.ts +7 -0
  67. package/dist/charts/types.d.ts +67 -0
  68. package/dist/charts/useChartTheme.d.ts +13 -0
  69. package/dist/charts.cjs +1 -0
  70. package/dist/charts.js +967 -0
  71. package/dist/components/ActionCard.d.ts +22 -0
  72. package/dist/components/AspectRatio.d.ts +13 -0
  73. package/dist/components/Avatar.d.ts +19 -0
  74. package/dist/components/Badge.d.ts +22 -0
  75. package/dist/components/Card.d.ts +24 -0
  76. package/dist/components/Chip.d.ts +32 -0
  77. package/dist/components/ClipboardText.d.ts +14 -0
  78. package/dist/components/DetailsCard.d.ts +25 -0
  79. package/dist/components/EmptySearch.d.ts +12 -0
  80. package/dist/components/ExpandableSections.d.ts +51 -0
  81. package/dist/components/FileIcon.d.ts +12 -0
  82. package/dist/components/HotkeyHint.d.ts +8 -0
  83. package/dist/components/Icon.d.ts +7 -0
  84. package/dist/components/InlineEdit.d.ts +14 -0
  85. package/dist/components/KVCard.d.ts +12 -0
  86. package/dist/components/Kbd.d.ts +8 -0
  87. package/dist/components/List.d.ts +29 -0
  88. package/dist/components/ListCard.d.ts +30 -0
  89. package/dist/components/ListItem.d.ts +27 -0
  90. package/dist/components/LoadingOverlay.d.ts +14 -0
  91. package/dist/components/MediaCard.d.ts +24 -0
  92. package/dist/components/MetricsSection.d.ts +37 -0
  93. package/dist/components/OverflowText.d.ts +12 -0
  94. package/dist/components/StatCard.d.ts +26 -0
  95. package/dist/components/StatusCard.d.ts +29 -0
  96. package/dist/components/TruncatedList.d.ts +13 -0
  97. package/dist/domain/DescriptionList.d.ts +12 -0
  98. package/dist/domain/EventsList.d.ts +11 -0
  99. package/dist/domain/FilterBar.d.ts +23 -0
  100. package/dist/domain/LogsViewer.d.ts +15 -0
  101. package/dist/domain/MetricCard.d.ts +14 -0
  102. package/dist/domain/ObjectInspector.d.ts +19 -0
  103. package/dist/domain/ResourceBreadcrumb.d.ts +19 -0
  104. package/dist/domain/ResourceRef.d.ts +15 -0
  105. package/dist/domain/ResourceStatus.d.ts +17 -0
  106. package/dist/domain/SecretValueMask.d.ts +11 -0
  107. package/dist/domain/Timeline.d.ts +21 -0
  108. package/dist/domain/index.d.ts +23 -0
  109. package/dist/domain/types.d.ts +25 -0
  110. package/dist/domain.cjs +1 -0
  111. package/dist/domain.js +871 -0
  112. package/dist/editors/CodeEditor.d.ts +19 -0
  113. package/dist/editors/CommandPalette.d.ts +22 -0
  114. package/dist/editors/DiffViewer.d.ts +14 -0
  115. package/dist/editors/MarkdownPreview.d.ts +9 -0
  116. package/dist/editors/Terminal.d.ts +18 -0
  117. package/dist/editors/index.d.ts +11 -0
  118. package/dist/editors/themes.d.ts +4 -0
  119. package/dist/editors.cjs +42 -0
  120. package/dist/editors.js +38396 -0
  121. package/dist/feedback/Alert.d.ts +21 -0
  122. package/dist/feedback/ConnectionIndicator.d.ts +15 -0
  123. package/dist/feedback/EmptyState.d.ts +17 -0
  124. package/dist/feedback/ErrorState.d.ts +12 -0
  125. package/dist/feedback/IDEStatusFooter.d.ts +104 -0
  126. package/dist/feedback/NotificationStack.d.ts +32 -0
  127. package/dist/feedback/ProgressBar.d.ts +16 -0
  128. package/dist/feedback/ProgressRing.d.ts +26 -0
  129. package/dist/feedback/RunButton.d.ts +17 -0
  130. package/dist/feedback/Skeleton.d.ts +13 -0
  131. package/dist/feedback/StatusBar.d.ts +12 -0
  132. package/dist/feedback/StatusBarItem.d.ts +18 -0
  133. package/dist/feedback/StatusDot.d.ts +14 -0
  134. package/dist/feedback/StatusPill.d.ts +13 -0
  135. package/dist/feedback/index.d.ts +29 -0
  136. package/dist/feedback.cjs +1 -0
  137. package/dist/feedback.js +1011 -0
  138. package/dist/index.cjs +1 -0
  139. package/dist/index.d.ts +54 -0
  140. package/dist/index.js +1632 -0
  141. package/dist/inputs/Autocomplete.d.ts +30 -0
  142. package/dist/inputs/Checkbox.d.ts +17 -0
  143. package/dist/inputs/ColorPicker.d.ts +13 -0
  144. package/dist/inputs/DebouncedInput.d.ts +10 -0
  145. package/dist/inputs/FormField.d.ts +15 -0
  146. package/dist/inputs/FormSection.d.ts +14 -0
  147. package/dist/inputs/KeyValueEditor.d.ts +17 -0
  148. package/dist/inputs/RadioGroup.d.ts +23 -0
  149. package/dist/inputs/SearchInput.d.ts +14 -0
  150. package/dist/inputs/Select.d.ts +32 -0
  151. package/dist/inputs/Slider.d.ts +24 -0
  152. package/dist/inputs/Switch.d.ts +17 -0
  153. package/dist/inputs/TagInput.d.ts +18 -0
  154. package/dist/inputs/TextArea.d.ts +26 -0
  155. package/dist/inputs/TextField.d.ts +39 -0
  156. package/dist/inputs/TimeRangePicker.d.ts +21 -0
  157. package/dist/inputs/index.d.ts +31 -0
  158. package/dist/inputs.cjs +21 -0
  159. package/dist/inputs.js +15834 -0
  160. package/dist/layout/AppShell.d.ts +18 -0
  161. package/dist/layout/DockLayout.d.ts +23 -0
  162. package/dist/layout/Inline.d.ts +15 -0
  163. package/dist/layout/Panel.d.ts +17 -0
  164. package/dist/layout/ResizableSplitPane.d.ts +18 -0
  165. package/dist/layout/Spacer.d.ts +9 -0
  166. package/dist/layout/Stack.d.ts +19 -0
  167. package/dist/layout/index.d.ts +16 -0
  168. package/dist/layout/useResizablePanel.d.ts +18 -0
  169. package/dist/layout.cjs +5 -0
  170. package/dist/layout.js +378 -0
  171. package/dist/menus/ContextMenu.d.ts +12 -0
  172. package/dist/menus/DropdownMenu.d.ts +20 -0
  173. package/dist/menus/MenuBar.d.ts +11 -0
  174. package/dist/menus/NestedMenuItem.d.ts +13 -0
  175. package/dist/menus/SplitButton.d.ts +15 -0
  176. package/dist/menus/index.d.ts +11 -0
  177. package/dist/menus/types.d.ts +24 -0
  178. package/dist/menus.cjs +1 -0
  179. package/dist/menus.js +355 -0
  180. package/dist/navigation/Breadcrumbs.d.ts +18 -0
  181. package/dist/navigation/DraggableTabs.d.ts +24 -0
  182. package/dist/navigation/Pagination.d.ts +15 -0
  183. package/dist/navigation/PersistentTabPanel.d.ts +13 -0
  184. package/dist/navigation/Stepper.d.ts +19 -0
  185. package/dist/navigation/TabPanel.d.ts +11 -0
  186. package/dist/navigation/Tabs.d.ts +26 -0
  187. package/dist/navigation/TreeView.d.ts +27 -0
  188. package/dist/navigation/index.d.ts +16 -0
  189. package/dist/navigation.cjs +1 -0
  190. package/dist/navigation.js +429 -0
  191. package/dist/overlays/Dialog.d.ts +18 -0
  192. package/dist/overlays/Drawer.d.ts +17 -0
  193. package/dist/overlays/ErrorOverlay.d.ts +21 -0
  194. package/dist/overlays/Modal.d.ts +14 -0
  195. package/dist/overlays/NotificationCenter.d.ts +31 -0
  196. package/dist/overlays/Popover.d.ts +15 -0
  197. package/dist/overlays/Spotlight.d.ts +24 -0
  198. package/dist/overlays/ToastProvider.d.ts +32 -0
  199. package/dist/overlays/Tooltip.d.ts +15 -0
  200. package/dist/overlays/index.d.ts +20 -0
  201. package/dist/overlays/useToast.d.ts +21 -0
  202. package/dist/overlays.cjs +1 -0
  203. package/dist/overlays.js +865 -0
  204. package/dist/sidebars/ActivityBar.d.ts +16 -0
  205. package/dist/sidebars/NavMenu.d.ts +27 -0
  206. package/dist/sidebars/NavMenu.test.d.ts +1 -0
  207. package/dist/sidebars/PropertyGrid.d.ts +16 -0
  208. package/dist/sidebars/SidebarGroup.d.ts +15 -0
  209. package/dist/sidebars/SidebarPanel.d.ts +19 -0
  210. package/dist/sidebars/SidebarTreeItem.d.ts +21 -0
  211. package/dist/sidebars/index.d.ts +13 -0
  212. package/dist/sidebars/types.d.ts +29 -0
  213. package/dist/sidebars.cjs +1 -0
  214. package/dist/sidebars.js +762 -0
  215. package/dist/table/ColumnFilter.d.ts +10 -0
  216. package/dist/table/DataTable.d.ts +23 -0
  217. package/dist/table/IDETable.d.ts +48 -0
  218. package/dist/table/TableEmptyState.d.ts +12 -0
  219. package/dist/table/TableSkeleton.d.ts +11 -0
  220. package/dist/table/TableToolbar.d.ts +15 -0
  221. package/dist/table/index.d.ts +12 -0
  222. package/dist/table/types.d.ts +4 -0
  223. package/dist/table.cjs +1 -0
  224. package/dist/table.js +580 -0
  225. package/dist/theme/AppTheme.d.ts +14 -0
  226. package/dist/theme/customizations/dataDisplay.d.ts +2 -0
  227. package/dist/theme/customizations/feedback.d.ts +2 -0
  228. package/dist/theme/customizations/inputs.d.ts +2 -0
  229. package/dist/theme/customizations/navigation.d.ts +2 -0
  230. package/dist/theme/index.d.ts +36 -0
  231. package/dist/theme/primitives.d.ts +234 -0
  232. package/dist/theme.cjs +1 -0
  233. package/dist/theme.js +1362 -0
  234. package/dist/tokens.css +252 -0
  235. package/dist/types/index.d.ts +7 -0
  236. package/dist/types/maps.d.ts +25 -0
  237. package/dist/types/variants.d.ts +21 -0
  238. package/dist/types.cjs +1 -0
  239. package/dist/types.js +96 -0
  240. package/dist/typography/CodeBlock.d.ts +15 -0
  241. package/dist/typography/CodeInline.d.ts +10 -0
  242. package/dist/typography/Heading.d.ts +13 -0
  243. package/dist/typography/Link.d.ts +18 -0
  244. package/dist/typography/Text.d.ts +22 -0
  245. package/dist/typography/index.d.ts +10 -0
  246. package/dist/typography.cjs +1 -0
  247. package/dist/typography.js +120 -0
  248. package/dist/ui.css +1 -0
  249. package/dist/units-BuBKbqQ7.js +54 -0
  250. package/dist/units-CDpdlN1W.cjs +1 -0
  251. package/dist/utils/index.d.ts +4 -0
  252. package/dist/utils/language.d.ts +4 -0
  253. package/dist/utils/time.d.ts +5 -0
  254. package/dist/utils/units.d.ts +7 -0
  255. package/dist/utils.cjs +1 -0
  256. package/dist/utils.js +78 -0
  257. package/package.json +261 -0
@@ -0,0 +1,206 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { useState as E, useMemo as F } from "react";
3
+ import N from "@mui/material/Select";
4
+ import x from "@mui/material/MenuItem";
5
+ import j from "@mui/material/FormControl";
6
+ import B from "@mui/material/InputLabel";
7
+ import O from "@mui/material/FormHelperText";
8
+ import G from "@mui/material/ListItemIcon";
9
+ import K from "@mui/material/ListItemText";
10
+ import R from "@mui/material/CircularProgress";
11
+ import U from "@mui/material/OutlinedInput";
12
+ import V from "@mui/material/InputBase";
13
+ import _ from "@mui/material/Chip";
14
+ import m from "@mui/material/Box";
15
+ import q from "@mui/icons-material/Search";
16
+ import A from "@mui/icons-material/Clear";
17
+ import { INPUT_HEIGHTS as J, toMuiInputSize as Q, toMuiColor as X } from "./types.js";
18
+ function Y({
19
+ options: f,
20
+ value: v,
21
+ onChange: c,
22
+ size: p = "md",
23
+ color: P = "neutral",
24
+ label: a,
25
+ helperText: I,
26
+ placeholder: t,
27
+ searchable: u = !1,
28
+ multiple: g = !1,
29
+ loading: S = !1,
30
+ error: s,
31
+ fullWidth: w,
32
+ disabled: L,
33
+ clearable: y = !1,
34
+ sx: z
35
+ }) {
36
+ const [d, C] = E(""), D = Q(p), h = X(P), H = typeof s == "string" ? !!s : s, M = typeof s == "string" ? s : void 0, b = F(() => {
37
+ if (!u || !d) return f;
38
+ const o = d.toLowerCase();
39
+ return f.filter((i) => i.label.toLowerCase().includes(o));
40
+ }, [f, d, u]), T = (o) => {
41
+ c(o.target.value);
42
+ };
43
+ return /* @__PURE__ */ n(
44
+ j,
45
+ {
46
+ size: D,
47
+ fullWidth: w,
48
+ error: H,
49
+ disabled: L,
50
+ style: { "--ov-input-height": J[p] },
51
+ sx: z,
52
+ children: [
53
+ a && /* @__PURE__ */ r(
54
+ B,
55
+ {
56
+ color: h === "default" || h === "inherit" ? void 0 : h,
57
+ shrink: !!t || void 0,
58
+ children: a
59
+ }
60
+ ),
61
+ /* @__PURE__ */ n(
62
+ N,
63
+ {
64
+ value: v,
65
+ onChange: T,
66
+ multiple: g,
67
+ displayEmpty: !!t,
68
+ label: a,
69
+ notched: a && !!t || void 0,
70
+ input: g ? /* @__PURE__ */ r(U, { label: a }) : void 0,
71
+ onClose: () => {
72
+ u && C("");
73
+ },
74
+ renderValue: g ? (o) => {
75
+ const i = o;
76
+ return i.length === 0 && t ? /* @__PURE__ */ r(m, { sx: { color: "var(--ov-fg-faint)" }, children: t }) : /* @__PURE__ */ n(m, { sx: { display: "flex", flexWrap: "nowrap", gap: 0.5, overflow: "hidden", alignItems: "center" }, children: [
77
+ i.map((e) => {
78
+ const W = f.find((l) => l.value === e);
79
+ return /* @__PURE__ */ r(
80
+ _,
81
+ {
82
+ label: W?.label ?? e,
83
+ size: "small",
84
+ ...y ? {
85
+ onDelete: (l) => {
86
+ l.stopPropagation(), c(i.filter((k) => k !== e));
87
+ },
88
+ onMouseDown: (l) => {
89
+ l.stopPropagation();
90
+ }
91
+ } : {}
92
+ },
93
+ e
94
+ );
95
+ }),
96
+ y && i.length > 1 && /* @__PURE__ */ r(
97
+ "span",
98
+ {
99
+ role: "button",
100
+ "aria-label": "Clear all",
101
+ onMouseDown: (e) => {
102
+ e.stopPropagation(), e.preventDefault(), c([]);
103
+ },
104
+ style: {
105
+ display: "inline-flex",
106
+ alignItems: "center",
107
+ flexShrink: 0,
108
+ marginLeft: 2,
109
+ cursor: "pointer",
110
+ color: "var(--ov-fg-faint)",
111
+ lineHeight: 0
112
+ },
113
+ children: /* @__PURE__ */ r(A, { sx: { fontSize: 16 } })
114
+ }
115
+ )
116
+ ] });
117
+ } : t && !v ? () => /* @__PURE__ */ r(m, { sx: { color: "var(--ov-fg-faint)" }, children: t }) : void 0,
118
+ MenuProps: {
119
+ PaperProps: {
120
+ sx: {
121
+ maxHeight: 300,
122
+ ...p === "xs" || p === "sm" ? {
123
+ "& .MuiMenuItem-root": {
124
+ fontSize: "0.8rem",
125
+ minHeight: 28,
126
+ padding: "3px 8px"
127
+ },
128
+ "& .MuiListItemText-root": {
129
+ margin: 0
130
+ },
131
+ "& .MuiListItemText-primary": {
132
+ fontSize: "0.8rem"
133
+ },
134
+ "& .MuiListItemIcon-root": {
135
+ minWidth: 22
136
+ }
137
+ } : {}
138
+ }
139
+ }
140
+ },
141
+ children: [
142
+ u && /* @__PURE__ */ r(
143
+ m,
144
+ {
145
+ sx: { px: 1, pb: 0.5, pt: 0.5 },
146
+ onKeyDown: (o) => o.stopPropagation(),
147
+ onClickCapture: (o) => o.stopPropagation(),
148
+ onMouseDown: (o) => o.stopPropagation(),
149
+ children: /* @__PURE__ */ n(
150
+ m,
151
+ {
152
+ sx: {
153
+ display: "flex",
154
+ alignItems: "center",
155
+ height: 28,
156
+ border: "1px solid var(--ov-border-default)",
157
+ borderRadius: "4px",
158
+ bgcolor: "var(--ov-bg-base)",
159
+ px: 0.75,
160
+ "&:focus-within": { borderColor: "var(--ov-accent)" }
161
+ },
162
+ children: [
163
+ /* @__PURE__ */ r(q, { sx: { fontSize: 14, color: "var(--ov-fg-faint)", mr: 0.5 } }),
164
+ /* @__PURE__ */ r(
165
+ V,
166
+ {
167
+ autoFocus: !0,
168
+ fullWidth: !0,
169
+ placeholder: "Search...",
170
+ value: d,
171
+ onChange: (o) => C(o.target.value),
172
+ sx: {
173
+ flex: 1,
174
+ fontSize: "0.75rem",
175
+ color: "var(--ov-fg-default)",
176
+ "& input": { py: 0, px: 0 },
177
+ "& input::placeholder": { color: "var(--ov-fg-faint)", opacity: 1 }
178
+ }
179
+ }
180
+ )
181
+ ]
182
+ }
183
+ )
184
+ }
185
+ ),
186
+ S && /* @__PURE__ */ n(x, { disabled: !0, children: [
187
+ /* @__PURE__ */ r(R, { size: 16, sx: { mr: 1 } }),
188
+ " Loading..."
189
+ ] }),
190
+ b.map((o) => /* @__PURE__ */ n(x, { value: o.value, disabled: o.disabled, children: [
191
+ o.icon && /* @__PURE__ */ r(G, { sx: { minWidth: 28 }, children: o.icon }),
192
+ /* @__PURE__ */ r(K, { children: o.label })
193
+ ] }, o.value)),
194
+ b.length === 0 && !S && /* @__PURE__ */ r(x, { disabled: !0, children: "No options" })
195
+ ]
196
+ }
197
+ ),
198
+ (M || I) && /* @__PURE__ */ r(O, { children: M ?? I })
199
+ ]
200
+ }
201
+ );
202
+ }
203
+ Y.displayName = "Select";
204
+ export {
205
+ Y as S
206
+ };
@@ -0,0 +1,32 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import m from "@mui/material/Skeleton";
3
+ import i from "@mui/material/Box";
4
+ function p({
5
+ variant: n = "text",
6
+ width: e,
7
+ height: a,
8
+ lines: r,
9
+ sx: t
10
+ }) {
11
+ return r && r > 1 ? /* @__PURE__ */ o(i, { sx: { display: "flex", flexDirection: "column", gap: 0.5, ...typeof t == "object" && !Array.isArray(t) ? t : {} }, children: Array.from({ length: r }, (l, f) => /* @__PURE__ */ o(
12
+ m,
13
+ {
14
+ variant: "text",
15
+ width: f === r - 1 ? "60%" : e ?? "100%",
16
+ height: a
17
+ },
18
+ f
19
+ )) }) : /* @__PURE__ */ o(
20
+ m,
21
+ {
22
+ variant: n,
23
+ width: e,
24
+ height: a,
25
+ sx: t
26
+ }
27
+ );
28
+ }
29
+ p.displayName = "Skeleton";
30
+ export {
31
+ p as S
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),u=require("@mui/material/Skeleton"),l=require("@mui/material/Box");function a({variant:c="text",width:n,height:o,lines:e,sx:r}){return e&&e>1?t.jsx(l,{sx:{display:"flex",flexDirection:"column",gap:.5,...typeof r=="object"&&!Array.isArray(r)?r:{}},children:Array.from({length:e},(s,i)=>t.jsx(u,{variant:"text",width:i===e-1?"60%":n??"100%",height:o},i))}):t.jsx(u,{variant:c,width:n,height:o,sx:r})}a.displayName="Skeleton";exports.Skeleton=a;
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime"),i=require("@mui/material/Box"),x=require("@mui/material/Typography"),a=require("./types.cjs"),d={xs:6,sm:8,md:10,lg:12,xl:14};function n({status:c,size:e="sm",label:s,pulse:l=!1,sx:t}){const u=a.toCssColor(a.statusToColor(c)),r=d[e];return o.jsxs(i,{sx:{display:"inline-flex",alignItems:"center",gap:.75,...typeof t=="object"&&!Array.isArray(t)?t:{}},children:[o.jsx(i,{sx:{width:r,height:r,borderRadius:"50%",backgroundColor:u,flexShrink:0,...l&&{animation:"ov-pulse 1.5s ease-in-out infinite","@keyframes ov-pulse":{"0%, 100%":{opacity:1},"50%":{opacity:.4}}}}}),s&&o.jsx(x,{variant:"body2",sx:{fontSize:e==="xs"?"var(--ov-text-xs)":"var(--ov-text-sm)",color:"var(--ov-fg-default)",lineHeight:1},children:s})]})}n.displayName="StatusDot";exports.StatusDot=n;
@@ -0,0 +1,68 @@
1
+ import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
+ import e from "@mui/material/Box";
3
+ import p from "@mui/material/Typography";
4
+ import { toCssColor as f, statusToColor as c } from "./types.js";
5
+ const d = {
6
+ xs: 6,
7
+ sm: 8,
8
+ md: 10,
9
+ lg: 12,
10
+ xl: 14
11
+ };
12
+ function x({
13
+ status: a,
14
+ size: t = "sm",
15
+ label: r,
16
+ pulse: n = !1,
17
+ sx: o
18
+ }) {
19
+ const l = f(c(a)), i = d[t];
20
+ return /* @__PURE__ */ m(
21
+ e,
22
+ {
23
+ sx: {
24
+ display: "inline-flex",
25
+ alignItems: "center",
26
+ gap: 0.75,
27
+ ...typeof o == "object" && !Array.isArray(o) ? o : {}
28
+ },
29
+ children: [
30
+ /* @__PURE__ */ s(
31
+ e,
32
+ {
33
+ sx: {
34
+ width: i,
35
+ height: i,
36
+ borderRadius: "50%",
37
+ backgroundColor: l,
38
+ flexShrink: 0,
39
+ ...n && {
40
+ animation: "ov-pulse 1.5s ease-in-out infinite",
41
+ "@keyframes ov-pulse": {
42
+ "0%, 100%": { opacity: 1 },
43
+ "50%": { opacity: 0.4 }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ),
49
+ r && /* @__PURE__ */ s(
50
+ p,
51
+ {
52
+ variant: "body2",
53
+ sx: {
54
+ fontSize: t === "xs" ? "var(--ov-text-xs)" : "var(--ov-text-sm)",
55
+ color: "var(--ov-fg-default)",
56
+ lineHeight: 1
57
+ },
58
+ children: r
59
+ }
60
+ )
61
+ ]
62
+ }
63
+ );
64
+ }
65
+ x.displayName = "StatusDot";
66
+ export {
67
+ x as S
68
+ };
@@ -0,0 +1,29 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import m from "@mui/material/Chip";
3
+ import { toMuiColor as n, statusToColor as p } from "./types.js";
4
+ function c({
5
+ status: o,
6
+ size: t = "sm",
7
+ label: l,
8
+ sx: r
9
+ }) {
10
+ const a = p(o), i = n(a), e = l ?? o.charAt(0).toUpperCase() + o.slice(1);
11
+ return /* @__PURE__ */ s(
12
+ m,
13
+ {
14
+ label: e,
15
+ color: i === "default" || i === "inherit" ? void 0 : i,
16
+ variant: "outlined",
17
+ size: t === "xs" || t === "sm" ? "small" : "medium",
18
+ sx: {
19
+ fontWeight: 500,
20
+ fontSize: t === "xs" ? "var(--ov-text-xs)" : "var(--ov-text-sm)",
21
+ ...typeof r == "object" && !Array.isArray(r) ? r : {}
22
+ }
23
+ }
24
+ );
25
+ }
26
+ c.displayName = "StatusPill";
27
+ export {
28
+ c as S
29
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("react/jsx-runtime"),c=require("@mui/material/Chip"),r=require("./types.cjs");function s({status:t,size:o="sm",label:l,sx:e}){const a=r.statusToColor(t),i=r.toMuiColor(a),n=l??t.charAt(0).toUpperCase()+t.slice(1);return u.jsx(c,{label:n,color:i==="default"||i==="inherit"?void 0:i,variant:"outlined",size:o==="xs"||o==="sm"?"small":"medium",sx:{fontWeight:500,fontSize:o==="xs"?"var(--ov-text-xs)":"var(--ov-text-sm)",...typeof e=="object"&&!Array.isArray(e)?e:{}}})}s.displayName="StatusPill";exports.StatusPill=s;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),v=require("@mui/material/Tabs"),H=require("@mui/material/Tab"),d=require("@mui/material/Box"),T=require("@mui/material/IconButton"),z=require("@mui/icons-material/Close"),S=require("@mui/icons-material/Add");function g({tabs:s,value:a,onChange:t,variant:r="line",size:o="md",closable:f=!1,onClose:x,scrollable:m=!1,addButton:b=!1,onAdd:h,sx:l}){const u={xs:{fontSize:"0.6875rem",minHeight:28,py:.25},sm:{fontSize:"0.75rem",minHeight:32,py:.5},md:{fontSize:"0.8125rem",minHeight:40,py:1},lg:{fontSize:"0.875rem",minHeight:48,py:1.5},xl:{fontSize:"1rem",minHeight:56,py:2}},n=u[o]||u.md,y={line:{},pill:{"& .MuiTabs-indicator":{display:"none"},"& .MuiTab-root":{borderRadius:"999px",minHeight:n.minHeight,"&.Mui-selected":{bgcolor:"var(--ov-accent-subtle)",color:"var(--ov-accent-fg)"}}},segmented:{bgcolor:"var(--ov-bg-surface-inset)",borderRadius:"8px",p:.5,minHeight:"auto","& .MuiTabs-indicator":{display:"none"},"& .MuiTab-root":{borderRadius:"6px",minHeight:n.minHeight-8,"&.Mui-selected":{bgcolor:"var(--ov-bg-surface)",color:"var(--ov-fg-base)",boxShadow:"var(--ov-shadow-sm)"}}}};return e.jsxs(d,{sx:{display:"flex",alignItems:"center",...typeof l=="object"&&!Array.isArray(l)?l:{}},children:[e.jsx(v,{value:a,onChange:(i,c)=>t(c),variant:m?"scrollable":"standard",scrollButtons:m?"auto":!1,sx:{minHeight:n.minHeight,...y[r]},children:s.map(i=>e.jsx(H,{value:i.key,label:e.jsxs(d,{sx:{display:"flex",alignItems:"center",gap:.5},children:[i.icon,e.jsx("span",{children:i.label}),f&&e.jsx(z,{sx:{fontSize:14,ml:.5,opacity:.6,"&:hover":{opacity:1}},onClick:c=>{c.stopPropagation(),x?.(i.key)}})]}),disabled:i.disabled,sx:{fontSize:n.fontSize,minHeight:n.minHeight,py:n.py,textTransform:"none",color:"var(--ov-fg-default)"}},i.key))}),b&&e.jsx(T,{size:"small",onClick:h,sx:{ml:.5},children:e.jsx(S,{fontSize:"small"})})]})}g.displayName="Tabs";function p({value:s,activeValue:a,children:t,keepMounted:r=!1}){const o=s===a;return!o&&!r?null:e.jsx(d,{role:"tabpanel",hidden:!o,sx:{display:o?void 0:"none"},children:t})}p.displayName="TabPanel";exports.TabPanel=p;exports.Tabs=g;
@@ -0,0 +1,124 @@
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import v from "@mui/material/Tabs";
3
+ import x from "@mui/material/Tab";
4
+ import c from "@mui/material/Box";
5
+ import H from "@mui/material/IconButton";
6
+ import z from "@mui/icons-material/Close";
7
+ import S from "@mui/icons-material/Add";
8
+ function T({
9
+ tabs: a,
10
+ value: r,
11
+ onChange: t,
12
+ variant: s = "line",
13
+ size: n = "md",
14
+ closable: g = !1,
15
+ onClose: u,
16
+ scrollable: d = !1,
17
+ addButton: h = !1,
18
+ onAdd: y,
19
+ sx: l
20
+ }) {
21
+ const p = {
22
+ xs: { fontSize: "0.6875rem", minHeight: 28, py: 0.25 },
23
+ sm: { fontSize: "0.75rem", minHeight: 32, py: 0.5 },
24
+ md: { fontSize: "0.8125rem", minHeight: 40, py: 1 },
25
+ lg: { fontSize: "0.875rem", minHeight: 48, py: 1.5 },
26
+ xl: { fontSize: "1rem", minHeight: 56, py: 2 }
27
+ }, o = p[n] || p.md, b = {
28
+ line: {},
29
+ pill: {
30
+ "& .MuiTabs-indicator": { display: "none" },
31
+ "& .MuiTab-root": {
32
+ borderRadius: "999px",
33
+ minHeight: o.minHeight,
34
+ "&.Mui-selected": {
35
+ bgcolor: "var(--ov-accent-subtle)",
36
+ color: "var(--ov-accent-fg)"
37
+ }
38
+ }
39
+ },
40
+ segmented: {
41
+ bgcolor: "var(--ov-bg-surface-inset)",
42
+ borderRadius: "8px",
43
+ p: 0.5,
44
+ minHeight: "auto",
45
+ "& .MuiTabs-indicator": { display: "none" },
46
+ "& .MuiTab-root": {
47
+ borderRadius: "6px",
48
+ minHeight: o.minHeight - 8,
49
+ "&.Mui-selected": {
50
+ bgcolor: "var(--ov-bg-surface)",
51
+ color: "var(--ov-fg-base)",
52
+ boxShadow: "var(--ov-shadow-sm)"
53
+ }
54
+ }
55
+ }
56
+ };
57
+ return /* @__PURE__ */ f(c, { sx: { display: "flex", alignItems: "center", ...typeof l == "object" && !Array.isArray(l) ? l : {} }, children: [
58
+ /* @__PURE__ */ i(
59
+ v,
60
+ {
61
+ value: r,
62
+ onChange: (e, m) => t(m),
63
+ variant: d ? "scrollable" : "standard",
64
+ scrollButtons: d ? "auto" : !1,
65
+ sx: {
66
+ minHeight: o.minHeight,
67
+ ...b[s]
68
+ },
69
+ children: a.map((e) => /* @__PURE__ */ i(
70
+ x,
71
+ {
72
+ value: e.key,
73
+ label: /* @__PURE__ */ f(c, { sx: { display: "flex", alignItems: "center", gap: 0.5 }, children: [
74
+ e.icon,
75
+ /* @__PURE__ */ i("span", { children: e.label }),
76
+ g && /* @__PURE__ */ i(
77
+ z,
78
+ {
79
+ sx: { fontSize: 14, ml: 0.5, opacity: 0.6, "&:hover": { opacity: 1 } },
80
+ onClick: (m) => {
81
+ m.stopPropagation(), u?.(e.key);
82
+ }
83
+ }
84
+ )
85
+ ] }),
86
+ disabled: e.disabled,
87
+ sx: {
88
+ fontSize: o.fontSize,
89
+ minHeight: o.minHeight,
90
+ py: o.py,
91
+ textTransform: "none",
92
+ color: "var(--ov-fg-default)"
93
+ }
94
+ },
95
+ e.key
96
+ ))
97
+ }
98
+ ),
99
+ h && /* @__PURE__ */ i(H, { size: "small", onClick: y, sx: { ml: 0.5 }, children: /* @__PURE__ */ i(S, { fontSize: "small" }) })
100
+ ] });
101
+ }
102
+ T.displayName = "Tabs";
103
+ function M({
104
+ value: a,
105
+ activeValue: r,
106
+ children: t,
107
+ keepMounted: s = !1
108
+ }) {
109
+ const n = a === r;
110
+ return !n && !s ? null : /* @__PURE__ */ i(
111
+ c,
112
+ {
113
+ role: "tabpanel",
114
+ hidden: !n,
115
+ sx: { display: n ? void 0 : "none" },
116
+ children: t
117
+ }
118
+ );
119
+ }
120
+ M.displayName = "TabPanel";
121
+ export {
122
+ M as T,
123
+ T as a
124
+ };
@@ -0,0 +1,71 @@
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import v from "@mui/material/Typography";
3
+ import { toCssColor as x } from "./types.js";
4
+ const u = {
5
+ body: "body2",
6
+ caption: "caption",
7
+ overline: "overline",
8
+ mono: "body2",
9
+ code: "body2"
10
+ }, m = {
11
+ xs: "0.625rem",
12
+ sm: "0.75rem",
13
+ md: "0.875rem",
14
+ lg: "1rem",
15
+ xl: "1.125rem"
16
+ }, g = {
17
+ normal: 400,
18
+ medium: 500,
19
+ semibold: 600,
20
+ bold: 700
21
+ };
22
+ function C({
23
+ children: d,
24
+ variant: o = "body",
25
+ color: t,
26
+ size: e,
27
+ weight: i,
28
+ truncate: p = !1,
29
+ noWrap: l = !1,
30
+ lines: r,
31
+ muted: s = !1,
32
+ inline: k = !1,
33
+ component: c,
34
+ sx: n
35
+ }) {
36
+ const f = u[o], b = o === "mono" || o === "code", a = s ? "var(--ov-fg-muted)" : t ? x(t) : void 0;
37
+ return /* @__PURE__ */ y(
38
+ v,
39
+ {
40
+ variant: f,
41
+ component: c ?? "span",
42
+ noWrap: l || p,
43
+ sx: {
44
+ ...a && { color: a },
45
+ ...e && { fontSize: m[e] },
46
+ ...i && { fontWeight: g[i] },
47
+ ...b && {
48
+ fontFamily: "var(--ov-font-mono)",
49
+ fontSize: e ? m[e] : o === "code" ? "0.85em" : void 0
50
+ },
51
+ ...o === "code" && {
52
+ backgroundColor: "var(--ov-bg-surface-inset)",
53
+ padding: "1px 4px",
54
+ borderRadius: "3px"
55
+ },
56
+ ...r && r > 0 && {
57
+ display: "-webkit-box",
58
+ WebkitLineClamp: r,
59
+ WebkitBoxOrient: "vertical",
60
+ overflow: "hidden"
61
+ },
62
+ ...typeof n == "object" && !Array.isArray(n) ? n : {}
63
+ },
64
+ children: d
65
+ }
66
+ );
67
+ }
68
+ C.displayName = "Text";
69
+ export {
70
+ C as T
71
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("react/jsx-runtime"),v=require("@mui/material/Typography"),x=require("./types.cjs"),g={body:"body2",caption:"caption",overline:"overline",mono:"body2",code:"body2"},a={xs:"0.625rem",sm:"0.75rem",md:"0.875rem",lg:"1rem",xl:"1.125rem"},C={normal:400,medium:500,semibold:600,bold:700};function d({children:c,variant:o="body",color:t,size:e,weight:i,truncate:m=!1,noWrap:l=!1,lines:n,muted:p=!1,inline:k=!1,component:b,sx:r}){const f=g[o],y=o==="mono"||o==="code",s=p?"var(--ov-fg-muted)":t?x.toCssColor(t):void 0;return u.jsx(v,{variant:f,component:b??"span",noWrap:l||m,sx:{...s&&{color:s},...e&&{fontSize:a[e]},...i&&{fontWeight:C[i]},...y&&{fontFamily:"var(--ov-font-mono)",fontSize:e?a[e]:o==="code"?"0.85em":void 0},...o==="code"&&{backgroundColor:"var(--ov-bg-surface-inset)",padding:"1px 4px",borderRadius:"3px"},...n&&n>0&&{display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",overflow:"hidden"},...typeof r=="object"&&!Array.isArray(r)?r:{}},children:c})}d.displayName="Text";exports.Text=d;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("@mui/material/Tooltip"),s=require("@mui/material/Box");function n({title:t,content:l,variant:o="default",placement:c="top",delay:r,children:x}){const i=t??l??"",u=o==="code"?e.jsx(s,{sx:{fontFamily:"var(--ov-font-mono)",fontSize:"var(--ov-text-xs)",bgcolor:"var(--ov-bg-surface-inset)",px:1,py:.5,borderRadius:"3px"},children:i}):o==="rich"?e.jsx(s,{sx:{p:1,maxWidth:320},children:i}):t;return e.jsx(p,{title:u,placement:c,enterDelay:r,enterNextDelay:r,arrow:o==="default",children:x})}n.displayName="Tooltip";exports.Tooltip=n;
@@ -0,0 +1,41 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import x from "@mui/material/Tooltip";
3
+ import n from "@mui/material/Box";
4
+ function a({
5
+ title: e,
6
+ content: l,
7
+ variant: o = "default",
8
+ placement: p = "top",
9
+ delay: r,
10
+ children: s
11
+ }) {
12
+ const i = e ?? l ?? "";
13
+ return /* @__PURE__ */ t(
14
+ x,
15
+ {
16
+ title: o === "code" ? /* @__PURE__ */ t(
17
+ n,
18
+ {
19
+ sx: {
20
+ fontFamily: "var(--ov-font-mono)",
21
+ fontSize: "var(--ov-text-xs)",
22
+ bgcolor: "var(--ov-bg-surface-inset)",
23
+ px: 1,
24
+ py: 0.5,
25
+ borderRadius: "3px"
26
+ },
27
+ children: i
28
+ }
29
+ ) : o === "rich" ? /* @__PURE__ */ t(n, { sx: { p: 1, maxWidth: 320 }, children: i }) : e,
30
+ placement: p,
31
+ enterDelay: r,
32
+ enterNextDelay: r,
33
+ arrow: o === "default",
34
+ children: s
35
+ }
36
+ );
37
+ }
38
+ a.displayName = "Tooltip";
39
+ export {
40
+ a as T
41
+ };
@@ -0,0 +1,26 @@
1
+ function a() {
2
+ return a = Object.assign ? Object.assign.bind() : function(t) {
3
+ for (var n = 1; n < arguments.length; n++) {
4
+ var r = arguments[n];
5
+ for (var e in r) ({}).hasOwnProperty.call(r, e) && (t[e] = r[e]);
6
+ }
7
+ return t;
8
+ }, a.apply(null, arguments);
9
+ }
10
+ function o(t, n) {
11
+ if (t == null) return {};
12
+ var r = {};
13
+ for (var e in t) if ({}.hasOwnProperty.call(t, e)) {
14
+ if (n.indexOf(e) !== -1) continue;
15
+ r[e] = t[e];
16
+ }
17
+ return r;
18
+ }
19
+ function u(t) {
20
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
21
+ }
22
+ export {
23
+ o as _,
24
+ a,
25
+ u as g
26
+ };
@@ -0,0 +1 @@
1
+ "use strict";function o(){return o=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)({}).hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},o.apply(null,arguments)}function u(t,n){if(t==null)return{};var r={};for(var e in t)if({}.hasOwnProperty.call(t,e)){if(n.indexOf(e)!==-1)continue;r[e]=t[e]}return r}function a(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}exports._extends=o;exports._objectWithoutPropertiesLoose=u;exports.getDefaultExportFromCjs=a;
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { ComponentSize, SemanticColor } from '../types';
3
+ export interface ActionMenuItem {
4
+ key: string;
5
+ label: string;
6
+ icon?: React.ReactNode;
7
+ color?: SemanticColor;
8
+ disabled?: boolean;
9
+ dividerAfter?: boolean;
10
+ onClick: () => void;
11
+ }
12
+ export interface ActionMenuProps {
13
+ items: ActionMenuItem[];
14
+ trigger?: React.ReactNode;
15
+ size?: ComponentSize;
16
+ }
17
+ declare function ActionMenu({ items, trigger, size, }: ActionMenuProps): import("react/jsx-runtime").JSX.Element;
18
+ declare namespace ActionMenu {
19
+ var displayName: string;
20
+ }
21
+ export default ActionMenu;