haze-ui 1.5.5 → 1.6.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/dist/components/Affix/Affix.js +22 -0
- package/dist/components/Alert/Alert.js +14 -10
- package/dist/components/ApprovalCard/ApprovalCard.js +42 -0
- package/dist/components/AspectRatio/AspectRatio.js +17 -0
- package/dist/components/BackToTop/BackToTop.js +28 -0
- package/dist/components/Banner/Banner.js +36 -0
- package/dist/components/BottomSheet/BottomSheet.js +22 -0
- package/dist/components/Button/Button.js +15 -15
- package/dist/components/ChatContainer/ChatContainer.js +25 -0
- package/dist/components/ChatInput/ChatInput.js +45 -0
- package/dist/components/ChatMessage/ChatMessage.js +45 -0
- package/dist/components/Chip/Chip.js +42 -0
- package/dist/components/CodeBlock/CodeBlock.js +19 -0
- package/dist/components/Collapsible/Collapsible.js +46 -0
- package/dist/components/ColorPicker/ColorPicker.js +45 -0
- package/dist/components/Combobox/Combobox.js +23 -23
- package/dist/components/Command/Command.js +58 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.js +51 -0
- package/dist/components/Container/Container.js +23 -0
- package/dist/components/ContextMenu/ContextMenu.js +42 -0
- package/dist/components/ContextMenu/ContextMenuContent.js +19 -0
- package/dist/components/ContextMenu/ContextMenuContext.js +10 -0
- package/dist/components/ContextMenu/ContextMenuItem.js +20 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.js +13 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.js +18 -0
- package/dist/components/ConversationList/ConversationItem.js +32 -0
- package/dist/components/ConversationList/ConversationList.js +13 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +38 -0
- package/dist/components/Datepicker/Datepicker.js +9 -9
- package/dist/components/DiffViewer/DiffViewer.js +81 -0
- package/dist/components/Divider/Divider.js +25 -0
- package/dist/components/Drawer/Drawer.js +35 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +37 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.js +23 -0
- package/dist/components/DropdownMenu/DropdownMenuContext.js +10 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.js +20 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js +13 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js +17 -0
- package/dist/components/Empty/Empty.js +67 -0
- package/dist/components/Grid/Grid.js +17 -0
- package/dist/components/Grid/GridItem.js +11 -0
- package/dist/components/InlineEdit/InlineEdit.js +45 -0
- package/dist/components/LogViewer/LogViewer.js +65 -0
- package/dist/components/MarkdownRenderer/MarkdownRenderer.js +24 -0
- package/dist/components/ModelPicker/ModelPicker.js +26 -0
- package/dist/components/NavigationBar/NavLink.js +22 -0
- package/dist/components/NavigationBar/NavigationBar.js +26 -0
- package/dist/components/NumberInput/NumberInput.js +23 -23
- package/dist/components/OTPInput/OTPInput.js +50 -0
- package/dist/components/Pagination/Pagination.js +58 -0
- package/dist/components/PasswordInput/PasswordInput.js +32 -0
- package/dist/components/Progress/Progress.js +83 -0
- package/dist/components/Rating/Rating.js +49 -0
- package/dist/components/Resizable/Resizable.js +56 -0
- package/dist/components/ScrollArea/ScrollArea.js +14 -0
- package/dist/components/Segmented/Segmented.js +42 -0
- package/dist/components/Spinner/Spinner.js +39 -0
- package/dist/components/Stat/Stat.js +52 -0
- package/dist/components/StepTimeline/StepTimeline.js +36 -0
- package/dist/components/Stepper/Step.js +38 -0
- package/dist/components/Stepper/Stepper.js +25 -0
- package/dist/components/Stepper/StepperContext.js +10 -0
- package/dist/components/StreamingText/StreamingText.js +34 -0
- package/dist/components/SwipeAction/SwipeAction.js +45 -0
- package/dist/components/Switch/Switch.js +23 -23
- package/dist/components/Table/Table.js +14 -11
- package/dist/components/TagGroup/TagGroup.js +14 -0
- package/dist/components/TagGroup/TagGroupItem.js +19 -0
- package/dist/components/TagInput/TagInput.js +51 -0
- package/dist/components/ThinkingIndicator/ThinkingIndicator.js +20 -0
- package/dist/components/TimePicker/TimePicker.js +22 -0
- package/dist/components/Timeline/Timeline.js +47 -0
- package/dist/components/TokenCounter/TokenCounter.js +30 -0
- package/dist/components/ToolCallCard/ToolCallCard.js +57 -0
- package/dist/components/Transfer/Transfer.js +93 -0
- package/dist/components/Typography/Typography.js +49 -0
- package/dist/components/Upload/Upload.js +58 -0
- package/dist/components/VirtualList/VirtualList.js +36 -0
- package/dist/haze-ui.css +1 -1
- package/dist/index.js +70 -2
- package/dist/types/components/Affix/Affix.d.ts +10 -0
- package/dist/types/components/Affix/index.d.ts +2 -0
- package/dist/types/components/Alert/Alert.d.ts +4 -1
- package/dist/types/components/ApprovalCard/ApprovalCard.d.ts +13 -0
- package/dist/types/components/ApprovalCard/index.d.ts +2 -0
- package/dist/types/components/AspectRatio/AspectRatio.d.ts +8 -0
- package/dist/types/components/AspectRatio/index.d.ts +2 -0
- package/dist/types/components/BackToTop/BackToTop.d.ts +7 -0
- package/dist/types/components/BackToTop/index.d.ts +2 -0
- package/dist/types/components/Banner/Banner.d.ts +11 -0
- package/dist/types/components/Banner/index.d.ts +2 -0
- package/dist/types/components/BottomSheet/BottomSheet.d.ts +10 -0
- package/dist/types/components/BottomSheet/index.d.ts +2 -0
- package/dist/types/components/ChatContainer/ChatContainer.d.ts +8 -0
- package/dist/types/components/ChatContainer/index.d.ts +2 -0
- package/dist/types/components/ChatInput/ChatInput.d.ts +11 -0
- package/dist/types/components/ChatInput/index.d.ts +2 -0
- package/dist/types/components/ChatMessage/ChatMessage.d.ts +13 -0
- package/dist/types/components/ChatMessage/index.d.ts +2 -0
- package/dist/types/components/Chip/Chip.d.ts +11 -0
- package/dist/types/components/Chip/index.d.ts +2 -0
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +8 -0
- package/dist/types/components/CodeBlock/index.d.ts +2 -0
- package/dist/types/components/Collapsible/Collapsible.d.ts +20 -0
- package/dist/types/components/Collapsible/index.d.ts +2 -0
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +9 -0
- package/dist/types/components/ColorPicker/index.d.ts +2 -0
- package/dist/types/components/Combobox/Combobox.d.ts +2 -1
- package/dist/types/components/Command/Command.d.ts +25 -0
- package/dist/types/components/Command/index.d.ts +2 -0
- package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +16 -0
- package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/types/components/Container/Container.d.ts +8 -0
- package/dist/types/components/Container/index.d.ts +2 -0
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +10 -0
- package/dist/types/components/ContextMenu/ContextMenuContent.d.ts +7 -0
- package/dist/types/components/ContextMenu/ContextMenuContext.d.ts +11 -0
- package/dist/types/components/ContextMenu/ContextMenuItem.d.ts +9 -0
- package/dist/types/components/ContextMenu/ContextMenuSeparator.d.ts +5 -0
- package/dist/types/components/ContextMenu/ContextMenuTrigger.d.ts +7 -0
- package/dist/types/components/ContextMenu/index.d.ts +10 -0
- package/dist/types/components/ConversationList/ConversationItem.d.ts +11 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +7 -0
- package/dist/types/components/ConversationList/index.d.ts +4 -0
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +12 -0
- package/dist/types/components/DateRangePicker/index.d.ts +2 -0
- package/dist/types/components/Datepicker/Datepicker.d.ts +2 -1
- package/dist/types/components/DiffViewer/DiffViewer.d.ts +13 -0
- package/dist/types/components/DiffViewer/index.d.ts +2 -0
- package/dist/types/components/Divider/Divider.d.ts +6 -0
- package/dist/types/components/Divider/index.d.ts +2 -0
- package/dist/types/components/Drawer/Drawer.d.ts +11 -0
- package/dist/types/components/Drawer/index.d.ts +2 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +10 -0
- package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +8 -0
- package/dist/types/components/DropdownMenu/DropdownMenuContext.d.ts +8 -0
- package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +7 -0
- package/dist/types/components/DropdownMenu/index.d.ts +10 -0
- package/dist/types/components/Empty/Empty.d.ts +9 -0
- package/dist/types/components/Empty/index.d.ts +2 -0
- package/dist/types/components/Grid/Grid.d.ts +9 -0
- package/dist/types/components/Grid/GridItem.d.ts +9 -0
- package/dist/types/components/Grid/index.d.ts +4 -0
- package/dist/types/components/InlineEdit/InlineEdit.d.ts +10 -0
- package/dist/types/components/InlineEdit/index.d.ts +2 -0
- package/dist/types/components/LogViewer/LogViewer.d.ts +14 -0
- package/dist/types/components/LogViewer/index.d.ts +2 -0
- package/dist/types/components/MarkdownRenderer/MarkdownRenderer.d.ts +6 -0
- package/dist/types/components/MarkdownRenderer/index.d.ts +2 -0
- package/dist/types/components/ModelPicker/ModelPicker.d.ts +16 -0
- package/dist/types/components/ModelPicker/index.d.ts +2 -0
- package/dist/types/components/NavigationBar/NavLink.d.ts +10 -0
- package/dist/types/components/NavigationBar/NavigationBar.d.ts +9 -0
- package/dist/types/components/NavigationBar/index.d.ts +4 -0
- package/dist/types/components/OTPInput/OTPInput.d.ts +9 -0
- package/dist/types/components/OTPInput/index.d.ts +2 -0
- package/dist/types/components/Pagination/Pagination.d.ts +11 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +10 -0
- package/dist/types/components/PasswordInput/index.d.ts +2 -0
- package/dist/types/components/Progress/Progress.d.ts +9 -0
- package/dist/types/components/Progress/index.d.ts +2 -0
- package/dist/types/components/Rating/Rating.d.ts +10 -0
- package/dist/types/components/Rating/index.d.ts +2 -0
- package/dist/types/components/Resizable/Resizable.d.ts +18 -0
- package/dist/types/components/Resizable/index.d.ts +2 -0
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +8 -0
- package/dist/types/components/ScrollArea/index.d.ts +2 -0
- package/dist/types/components/Segmented/Segmented.d.ts +16 -0
- package/dist/types/components/Segmented/index.d.ts +2 -0
- package/dist/types/components/Spinner/Spinner.d.ts +6 -0
- package/dist/types/components/Spinner/index.d.ts +2 -0
- package/dist/types/components/Stat/Stat.d.ts +18 -0
- package/dist/types/components/Stat/index.d.ts +2 -0
- package/dist/types/components/StepTimeline/StepTimeline.d.ts +17 -0
- package/dist/types/components/StepTimeline/index.d.ts +2 -0
- package/dist/types/components/Stepper/Step.d.ts +8 -0
- package/dist/types/components/Stepper/Stepper.d.ts +9 -0
- package/dist/types/components/Stepper/StepperContext.d.ts +9 -0
- package/dist/types/components/Stepper/index.d.ts +4 -0
- package/dist/types/components/StreamingText/StreamingText.d.ts +9 -0
- package/dist/types/components/StreamingText/index.d.ts +2 -0
- package/dist/types/components/SwipeAction/SwipeAction.d.ts +12 -0
- package/dist/types/components/SwipeAction/index.d.ts +2 -0
- package/dist/types/components/TagGroup/TagGroup.d.ts +7 -0
- package/dist/types/components/TagGroup/TagGroupItem.d.ts +8 -0
- package/dist/types/components/TagGroup/index.d.ts +4 -0
- package/dist/types/components/TagInput/TagInput.d.ts +11 -0
- package/dist/types/components/TagInput/index.d.ts +2 -0
- package/dist/types/components/ThinkingIndicator/ThinkingIndicator.d.ts +6 -0
- package/dist/types/components/ThinkingIndicator/index.d.ts +2 -0
- package/dist/types/components/TimePicker/TimePicker.d.ts +10 -0
- package/dist/types/components/TimePicker/index.d.ts +2 -0
- package/dist/types/components/Timeline/Timeline.d.ts +15 -0
- package/dist/types/components/Timeline/index.d.ts +2 -0
- package/dist/types/components/TokenCounter/TokenCounter.d.ts +8 -0
- package/dist/types/components/TokenCounter/index.d.ts +2 -0
- package/dist/types/components/ToolCallCard/ToolCallCard.d.ts +11 -0
- package/dist/types/components/ToolCallCard/index.d.ts +2 -0
- package/dist/types/components/Transfer/Transfer.d.ts +14 -0
- package/dist/types/components/Transfer/index.d.ts +2 -0
- package/dist/types/components/Typography/Typography.d.ts +22 -0
- package/dist/types/components/Typography/index.d.ts +2 -0
- package/dist/types/components/Upload/Upload.d.ts +10 -0
- package/dist/types/components/Upload/index.d.ts +2 -0
- package/dist/types/components/VirtualList/VirtualList.d.ts +10 -0
- package/dist/types/components/VirtualList/index.d.ts +2 -0
- package/dist/types/index.d.ts +110 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { useControl as r } from "react-use-control";
|
|
5
|
+
//#region src/lib/components/ConfirmDialog/ConfirmDialog.tsx
|
|
6
|
+
var i = "haze-ConfirmDialog__overlay", a = "haze-ConfirmDialog__dialog", o = "haze-ConfirmDialog__header", s = "haze-ConfirmDialog__body", c = "haze-ConfirmDialog__footer", l = "haze-ConfirmDialog__btn", u = "haze-ConfirmDialog__cancelBtn", d = "haze-ConfirmDialog__confirmBtn", f = "haze-ConfirmDialog__dangerBtn";
|
|
7
|
+
function p({ open: p, onClose: m, onConfirm: h, onCancel: g, title: _, children: v, confirmText: y = "Confirm", cancelText: b = "Cancel", variant: x = "default", className: S }) {
|
|
8
|
+
let [C, w] = r(p, !1);
|
|
9
|
+
if (!C) return null;
|
|
10
|
+
let T = () => {
|
|
11
|
+
w(!1), m?.();
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
onClick: T,
|
|
15
|
+
className: e([i, S]),
|
|
16
|
+
children: /* @__PURE__ */ n("div", {
|
|
17
|
+
onClick: (e) => e.stopPropagation(),
|
|
18
|
+
className: e([a]),
|
|
19
|
+
children: [
|
|
20
|
+
_ && /* @__PURE__ */ t("div", {
|
|
21
|
+
className: e([o]),
|
|
22
|
+
children: _
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ t("div", {
|
|
25
|
+
className: e([s]),
|
|
26
|
+
children: v
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ n("div", {
|
|
29
|
+
className: e([c]),
|
|
30
|
+
children: [/* @__PURE__ */ t("button", {
|
|
31
|
+
type: "button",
|
|
32
|
+
onClick: () => {
|
|
33
|
+
g?.(), T();
|
|
34
|
+
},
|
|
35
|
+
className: e([l, u]),
|
|
36
|
+
children: b
|
|
37
|
+
}), /* @__PURE__ */ t("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: () => {
|
|
40
|
+
h?.(), T();
|
|
41
|
+
},
|
|
42
|
+
className: e([l, x === "danger" ? f : d]),
|
|
43
|
+
children: y
|
|
44
|
+
})]
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { p as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/Container/Container.tsx
|
|
5
|
+
var n = "haze-Container__container", r = {
|
|
6
|
+
sm: "haze-Container__sm",
|
|
7
|
+
md: "haze-Container__md",
|
|
8
|
+
lg: "haze-Container__lg",
|
|
9
|
+
xl: "haze-Container__xl",
|
|
10
|
+
full: "haze-Container__full"
|
|
11
|
+
};
|
|
12
|
+
function i({ size: i = "lg", children: a, className: o }) {
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
className: e([
|
|
15
|
+
n,
|
|
16
|
+
r[i],
|
|
17
|
+
o
|
|
18
|
+
]),
|
|
19
|
+
children: a
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { i as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ContextMenuProvider as e } from "./ContextMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { useControl as r } from "react-use-control";
|
|
6
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
7
|
+
//#region src/lib/components/ContextMenu/ContextMenu.tsx
|
|
8
|
+
var c = "haze-ContextMenu__wrapper";
|
|
9
|
+
function l({ open: l, onOpenChange: u, children: d, className: f }) {
|
|
10
|
+
let [p, m] = r(l, !1), [h, g] = s(0), [_, v] = s(0), y = o(null), b = i((e) => {
|
|
11
|
+
let t = typeof e == "function" ? e(p) : e;
|
|
12
|
+
m(t), u?.(t);
|
|
13
|
+
}, [
|
|
14
|
+
p,
|
|
15
|
+
m,
|
|
16
|
+
u
|
|
17
|
+
]), x = i((e, t) => {
|
|
18
|
+
g(e), v(t);
|
|
19
|
+
}, []);
|
|
20
|
+
return a(() => {
|
|
21
|
+
if (!p) return;
|
|
22
|
+
let e = (e) => {
|
|
23
|
+
y.current && !y.current.contains(e.target) && b(!1);
|
|
24
|
+
};
|
|
25
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
26
|
+
}, [p, b]), /* @__PURE__ */ n(e, {
|
|
27
|
+
value: {
|
|
28
|
+
open: p,
|
|
29
|
+
setOpen: b,
|
|
30
|
+
x: h,
|
|
31
|
+
y: _,
|
|
32
|
+
setPosition: x
|
|
33
|
+
},
|
|
34
|
+
children: /* @__PURE__ */ n("div", {
|
|
35
|
+
ref: y,
|
|
36
|
+
className: t([c, f]),
|
|
37
|
+
children: d
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { l as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useContextMenuContext as e } from "./ContextMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/ContextMenu/ContextMenuContent.tsx
|
|
6
|
+
var r = "haze-ContextMenuContent__content";
|
|
7
|
+
function i({ children: i, className: a }) {
|
|
8
|
+
let { open: o, x: s, y: c } = e();
|
|
9
|
+
return o ? /* @__PURE__ */ n("div", {
|
|
10
|
+
style: {
|
|
11
|
+
left: s,
|
|
12
|
+
top: c
|
|
13
|
+
},
|
|
14
|
+
className: t([r, a]),
|
|
15
|
+
children: i
|
|
16
|
+
}) : null;
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { i as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
//#region src/lib/components/ContextMenu/ContextMenuContext.ts
|
|
3
|
+
var n = e(void 0), r = n.Provider;
|
|
4
|
+
function i() {
|
|
5
|
+
let e = t(n);
|
|
6
|
+
if (!e) throw Error("ContextMenu components must be used within <ContextMenu>");
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as ContextMenuProvider, i as useContextMenuContext };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useContextMenuContext as e } from "./ContextMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/ContextMenu/ContextMenuItem.tsx
|
|
6
|
+
var r = "haze-ContextMenuItem__item";
|
|
7
|
+
function i({ children: i, onClick: a, disabled: o, className: s }) {
|
|
8
|
+
let { setOpen: c } = e();
|
|
9
|
+
return /* @__PURE__ */ n("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
onClick: () => {
|
|
12
|
+
o || (a?.(), c(!1));
|
|
13
|
+
},
|
|
14
|
+
disabled: o,
|
|
15
|
+
className: t([r, s]),
|
|
16
|
+
children: i
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/ContextMenu/ContextMenuSeparator.tsx
|
|
5
|
+
var n = "haze-ContextMenuSeparator__separator";
|
|
6
|
+
function r({ className: r }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
role: "separator",
|
|
9
|
+
className: e([n, r])
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useContextMenuContext as e } from "./ContextMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/ContextMenu/ContextMenuTrigger.tsx
|
|
6
|
+
var r = "haze-ContextMenuTrigger__trigger";
|
|
7
|
+
function i({ children: i, className: a }) {
|
|
8
|
+
let { setOpen: o, setPosition: s } = e();
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
onContextMenu: (e) => {
|
|
11
|
+
e.preventDefault(), s(e.clientX, e.clientY), o(!0);
|
|
12
|
+
},
|
|
13
|
+
className: t([r, a]),
|
|
14
|
+
children: i
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { i as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/ConversationList/ConversationItem.tsx
|
|
5
|
+
var r = "haze-ConversationItem__item", i = "haze-ConversationItem__activeItem", a = "haze-ConversationItem__body", o = "haze-ConversationItem__titleStyle", s = "haze-ConversationItem__subtitleStyle", c = "haze-ConversationItem__endSlot";
|
|
6
|
+
function l({ title: l, subtitle: u, active: d, onClick: f, end: p, className: m }) {
|
|
7
|
+
return /* @__PURE__ */ n("button", {
|
|
8
|
+
type: "button",
|
|
9
|
+
onClick: f,
|
|
10
|
+
"aria-current": d ? "true" : void 0,
|
|
11
|
+
className: e([
|
|
12
|
+
r,
|
|
13
|
+
d && i,
|
|
14
|
+
m
|
|
15
|
+
]),
|
|
16
|
+
children: [/* @__PURE__ */ n("div", {
|
|
17
|
+
className: e([a]),
|
|
18
|
+
children: [/* @__PURE__ */ t("div", {
|
|
19
|
+
className: e([o]),
|
|
20
|
+
children: l
|
|
21
|
+
}), u && /* @__PURE__ */ t("div", {
|
|
22
|
+
className: e([s]),
|
|
23
|
+
children: u
|
|
24
|
+
})]
|
|
25
|
+
}), p && /* @__PURE__ */ t("div", {
|
|
26
|
+
className: e([c]),
|
|
27
|
+
children: p
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { l as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/ConversationList/ConversationList.tsx
|
|
5
|
+
var n = "haze-ConversationList__list";
|
|
6
|
+
function r({ children: r, className: i }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
className: e([n, i]),
|
|
9
|
+
children: r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { useControl as r } from "react-use-control";
|
|
5
|
+
//#region src/lib/components/DateRangePicker/DateRangePicker.tsx
|
|
6
|
+
var i = "haze-DateRangePicker__container", a = "haze-DateRangePicker__input", o = "haze-DateRangePicker__sep";
|
|
7
|
+
function s({ startDate: s, endDate: c, onStartChange: l, onEndChange: u, separator: d = "–", className: f }) {
|
|
8
|
+
let [p, m] = r(s, ""), [h, g] = r(c, "");
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
className: e([i, f]),
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ t("input", {
|
|
13
|
+
type: "date",
|
|
14
|
+
value: p,
|
|
15
|
+
onChange: (e) => {
|
|
16
|
+
let t = e.target.value;
|
|
17
|
+
m(t), l?.(t);
|
|
18
|
+
},
|
|
19
|
+
className: e([a])
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ t("span", {
|
|
22
|
+
className: e([o]),
|
|
23
|
+
children: d
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ t("input", {
|
|
26
|
+
type: "date",
|
|
27
|
+
value: h,
|
|
28
|
+
onChange: (e) => {
|
|
29
|
+
let t = e.target.value;
|
|
30
|
+
g(t), u?.(t);
|
|
31
|
+
},
|
|
32
|
+
className: e([a])
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { s as default };
|
|
@@ -3,30 +3,30 @@ import e from "./Calendar.js";
|
|
|
3
3
|
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
import { useControl as i } from "react-use-control";
|
|
6
|
-
import { useEffect as a, useRef as o
|
|
6
|
+
import { useEffect as a, useRef as o } from "react";
|
|
7
7
|
//#region src/lib/components/Datepicker/Datepicker.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
let [_, v] = i(
|
|
8
|
+
var s = "haze-Datepicker__wrapper", c = "haze-Datepicker__input", l = "haze-Datepicker__dropdown", u = "haze-Datepicker__hiddenStyle";
|
|
9
|
+
function d({ value: d, open: f, min: p, max: m, placeholder: h = "Select date", className: g }) {
|
|
10
|
+
let [_, v] = i(d, ""), [y, b] = i(f, !1), x = o(null);
|
|
11
11
|
return a(() => {
|
|
12
12
|
if (!y) return;
|
|
13
13
|
let e = (e) => {
|
|
14
14
|
x.current && !x.current.contains(e.target) && b(!1);
|
|
15
15
|
};
|
|
16
16
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
17
|
-
}, [y]), /* @__PURE__ */ r("div", {
|
|
17
|
+
}, [y, b]), /* @__PURE__ */ r("div", {
|
|
18
18
|
ref: x,
|
|
19
|
-
className: t([
|
|
19
|
+
className: t([s, g]),
|
|
20
20
|
children: [/* @__PURE__ */ n("input", {
|
|
21
21
|
readOnly: !0,
|
|
22
|
-
className:
|
|
22
|
+
className: c,
|
|
23
23
|
value: _,
|
|
24
24
|
placeholder: h,
|
|
25
25
|
onClick: () => b((e) => !e),
|
|
26
26
|
"aria-haspopup": "dialog",
|
|
27
27
|
"aria-expanded": y
|
|
28
28
|
}), /* @__PURE__ */ n("div", {
|
|
29
|
-
className: t([
|
|
29
|
+
className: t([l, !y && u]),
|
|
30
30
|
children: /* @__PURE__ */ n(e, {
|
|
31
31
|
value: _,
|
|
32
32
|
min: p,
|
|
@@ -39,4 +39,4 @@ function f({ value: f, min: p, max: m, placeholder: h = "Select date", className
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
|
-
export {
|
|
42
|
+
export { d as default };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { useMemo as r } from "react";
|
|
5
|
+
//#region src/lib/components/DiffViewer/DiffViewer.tsx
|
|
6
|
+
var i = "haze-DiffViewer__wrapper", a = "haze-DiffViewer__header", o = "haze-DiffViewer__body", s = "haze-DiffViewer__line", c = "haze-DiffViewer__lineNum", l = "haze-DiffViewer__lineContent", u = "haze-DiffViewer__added", d = "haze-DiffViewer__removed", f = "haze-DiffViewer__addedPrefix", p = "haze-DiffViewer__removedPrefix";
|
|
7
|
+
function m(e, t) {
|
|
8
|
+
let n = e.split("\n"), r = t.split("\n"), i = [], a = 0, o = 0;
|
|
9
|
+
for (; a < n.length || o < r.length;) {
|
|
10
|
+
let e = n[a], t = r[o];
|
|
11
|
+
a >= n.length ? (i.push({
|
|
12
|
+
type: "added",
|
|
13
|
+
content: t,
|
|
14
|
+
newLine: o + 1
|
|
15
|
+
}), o++) : o >= r.length ? (i.push({
|
|
16
|
+
type: "removed",
|
|
17
|
+
content: e,
|
|
18
|
+
oldLine: a + 1
|
|
19
|
+
}), a++) : e === t ? (i.push({
|
|
20
|
+
type: "unchanged",
|
|
21
|
+
content: e,
|
|
22
|
+
oldLine: a + 1,
|
|
23
|
+
newLine: o + 1
|
|
24
|
+
}), a++, o++) : (i.push({
|
|
25
|
+
type: "removed",
|
|
26
|
+
content: e,
|
|
27
|
+
oldLine: a + 1
|
|
28
|
+
}), i.push({
|
|
29
|
+
type: "added",
|
|
30
|
+
content: t,
|
|
31
|
+
newLine: o + 1
|
|
32
|
+
}), a++, o++);
|
|
33
|
+
}
|
|
34
|
+
return i;
|
|
35
|
+
}
|
|
36
|
+
function h({ oldValue: s, newValue: h, className: _ }) {
|
|
37
|
+
let v = r(() => m(s, h), [s, h]);
|
|
38
|
+
return /* @__PURE__ */ n("div", {
|
|
39
|
+
className: e([i, _]),
|
|
40
|
+
children: [/* @__PURE__ */ t("div", {
|
|
41
|
+
className: e([a]),
|
|
42
|
+
children: "Diff"
|
|
43
|
+
}), /* @__PURE__ */ t("div", {
|
|
44
|
+
className: e([o]),
|
|
45
|
+
children: v.map((r, i) => /* @__PURE__ */ n("div", {
|
|
46
|
+
className: e([
|
|
47
|
+
g,
|
|
48
|
+
r.type === "added" && u,
|
|
49
|
+
r.type === "removed" && d
|
|
50
|
+
]),
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ t("span", {
|
|
53
|
+
className: e([c]),
|
|
54
|
+
children: r.oldLine ?? ""
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ t("span", {
|
|
57
|
+
className: e([c]),
|
|
58
|
+
children: r.newLine ?? ""
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ n("span", {
|
|
61
|
+
className: e([l]),
|
|
62
|
+
children: [
|
|
63
|
+
r.type === "added" && /* @__PURE__ */ t("span", {
|
|
64
|
+
className: e([f]),
|
|
65
|
+
children: "+ "
|
|
66
|
+
}),
|
|
67
|
+
r.type === "removed" && /* @__PURE__ */ t("span", {
|
|
68
|
+
className: e([p]),
|
|
69
|
+
children: "- "
|
|
70
|
+
}),
|
|
71
|
+
r.content
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
}, i))
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
var g = s;
|
|
80
|
+
//#endregion
|
|
81
|
+
export { h as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/Divider/Divider.tsx
|
|
5
|
+
var n = "haze-Divider__base", r = "haze-Divider__horizontal", i = "haze-Divider__vertical";
|
|
6
|
+
function a({ orientation: a = "horizontal", className: o }) {
|
|
7
|
+
return a === "vertical" ? /* @__PURE__ */ t("div", {
|
|
8
|
+
role: "separator",
|
|
9
|
+
"aria-orientation": "vertical",
|
|
10
|
+
className: e([
|
|
11
|
+
n,
|
|
12
|
+
i,
|
|
13
|
+
o
|
|
14
|
+
])
|
|
15
|
+
}) : /* @__PURE__ */ t("hr", {
|
|
16
|
+
role: "separator",
|
|
17
|
+
className: e([
|
|
18
|
+
n,
|
|
19
|
+
r,
|
|
20
|
+
o
|
|
21
|
+
])
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { useControl as n } from "react-use-control";
|
|
5
|
+
import { useEffect as r, useRef as i } from "react";
|
|
6
|
+
//#region src/lib/components/Drawer/Drawer.tsx
|
|
7
|
+
var a = "haze-Drawer__overlay", o = {
|
|
8
|
+
left: "haze-Drawer__left",
|
|
9
|
+
right: "haze-Drawer__right",
|
|
10
|
+
top: "haze-Drawer__top",
|
|
11
|
+
bottom: "haze-Drawer__bottom"
|
|
12
|
+
};
|
|
13
|
+
function s({ open: s, placement: c = "right", onClose: l, className: u, children: d }) {
|
|
14
|
+
let [f, p] = n(s, !1), m = i(null);
|
|
15
|
+
return r(() => {
|
|
16
|
+
let e = m.current;
|
|
17
|
+
e && (f && !e.open ? e.showModal() : !f && e.open && e.close());
|
|
18
|
+
}, [f]), /* @__PURE__ */ t("dialog", {
|
|
19
|
+
ref: m,
|
|
20
|
+
onClose: () => {
|
|
21
|
+
p(!1), l?.();
|
|
22
|
+
},
|
|
23
|
+
onClick: (e) => {
|
|
24
|
+
e.target === m.current && (p(!1), l?.());
|
|
25
|
+
},
|
|
26
|
+
className: e([
|
|
27
|
+
a,
|
|
28
|
+
o[c],
|
|
29
|
+
u
|
|
30
|
+
]),
|
|
31
|
+
children: d
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { s as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DropdownMenuProvider as e } from "./DropdownMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { useControl as r } from "react-use-control";
|
|
6
|
+
import { useCallback as i, useEffect as a, useRef as o } from "react";
|
|
7
|
+
//#region src/lib/components/DropdownMenu/DropdownMenu.tsx
|
|
8
|
+
var s = "haze-DropdownMenu__wrapper";
|
|
9
|
+
function c({ open: c, onOpenChange: l, children: u, className: d }) {
|
|
10
|
+
let [f, p] = r(c, !1), m = o(null), h = i((e) => {
|
|
11
|
+
let t = typeof e == "function" ? e(f) : e;
|
|
12
|
+
p(t), l?.(t);
|
|
13
|
+
}, [
|
|
14
|
+
f,
|
|
15
|
+
p,
|
|
16
|
+
l
|
|
17
|
+
]);
|
|
18
|
+
return a(() => {
|
|
19
|
+
if (!f) return;
|
|
20
|
+
let e = (e) => {
|
|
21
|
+
m.current && !m.current.contains(e.target) && h(!1);
|
|
22
|
+
};
|
|
23
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
24
|
+
}, [f, h]), /* @__PURE__ */ n(e, {
|
|
25
|
+
value: {
|
|
26
|
+
open: f,
|
|
27
|
+
setOpen: h
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ n("div", {
|
|
30
|
+
ref: m,
|
|
31
|
+
className: t([s, d]),
|
|
32
|
+
children: u
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { c as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useDropdownMenuContext as e } from "./DropdownMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/DropdownMenu/DropdownMenuContent.tsx
|
|
6
|
+
var r = "haze-DropdownMenuContent__content", i = {
|
|
7
|
+
start: "haze-DropdownMenuContent__alignStart",
|
|
8
|
+
center: "haze-DropdownMenuContent__alignCenter",
|
|
9
|
+
end: "haze-DropdownMenuContent__alignEnd"
|
|
10
|
+
};
|
|
11
|
+
function a({ children: a, align: o = "start", className: s }) {
|
|
12
|
+
let { open: c } = e();
|
|
13
|
+
return c ? /* @__PURE__ */ n("div", {
|
|
14
|
+
className: t([
|
|
15
|
+
r,
|
|
16
|
+
i[o],
|
|
17
|
+
s
|
|
18
|
+
]),
|
|
19
|
+
children: a
|
|
20
|
+
}) : null;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext as e, useContext as t } from "react";
|
|
2
|
+
//#region src/lib/components/DropdownMenu/DropdownMenuContext.ts
|
|
3
|
+
var n = e(void 0), r = n.Provider;
|
|
4
|
+
function i() {
|
|
5
|
+
let e = t(n);
|
|
6
|
+
if (!e) throw Error("DropdownMenu components must be used within <DropdownMenu>");
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { r as DropdownMenuProvider, i as useDropdownMenuContext };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useDropdownMenuContext as e } from "./DropdownMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/DropdownMenu/DropdownMenuItem.tsx
|
|
6
|
+
var r = "haze-DropdownMenuItem__item";
|
|
7
|
+
function i({ children: i, onClick: a, disabled: o, className: s }) {
|
|
8
|
+
let { setOpen: c } = e();
|
|
9
|
+
return /* @__PURE__ */ n("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
onClick: () => {
|
|
12
|
+
o || (a?.(), c(!1));
|
|
13
|
+
},
|
|
14
|
+
disabled: o,
|
|
15
|
+
className: t([r, s]),
|
|
16
|
+
children: i
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/components/DropdownMenu/DropdownMenuSeparator.tsx
|
|
5
|
+
var n = "haze-DropdownMenuSeparator__separator";
|
|
6
|
+
function r({ className: r }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
role: "separator",
|
|
9
|
+
className: e([n, r])
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { r as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useDropdownMenuContext as e } from "./DropdownMenuContext.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/DropdownMenu/DropdownMenuTrigger.tsx
|
|
6
|
+
var r = "haze-DropdownMenuTrigger__trigger";
|
|
7
|
+
function i({ children: i, className: a }) {
|
|
8
|
+
let { setOpen: o } = e();
|
|
9
|
+
return /* @__PURE__ */ n("button", {
|
|
10
|
+
type: "button",
|
|
11
|
+
onClick: () => o((e) => !e),
|
|
12
|
+
className: t([r, a]),
|
|
13
|
+
children: i
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as default };
|