haze-ui 1.5.6 → 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.
Files changed (208) hide show
  1. package/dist/components/Affix/Affix.js +22 -0
  2. package/dist/components/Alert/Alert.js +14 -10
  3. package/dist/components/ApprovalCard/ApprovalCard.js +42 -0
  4. package/dist/components/AspectRatio/AspectRatio.js +17 -0
  5. package/dist/components/BackToTop/BackToTop.js +28 -0
  6. package/dist/components/Banner/Banner.js +36 -0
  7. package/dist/components/BottomSheet/BottomSheet.js +22 -0
  8. package/dist/components/ChatContainer/ChatContainer.js +25 -0
  9. package/dist/components/ChatInput/ChatInput.js +45 -0
  10. package/dist/components/ChatMessage/ChatMessage.js +45 -0
  11. package/dist/components/Chip/Chip.js +42 -0
  12. package/dist/components/CodeBlock/CodeBlock.js +19 -0
  13. package/dist/components/Collapsible/Collapsible.js +46 -0
  14. package/dist/components/ColorPicker/ColorPicker.js +45 -0
  15. package/dist/components/Combobox/Combobox.js +23 -23
  16. package/dist/components/Command/Command.js +58 -0
  17. package/dist/components/ConfirmDialog/ConfirmDialog.js +51 -0
  18. package/dist/components/Container/Container.js +23 -0
  19. package/dist/components/ContextMenu/ContextMenu.js +42 -0
  20. package/dist/components/ContextMenu/ContextMenuContent.js +19 -0
  21. package/dist/components/ContextMenu/ContextMenuContext.js +10 -0
  22. package/dist/components/ContextMenu/ContextMenuItem.js +20 -0
  23. package/dist/components/ContextMenu/ContextMenuSeparator.js +13 -0
  24. package/dist/components/ContextMenu/ContextMenuTrigger.js +18 -0
  25. package/dist/components/ConversationList/ConversationItem.js +32 -0
  26. package/dist/components/ConversationList/ConversationList.js +13 -0
  27. package/dist/components/DateRangePicker/DateRangePicker.js +38 -0
  28. package/dist/components/Datepicker/Datepicker.js +9 -9
  29. package/dist/components/DiffViewer/DiffViewer.js +81 -0
  30. package/dist/components/Divider/Divider.js +25 -0
  31. package/dist/components/Drawer/Drawer.js +35 -0
  32. package/dist/components/DropdownMenu/DropdownMenu.js +37 -0
  33. package/dist/components/DropdownMenu/DropdownMenuContent.js +23 -0
  34. package/dist/components/DropdownMenu/DropdownMenuContext.js +10 -0
  35. package/dist/components/DropdownMenu/DropdownMenuItem.js +20 -0
  36. package/dist/components/DropdownMenu/DropdownMenuSeparator.js +13 -0
  37. package/dist/components/DropdownMenu/DropdownMenuTrigger.js +17 -0
  38. package/dist/components/Empty/Empty.js +67 -0
  39. package/dist/components/Grid/Grid.js +17 -0
  40. package/dist/components/Grid/GridItem.js +11 -0
  41. package/dist/components/InlineEdit/InlineEdit.js +45 -0
  42. package/dist/components/LogViewer/LogViewer.js +65 -0
  43. package/dist/components/MarkdownRenderer/MarkdownRenderer.js +24 -0
  44. package/dist/components/ModelPicker/ModelPicker.js +26 -0
  45. package/dist/components/NavigationBar/NavLink.js +22 -0
  46. package/dist/components/NavigationBar/NavigationBar.js +26 -0
  47. package/dist/components/OTPInput/OTPInput.js +50 -0
  48. package/dist/components/Pagination/Pagination.js +58 -0
  49. package/dist/components/PasswordInput/PasswordInput.js +32 -0
  50. package/dist/components/Progress/Progress.js +83 -0
  51. package/dist/components/Rating/Rating.js +49 -0
  52. package/dist/components/Resizable/Resizable.js +56 -0
  53. package/dist/components/ScrollArea/ScrollArea.js +14 -0
  54. package/dist/components/Segmented/Segmented.js +42 -0
  55. package/dist/components/Spinner/Spinner.js +39 -0
  56. package/dist/components/Stat/Stat.js +52 -0
  57. package/dist/components/StepTimeline/StepTimeline.js +36 -0
  58. package/dist/components/Stepper/Step.js +38 -0
  59. package/dist/components/Stepper/Stepper.js +25 -0
  60. package/dist/components/Stepper/StepperContext.js +10 -0
  61. package/dist/components/StreamingText/StreamingText.js +34 -0
  62. package/dist/components/SwipeAction/SwipeAction.js +45 -0
  63. package/dist/components/Table/Table.js +14 -11
  64. package/dist/components/TagGroup/TagGroup.js +14 -0
  65. package/dist/components/TagGroup/TagGroupItem.js +19 -0
  66. package/dist/components/TagInput/TagInput.js +51 -0
  67. package/dist/components/ThinkingIndicator/ThinkingIndicator.js +20 -0
  68. package/dist/components/TimePicker/TimePicker.js +22 -0
  69. package/dist/components/Timeline/Timeline.js +47 -0
  70. package/dist/components/TokenCounter/TokenCounter.js +30 -0
  71. package/dist/components/ToolCallCard/ToolCallCard.js +57 -0
  72. package/dist/components/Transfer/Transfer.js +93 -0
  73. package/dist/components/Typography/Typography.js +49 -0
  74. package/dist/components/Upload/Upload.js +58 -0
  75. package/dist/components/VirtualList/VirtualList.js +36 -0
  76. package/dist/haze-ui.css +1 -1
  77. package/dist/index.js +70 -2
  78. package/dist/types/components/Affix/Affix.d.ts +10 -0
  79. package/dist/types/components/Affix/index.d.ts +2 -0
  80. package/dist/types/components/Alert/Alert.d.ts +4 -1
  81. package/dist/types/components/ApprovalCard/ApprovalCard.d.ts +13 -0
  82. package/dist/types/components/ApprovalCard/index.d.ts +2 -0
  83. package/dist/types/components/AspectRatio/AspectRatio.d.ts +8 -0
  84. package/dist/types/components/AspectRatio/index.d.ts +2 -0
  85. package/dist/types/components/BackToTop/BackToTop.d.ts +7 -0
  86. package/dist/types/components/BackToTop/index.d.ts +2 -0
  87. package/dist/types/components/Banner/Banner.d.ts +11 -0
  88. package/dist/types/components/Banner/index.d.ts +2 -0
  89. package/dist/types/components/BottomSheet/BottomSheet.d.ts +10 -0
  90. package/dist/types/components/BottomSheet/index.d.ts +2 -0
  91. package/dist/types/components/ChatContainer/ChatContainer.d.ts +8 -0
  92. package/dist/types/components/ChatContainer/index.d.ts +2 -0
  93. package/dist/types/components/ChatInput/ChatInput.d.ts +11 -0
  94. package/dist/types/components/ChatInput/index.d.ts +2 -0
  95. package/dist/types/components/ChatMessage/ChatMessage.d.ts +13 -0
  96. package/dist/types/components/ChatMessage/index.d.ts +2 -0
  97. package/dist/types/components/Chip/Chip.d.ts +11 -0
  98. package/dist/types/components/Chip/index.d.ts +2 -0
  99. package/dist/types/components/CodeBlock/CodeBlock.d.ts +8 -0
  100. package/dist/types/components/CodeBlock/index.d.ts +2 -0
  101. package/dist/types/components/Collapsible/Collapsible.d.ts +20 -0
  102. package/dist/types/components/Collapsible/index.d.ts +2 -0
  103. package/dist/types/components/ColorPicker/ColorPicker.d.ts +9 -0
  104. package/dist/types/components/ColorPicker/index.d.ts +2 -0
  105. package/dist/types/components/Combobox/Combobox.d.ts +2 -1
  106. package/dist/types/components/Command/Command.d.ts +25 -0
  107. package/dist/types/components/Command/index.d.ts +2 -0
  108. package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +16 -0
  109. package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
  110. package/dist/types/components/Container/Container.d.ts +8 -0
  111. package/dist/types/components/Container/index.d.ts +2 -0
  112. package/dist/types/components/ContextMenu/ContextMenu.d.ts +10 -0
  113. package/dist/types/components/ContextMenu/ContextMenuContent.d.ts +7 -0
  114. package/dist/types/components/ContextMenu/ContextMenuContext.d.ts +11 -0
  115. package/dist/types/components/ContextMenu/ContextMenuItem.d.ts +9 -0
  116. package/dist/types/components/ContextMenu/ContextMenuSeparator.d.ts +5 -0
  117. package/dist/types/components/ContextMenu/ContextMenuTrigger.d.ts +7 -0
  118. package/dist/types/components/ContextMenu/index.d.ts +10 -0
  119. package/dist/types/components/ConversationList/ConversationItem.d.ts +11 -0
  120. package/dist/types/components/ConversationList/ConversationList.d.ts +7 -0
  121. package/dist/types/components/ConversationList/index.d.ts +4 -0
  122. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +12 -0
  123. package/dist/types/components/DateRangePicker/index.d.ts +2 -0
  124. package/dist/types/components/Datepicker/Datepicker.d.ts +2 -1
  125. package/dist/types/components/DiffViewer/DiffViewer.d.ts +13 -0
  126. package/dist/types/components/DiffViewer/index.d.ts +2 -0
  127. package/dist/types/components/Divider/Divider.d.ts +6 -0
  128. package/dist/types/components/Divider/index.d.ts +2 -0
  129. package/dist/types/components/Drawer/Drawer.d.ts +11 -0
  130. package/dist/types/components/Drawer/index.d.ts +2 -0
  131. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +10 -0
  132. package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +8 -0
  133. package/dist/types/components/DropdownMenu/DropdownMenuContext.d.ts +8 -0
  134. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +9 -0
  135. package/dist/types/components/DropdownMenu/DropdownMenuSeparator.d.ts +5 -0
  136. package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +7 -0
  137. package/dist/types/components/DropdownMenu/index.d.ts +10 -0
  138. package/dist/types/components/Empty/Empty.d.ts +9 -0
  139. package/dist/types/components/Empty/index.d.ts +2 -0
  140. package/dist/types/components/Grid/Grid.d.ts +9 -0
  141. package/dist/types/components/Grid/GridItem.d.ts +9 -0
  142. package/dist/types/components/Grid/index.d.ts +4 -0
  143. package/dist/types/components/InlineEdit/InlineEdit.d.ts +10 -0
  144. package/dist/types/components/InlineEdit/index.d.ts +2 -0
  145. package/dist/types/components/LogViewer/LogViewer.d.ts +14 -0
  146. package/dist/types/components/LogViewer/index.d.ts +2 -0
  147. package/dist/types/components/MarkdownRenderer/MarkdownRenderer.d.ts +6 -0
  148. package/dist/types/components/MarkdownRenderer/index.d.ts +2 -0
  149. package/dist/types/components/ModelPicker/ModelPicker.d.ts +16 -0
  150. package/dist/types/components/ModelPicker/index.d.ts +2 -0
  151. package/dist/types/components/NavigationBar/NavLink.d.ts +10 -0
  152. package/dist/types/components/NavigationBar/NavigationBar.d.ts +9 -0
  153. package/dist/types/components/NavigationBar/index.d.ts +4 -0
  154. package/dist/types/components/OTPInput/OTPInput.d.ts +9 -0
  155. package/dist/types/components/OTPInput/index.d.ts +2 -0
  156. package/dist/types/components/Pagination/Pagination.d.ts +11 -0
  157. package/dist/types/components/Pagination/index.d.ts +2 -0
  158. package/dist/types/components/PasswordInput/PasswordInput.d.ts +10 -0
  159. package/dist/types/components/PasswordInput/index.d.ts +2 -0
  160. package/dist/types/components/Progress/Progress.d.ts +9 -0
  161. package/dist/types/components/Progress/index.d.ts +2 -0
  162. package/dist/types/components/Rating/Rating.d.ts +10 -0
  163. package/dist/types/components/Rating/index.d.ts +2 -0
  164. package/dist/types/components/Resizable/Resizable.d.ts +18 -0
  165. package/dist/types/components/Resizable/index.d.ts +2 -0
  166. package/dist/types/components/ScrollArea/ScrollArea.d.ts +8 -0
  167. package/dist/types/components/ScrollArea/index.d.ts +2 -0
  168. package/dist/types/components/Segmented/Segmented.d.ts +16 -0
  169. package/dist/types/components/Segmented/index.d.ts +2 -0
  170. package/dist/types/components/Spinner/Spinner.d.ts +6 -0
  171. package/dist/types/components/Spinner/index.d.ts +2 -0
  172. package/dist/types/components/Stat/Stat.d.ts +18 -0
  173. package/dist/types/components/Stat/index.d.ts +2 -0
  174. package/dist/types/components/StepTimeline/StepTimeline.d.ts +17 -0
  175. package/dist/types/components/StepTimeline/index.d.ts +2 -0
  176. package/dist/types/components/Stepper/Step.d.ts +8 -0
  177. package/dist/types/components/Stepper/Stepper.d.ts +9 -0
  178. package/dist/types/components/Stepper/StepperContext.d.ts +9 -0
  179. package/dist/types/components/Stepper/index.d.ts +4 -0
  180. package/dist/types/components/StreamingText/StreamingText.d.ts +9 -0
  181. package/dist/types/components/StreamingText/index.d.ts +2 -0
  182. package/dist/types/components/SwipeAction/SwipeAction.d.ts +12 -0
  183. package/dist/types/components/SwipeAction/index.d.ts +2 -0
  184. package/dist/types/components/TagGroup/TagGroup.d.ts +7 -0
  185. package/dist/types/components/TagGroup/TagGroupItem.d.ts +8 -0
  186. package/dist/types/components/TagGroup/index.d.ts +4 -0
  187. package/dist/types/components/TagInput/TagInput.d.ts +11 -0
  188. package/dist/types/components/TagInput/index.d.ts +2 -0
  189. package/dist/types/components/ThinkingIndicator/ThinkingIndicator.d.ts +6 -0
  190. package/dist/types/components/ThinkingIndicator/index.d.ts +2 -0
  191. package/dist/types/components/TimePicker/TimePicker.d.ts +10 -0
  192. package/dist/types/components/TimePicker/index.d.ts +2 -0
  193. package/dist/types/components/Timeline/Timeline.d.ts +15 -0
  194. package/dist/types/components/Timeline/index.d.ts +2 -0
  195. package/dist/types/components/TokenCounter/TokenCounter.d.ts +8 -0
  196. package/dist/types/components/TokenCounter/index.d.ts +2 -0
  197. package/dist/types/components/ToolCallCard/ToolCallCard.d.ts +11 -0
  198. package/dist/types/components/ToolCallCard/index.d.ts +2 -0
  199. package/dist/types/components/Transfer/Transfer.d.ts +14 -0
  200. package/dist/types/components/Transfer/index.d.ts +2 -0
  201. package/dist/types/components/Typography/Typography.d.ts +22 -0
  202. package/dist/types/components/Typography/index.d.ts +2 -0
  203. package/dist/types/components/Upload/Upload.d.ts +10 -0
  204. package/dist/types/components/Upload/index.d.ts +2 -0
  205. package/dist/types/components/VirtualList/VirtualList.d.ts +10 -0
  206. package/dist/types/components/VirtualList/index.d.ts +2 -0
  207. package/dist/types/index.d.ts +110 -0
  208. package/package.json +1 -1
@@ -0,0 +1,67 @@
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/Empty/Empty.tsx
5
+ var r = "haze-Empty__base", i = "haze-Empty__imageStyle", a = "haze-Empty__descStyle", o = "haze-Empty__actionStyle", s = /* @__PURE__ */ n("svg", {
6
+ width: "64",
7
+ height: "64",
8
+ viewBox: "0 0 64 64",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ children: [
12
+ /* @__PURE__ */ t("rect", {
13
+ x: "8",
14
+ y: "16",
15
+ width: "48",
16
+ height: "36",
17
+ rx: "4",
18
+ stroke: "var(--haze-color-border)",
19
+ strokeWidth: "2"
20
+ }),
21
+ /* @__PURE__ */ t("path", {
22
+ d: "M8 28h48",
23
+ stroke: "var(--haze-color-border)",
24
+ strokeWidth: "2"
25
+ }),
26
+ /* @__PURE__ */ t("circle", {
27
+ cx: "20",
28
+ cy: "22",
29
+ r: "2",
30
+ fill: "var(--haze-color-border)"
31
+ }),
32
+ /* @__PURE__ */ t("circle", {
33
+ cx: "28",
34
+ cy: "22",
35
+ r: "2",
36
+ fill: "var(--haze-color-border)"
37
+ }),
38
+ /* @__PURE__ */ t("path", {
39
+ d: "M24 38l6-6 4 4 8-8",
40
+ stroke: "var(--haze-color-border)",
41
+ strokeWidth: "2",
42
+ strokeLinecap: "round",
43
+ strokeLinejoin: "round"
44
+ })
45
+ ]
46
+ });
47
+ function c({ description: c = "No data", image: l, className: u, children: d }) {
48
+ return /* @__PURE__ */ n("div", {
49
+ className: e([r, u]),
50
+ children: [
51
+ /* @__PURE__ */ t("div", {
52
+ className: e([i]),
53
+ children: l ?? s
54
+ }),
55
+ /* @__PURE__ */ t("div", {
56
+ className: e([a]),
57
+ children: c
58
+ }),
59
+ d && /* @__PURE__ */ t("div", {
60
+ className: e([o]),
61
+ children: d
62
+ })
63
+ ]
64
+ });
65
+ }
66
+ //#endregion
67
+ export { c as default };
@@ -0,0 +1,17 @@
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/Grid/Grid.tsx
5
+ var n = "haze-Grid__base";
6
+ function r({ columns: r = 12, gap: i = 4, className: a, children: o }) {
7
+ return /* @__PURE__ */ t("div", {
8
+ style: {
9
+ gridTemplateColumns: `repeat(${r}, 1fr)`,
10
+ gap: `var(--haze-space-${i})`
11
+ },
12
+ className: e([n, a]),
13
+ children: o
14
+ });
15
+ }
16
+ //#endregion
17
+ export { r as default };
@@ -0,0 +1,11 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ //#region src/lib/components/Grid/GridItem.tsx
3
+ function t({ span: t = 1, start: n, className: r, children: i }) {
4
+ return /* @__PURE__ */ e("div", {
5
+ className: r,
6
+ style: { gridColumn: n ? `${n} / span ${t}` : `span ${t}` },
7
+ children: i
8
+ });
9
+ }
10
+ //#endregion
11
+ export { t as default };
@@ -0,0 +1,45 @@
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, useState as a } from "react";
6
+ //#region src/lib/components/InlineEdit/InlineEdit.tsx
7
+ var o = "haze-InlineEdit__display", s = "haze-InlineEdit__editing", c = "haze-InlineEdit__placeholderStyle";
8
+ function l({ value: l, onChange: u, placeholder: d = "Click to edit", disabled: f, className: p }) {
9
+ let [m, h] = n(l, ""), [g, _] = a(!1), [v, y] = a(m), b = i(null);
10
+ r(() => {
11
+ g && (b.current?.focus(), b.current?.select());
12
+ }, [g]);
13
+ let x = () => {
14
+ f || (y(m), _(!0));
15
+ }, S = () => {
16
+ _(!1), v !== m && (h(v), u?.(v));
17
+ }, C = () => {
18
+ _(!1), y(m);
19
+ };
20
+ return g ? /* @__PURE__ */ t("input", {
21
+ ref: b,
22
+ value: v,
23
+ onChange: (e) => y(e.target.value),
24
+ onBlur: S,
25
+ onKeyDown: (e) => {
26
+ e.key === "Enter" && S(), e.key === "Escape" && C();
27
+ },
28
+ className: e([s, p])
29
+ }) : /* @__PURE__ */ t("span", {
30
+ onClick: x,
31
+ role: "button",
32
+ tabIndex: 0,
33
+ onKeyDown: (e) => {
34
+ e.key === "Enter" && x();
35
+ },
36
+ className: e([
37
+ o,
38
+ !m && c,
39
+ p
40
+ ]),
41
+ children: m || d
42
+ });
43
+ }
44
+ //#endregion
45
+ export { l as default };
@@ -0,0 +1,65 @@
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
+ import { useMemo as i } from "react";
6
+ //#region src/lib/components/LogViewer/LogViewer.tsx
7
+ var a = "haze-LogViewer__wrapper", o = "haze-LogViewer__toolbar", s = "haze-LogViewer__filterBtn", c = "haze-LogViewer__filterActive", l = "haze-LogViewer__body", u = "haze-LogViewer__entry", d = "haze-LogViewer__timestamp", f = "haze-LogViewer__levelBadge", p = "haze-LogViewer__levelDebug", m = "haze-LogViewer__levelInfo", h = "haze-LogViewer__levelWarn", g = "haze-LogViewer__levelError", _ = "haze-LogViewer__messageStyle", v = {
8
+ debug: p,
9
+ info: m,
10
+ warn: h,
11
+ error: g
12
+ }, y = [
13
+ "debug",
14
+ "info",
15
+ "warn",
16
+ "error"
17
+ ];
18
+ function b({ logs: p, filter: m, className: h }) {
19
+ let [g, b] = r(m, null), x = i(() => g ? p.filter((e) => e.level === g) : p, [p, g]);
20
+ return /* @__PURE__ */ n("div", {
21
+ className: e([a, h]),
22
+ children: [/* @__PURE__ */ n("div", {
23
+ className: e([o]),
24
+ children: [/* @__PURE__ */ t("button", {
25
+ type: "button",
26
+ onClick: () => b(null),
27
+ className: e([s, !g && c]),
28
+ children: "All"
29
+ }), y.map((n) => /* @__PURE__ */ t("button", {
30
+ type: "button",
31
+ onClick: () => b(n),
32
+ className: e([s, g === n && c]),
33
+ children: n
34
+ }, n))]
35
+ }), /* @__PURE__ */ n("div", {
36
+ className: e([l]),
37
+ children: [x.map((r, i) => /* @__PURE__ */ n("div", {
38
+ className: e([u]),
39
+ children: [
40
+ r.timestamp && /* @__PURE__ */ t("span", {
41
+ className: e([d]),
42
+ children: r.timestamp
43
+ }),
44
+ /* @__PURE__ */ t("span", {
45
+ className: e([f, v[r.level]]),
46
+ children: r.level
47
+ }),
48
+ /* @__PURE__ */ t("span", {
49
+ className: e([_]),
50
+ children: r.message
51
+ })
52
+ ]
53
+ }, i)), x.length === 0 && /* @__PURE__ */ t("div", {
54
+ className: e([u]),
55
+ children: /* @__PURE__ */ t("span", {
56
+ style: { color: "var(--haze-color-text-muted)" },
57
+ className: e([_]),
58
+ children: "No logs"
59
+ })
60
+ })]
61
+ })]
62
+ });
63
+ }
64
+ //#endregion
65
+ export { b as default };
@@ -0,0 +1,24 @@
1
+ /* empty css */
2
+ import { classnames as e } from "babel-runtime-jsx-plus";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { useMemo as n } from "react";
5
+ //#region src/lib/components/MarkdownRenderer/MarkdownRenderer.tsx
6
+ var r = "haze-MarkdownRenderer__wrapper";
7
+ function i(e) {
8
+ let t = e;
9
+ return t = t.replace(/```(\w*)\n([\s\S]*?)```/g, (e, t, n) => `<pre><code class="lang-${t}">${a(n.trim())}</code></pre>`), t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/^######\s+(.+)$/gm, "<h6>$1</h6>"), t = t.replace(/^#####\s+(.+)$/gm, "<h5>$1</h5>"), t = t.replace(/^####\s+(.+)$/gm, "<h4>$1</h4>"), t = t.replace(/^###\s+(.+)$/gm, "<h3>$1</h3>"), t = t.replace(/^##\s+(.+)$/gm, "<h2>$1</h2>"), t = t.replace(/^#\s+(.+)$/gm, "<h1>$1</h1>"), t = t.replace(/\*\*\*(.+?)\*\*\*/g, "<strong><em>$1</em></strong>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(/^>\s+(.+)$/gm, "<blockquote>$1</blockquote>"), t = t.replace(/^[-*]\s+(.+)$/gm, "<li>$1</li>"), t = t.replace(/((?:<li>.*<\/li>\n?)+)/g, "<ul>$1</ul>"), t = t.replace(/^\d+\.\s+(.+)$/gm, "<oli>$1</oli>"), t = t.replace(/((?:<oli>.*<\/oli>\n?)+)/g, (e) => "<ol>" + e.replace(/<\/?oli>/g, (e) => e.replace("oli", "li")) + "</ol>"), t = t.replace(/^---$/gm, "<hr />"), t = t.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "<a href=\"$2\" target=\"_blank\" rel=\"noopener\">$1</a>"), t = t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, "<img alt=\"$1\" src=\"$2\" />"), t = t.replace(/^(?!<[a-z])((?!<\/).+)$/gm, (e) => {
10
+ let t = e.trim();
11
+ return t ? `<p>${t}</p>` : "";
12
+ }), t = t.replace(/\n{2,}/g, "\n"), t;
13
+ }
14
+ function a(e) {
15
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
16
+ }
17
+ function o({ content: a, className: o }) {
18
+ return /* @__PURE__ */ t("div", {
19
+ dangerouslySetInnerHTML: { __html: n(() => i(a), [a]) },
20
+ className: e([r, o])
21
+ });
22
+ }
23
+ //#endregion
24
+ export { o as default };
@@ -0,0 +1,26 @@
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/ModelPicker/ModelPicker.tsx
6
+ var i = "haze-ModelPicker__wrapper", a = "haze-ModelPicker__select";
7
+ function o({ value: o, onChange: s, options: c, disabled: l, className: u }) {
8
+ let [d, f] = r(o, "");
9
+ return /* @__PURE__ */ t("div", {
10
+ className: e([i, u]),
11
+ children: /* @__PURE__ */ t("select", {
12
+ value: d,
13
+ onChange: (e) => {
14
+ f(e.target.value), s?.(e.target.value);
15
+ },
16
+ disabled: l,
17
+ className: e([a]),
18
+ children: c.map((e) => /* @__PURE__ */ n("option", {
19
+ value: e.value,
20
+ children: [e.label, e.contextLength ? ` (${e.contextLength})` : ""]
21
+ }, e.value))
22
+ })
23
+ });
24
+ }
25
+ //#endregion
26
+ export { o as default };
@@ -0,0 +1,22 @@
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/NavigationBar/NavLink.tsx
5
+ var n = "haze-NavLink__link", r = "haze-NavLink__activeLink";
6
+ function i({ href: i = "#", active: a, children: o, onClick: s, className: c }) {
7
+ return /* @__PURE__ */ t("a", {
8
+ href: i,
9
+ onClick: (e) => {
10
+ s && (e.preventDefault(), s());
11
+ },
12
+ "aria-current": a ? "page" : void 0,
13
+ className: e([
14
+ n,
15
+ a && r,
16
+ c
17
+ ]),
18
+ children: o
19
+ });
20
+ }
21
+ //#endregion
22
+ export { i as default };
@@ -0,0 +1,26 @@
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/NavigationBar/NavigationBar.tsx
5
+ var r = "haze-NavigationBar__nav", i = "haze-NavigationBar__brand", a = "haze-NavigationBar__links", o = "haze-NavigationBar__endSlot";
6
+ function s({ brand: s, children: c, end: l, className: u }) {
7
+ return /* @__PURE__ */ n("nav", {
8
+ className: e([r, u]),
9
+ children: [
10
+ s && /* @__PURE__ */ t("div", {
11
+ className: e([i]),
12
+ children: s
13
+ }),
14
+ /* @__PURE__ */ t("div", {
15
+ className: e([a]),
16
+ children: c
17
+ }),
18
+ l && /* @__PURE__ */ t("div", {
19
+ className: e([o]),
20
+ children: l
21
+ })
22
+ ]
23
+ });
24
+ }
25
+ //#endregion
26
+ export { s as default };
@@ -0,0 +1,50 @@
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 { useCallback as r, useRef as i } from "react";
6
+ //#region src/lib/components/OTPInput/OTPInput.tsx
7
+ var a = "haze-OTPInput__container", o = "haze-OTPInput__cell";
8
+ function s({ length: s = 6, value: c, onChange: l, className: u }) {
9
+ let [d, f] = n(c, ""), p = i([]), m = r((e, t) => {
10
+ let n = d.split("");
11
+ n[e] = t.slice(-1);
12
+ let r = n.join("").slice(0, s);
13
+ f(r), l?.(r), t && e < s - 1 && p.current[e + 1]?.focus();
14
+ }, [
15
+ d,
16
+ s,
17
+ f,
18
+ l
19
+ ]), h = r((e, t) => {
20
+ t.key === "Backspace" && !d[e] && e > 0 && p.current[e - 1]?.focus();
21
+ }, [d]), g = r((e) => {
22
+ e.preventDefault();
23
+ let t = e.clipboardData.getData("text").slice(0, s);
24
+ f(t), l?.(t);
25
+ let n = Math.min(t.length, s - 1);
26
+ p.current[n]?.focus();
27
+ }, [
28
+ s,
29
+ f,
30
+ l
31
+ ]);
32
+ return /* @__PURE__ */ t("div", {
33
+ className: e([a, u]),
34
+ children: Array.from({ length: s }, (n, r) => /* @__PURE__ */ t("input", {
35
+ ref: (e) => {
36
+ p.current[r] = e;
37
+ },
38
+ type: "text",
39
+ inputMode: "numeric",
40
+ maxLength: 1,
41
+ value: d[r] ?? "",
42
+ onChange: (e) => m(r, e.target.value),
43
+ onKeyDown: (e) => h(r, e),
44
+ onPaste: g,
45
+ className: e([o])
46
+ }, r))
47
+ });
48
+ }
49
+ //#endregion
50
+ export { s as default };
@@ -0,0 +1,58 @@
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/Pagination/Pagination.tsx
6
+ var i = "haze-Pagination__nav", a = "haze-Pagination__btn", o = "haze-Pagination__activeBtn", s = "haze-Pagination__ellipsis", c = {
7
+ sm: "haze-Pagination__sm",
8
+ md: "haze-Pagination__md",
9
+ lg: "haze-Pagination__lg"
10
+ };
11
+ function l(e, t) {
12
+ if (t <= 7) return Array.from({ length: t }, (e, t) => t + 1);
13
+ let n = [1];
14
+ e > 3 && n.push("...");
15
+ for (let r = Math.max(2, e - 1); r <= Math.min(t - 1, e + 1); r++) n.push(r);
16
+ return e < t - 2 && n.push("..."), n.push(t), n;
17
+ }
18
+ function u({ page: u, total: d, pageSize: f = 10, size: p = "md", className: m, ...h }) {
19
+ let [g, _] = r(u, 1), v = Math.max(1, Math.ceil(d / f)), y = l(g, v);
20
+ return /* @__PURE__ */ n("nav", {
21
+ ...h,
22
+ className: e([
23
+ i,
24
+ c[p],
25
+ m
26
+ ]),
27
+ children: [
28
+ /* @__PURE__ */ t("button", {
29
+ type: "button",
30
+ disabled: g <= 1,
31
+ onClick: () => _((e) => Math.max(1, e - 1)),
32
+ "aria-label": "Previous",
33
+ className: e([a]),
34
+ children: "‹"
35
+ }),
36
+ y.map((n, r) => n === "..." ? /* @__PURE__ */ t("span", {
37
+ className: e([s]),
38
+ children: "…"
39
+ }, `e${r}`) : /* @__PURE__ */ t("button", {
40
+ type: "button",
41
+ "aria-current": n === g ? "page" : void 0,
42
+ onClick: () => _(n),
43
+ className: e([a, n === g && o]),
44
+ children: n
45
+ }, n)),
46
+ /* @__PURE__ */ t("button", {
47
+ type: "button",
48
+ disabled: g >= v,
49
+ onClick: () => _((e) => Math.min(v, e + 1)),
50
+ "aria-label": "Next",
51
+ className: e([a]),
52
+ children: "›"
53
+ })
54
+ ]
55
+ });
56
+ }
57
+ //#endregion
58
+ export { u 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
+ import { useControl as r } from "react-use-control";
5
+ import { useState as i } from "react";
6
+ //#region src/lib/components/PasswordInput/PasswordInput.tsx
7
+ var a = "haze-PasswordInput__wrapper", o = "haze-PasswordInput__input", s = "haze-PasswordInput__toggle";
8
+ function c({ value: c, onChange: l, placeholder: u, disabled: d, className: f }) {
9
+ let [p, m] = r(c, ""), [h, g] = i(!1);
10
+ return /* @__PURE__ */ n("div", {
11
+ className: e([a, f]),
12
+ children: [/* @__PURE__ */ t("input", {
13
+ type: h ? "text" : "password",
14
+ value: p,
15
+ onChange: (e) => {
16
+ m(e.target.value), l?.(e.target.value);
17
+ },
18
+ placeholder: u,
19
+ disabled: d,
20
+ className: e([o])
21
+ }), /* @__PURE__ */ t("button", {
22
+ type: "button",
23
+ onClick: () => g(!h),
24
+ tabIndex: -1,
25
+ "aria-label": h ? "Hide password" : "Show password",
26
+ className: e([s]),
27
+ children: h ? "🙈" : "👁"
28
+ })]
29
+ });
30
+ }
31
+ //#endregion
32
+ export { c as default };
@@ -0,0 +1,83 @@
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/Progress/Progress.tsx
5
+ var r = "haze-Progress__barBase", i = {
6
+ sm: "haze-Progress__sm",
7
+ md: "haze-Progress__md",
8
+ lg: "haze-Progress__lg"
9
+ }, a = "haze-Progress__barFill", o = {
10
+ primary: "haze-Progress__primary",
11
+ success: "haze-Progress__success",
12
+ warning: "haze-Progress__warning",
13
+ danger: "haze-Progress__danger"
14
+ }, s = "haze-Progress__circleBase", c = {
15
+ sm: "haze-Progress__sm",
16
+ md: "haze-Progress__md",
17
+ lg: "haze-Progress__lg"
18
+ }, l = "haze-Progress__circleBg", u = "haze-Progress__circleFill", d = {
19
+ primary: "haze-Progress__primary",
20
+ success: "haze-Progress__success",
21
+ warning: "haze-Progress__warning",
22
+ danger: "haze-Progress__danger"
23
+ }, f = {
24
+ sm: 3,
25
+ md: 4,
26
+ lg: 5
27
+ }, p = {
28
+ sm: 13,
29
+ md: 20,
30
+ lg: 27
31
+ };
32
+ function m({ value: m = 0, variant: h = "bar", size: g = "md", color: _ = "primary", className: v }) {
33
+ let y = Math.max(0, Math.min(100, m));
34
+ if (h === "circle") {
35
+ let r = p[g], i = f[g], a = 2 * Math.PI * r, o = a - y / 100 * a;
36
+ return /* @__PURE__ */ t("div", {
37
+ role: "progressbar",
38
+ "aria-valuemin": 0,
39
+ "aria-valuemax": 100,
40
+ "aria-valuenow": y,
41
+ className: e([
42
+ s,
43
+ c[g],
44
+ v
45
+ ]),
46
+ children: /* @__PURE__ */ n("svg", {
47
+ viewBox: `0 0 ${(r + i) * 2} ${(r + i) * 2}`,
48
+ children: [/* @__PURE__ */ t("circle", {
49
+ cx: r + i,
50
+ cy: r + i,
51
+ r,
52
+ strokeWidth: i,
53
+ className: e([l])
54
+ }), /* @__PURE__ */ t("circle", {
55
+ cx: r + i,
56
+ cy: r + i,
57
+ r,
58
+ strokeWidth: i,
59
+ strokeDasharray: a,
60
+ strokeDashoffset: o,
61
+ className: e([u, d[_]])
62
+ })]
63
+ })
64
+ });
65
+ }
66
+ return /* @__PURE__ */ t("div", {
67
+ role: "progressbar",
68
+ "aria-valuemin": 0,
69
+ "aria-valuemax": 100,
70
+ "aria-valuenow": y,
71
+ className: e([
72
+ r,
73
+ i[g],
74
+ v
75
+ ]),
76
+ children: /* @__PURE__ */ t("div", {
77
+ style: { width: `${y}%` },
78
+ className: e([a, o[_]])
79
+ })
80
+ });
81
+ }
82
+ //#endregion
83
+ export { m as default };
@@ -0,0 +1,49 @@
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
+ import { useState as i } from "react";
6
+ //#region src/lib/components/Rating/Rating.tsx
7
+ var a = "haze-Rating__container", o = "haze-Rating__star", s = "haze-Rating__starActive";
8
+ function c({ value: c, count: l = 5, allowHalf: u = !1, onChange: d, className: f }) {
9
+ let [p, m] = r(c, 0), [h, g] = i(null), _ = (e) => {
10
+ let t = e + 1;
11
+ m(t), d?.(t);
12
+ }, v = h ?? p;
13
+ return /* @__PURE__ */ t("div", {
14
+ role: "radiogroup",
15
+ className: e([a, f]),
16
+ children: Array.from({ length: l }, (r, i) => {
17
+ let a = v >= i + 1, c = u && v >= i + .5 && v < i + 1;
18
+ return /* @__PURE__ */ t("span", {
19
+ role: "radio",
20
+ "aria-checked": p >= i + 1 ? "true" : "false",
21
+ "aria-label": `${i + 1} star${i > 0 ? "s" : ""}`,
22
+ onClick: () => _(i),
23
+ onMouseEnter: () => g(i + 1),
24
+ onMouseLeave: () => g(null),
25
+ className: e([o, (a || c) && s]),
26
+ children: /* @__PURE__ */ n("svg", {
27
+ width: "18",
28
+ height: "18",
29
+ viewBox: "0 0 24 24",
30
+ fill: a ? "currentColor" : c ? "url(#half)" : "none",
31
+ stroke: "currentColor",
32
+ strokeWidth: "2",
33
+ children: [c && /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ n("linearGradient", {
34
+ id: "half",
35
+ children: [/* @__PURE__ */ t("stop", {
36
+ offset: "50%",
37
+ stopColor: "currentColor"
38
+ }), /* @__PURE__ */ t("stop", {
39
+ offset: "50%",
40
+ stopColor: "transparent"
41
+ })]
42
+ }) }), /* @__PURE__ */ t("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })]
43
+ })
44
+ }, i);
45
+ })
46
+ });
47
+ }
48
+ //#endregion
49
+ export { c as default };
@@ -0,0 +1,56 @@
1
+ /* empty css */
2
+ import { classnames as e } from "babel-runtime-jsx-plus";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { createContext as n, useContext as r, useState as i } from "react";
5
+ //#region src/lib/components/Resizable/Resizable.tsx
6
+ var a = n(void 0);
7
+ function o() {
8
+ let e = r(a);
9
+ if (!e) throw Error("Resizable sub-components must be used within <ResizableGroup>");
10
+ return e;
11
+ }
12
+ var s = "haze-Resizable__groupBase", c = "haze-Resizable__groupHorizontal", l = "haze-Resizable__groupVertical";
13
+ function u({ direction: n = "horizontal", children: r, className: o }) {
14
+ let [u, d] = i([]), [f, p] = i(null);
15
+ return /* @__PURE__ */ t(a.Provider, {
16
+ value: {
17
+ direction: n,
18
+ sizes: u,
19
+ setSizes: d,
20
+ dragging: f,
21
+ setDragging: p
22
+ },
23
+ children: /* @__PURE__ */ t("div", {
24
+ className: e([
25
+ s,
26
+ n === "horizontal" ? c : l,
27
+ o
28
+ ]),
29
+ children: r
30
+ })
31
+ });
32
+ }
33
+ var d = "haze-Resizable__panelStyle";
34
+ function f({ defaultSize: n = 50, children: r, className: i }) {
35
+ let { direction: a } = o();
36
+ return /* @__PURE__ */ t("div", {
37
+ style: { flex: `0 0 ${n}%` },
38
+ className: e([d, i]),
39
+ children: r
40
+ });
41
+ }
42
+ var p = "haze-Resizable__handleBase", m = "haze-Resizable__handleHorizontal", h = "haze-Resizable__handleVertical";
43
+ function g({ className: n }) {
44
+ let { direction: r } = o();
45
+ return /* @__PURE__ */ t("div", {
46
+ role: "separator",
47
+ "aria-orientation": r,
48
+ className: e([
49
+ p,
50
+ r === "horizontal" ? m : h,
51
+ n
52
+ ])
53
+ });
54
+ }
55
+ //#endregion
56
+ export { u as ResizableGroup, g as ResizableHandle, f as ResizablePanel };
@@ -0,0 +1,14 @@
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/ScrollArea/ScrollArea.tsx
5
+ var n = "haze-ScrollArea__base";
6
+ function r({ maxHeight: r, className: i, children: a }) {
7
+ return /* @__PURE__ */ t("div", {
8
+ style: r === void 0 ? void 0 : { maxHeight: typeof r == "number" ? `${r}px` : r },
9
+ className: e([n, i]),
10
+ children: a
11
+ });
12
+ }
13
+ //#endregion
14
+ export { r as default };