haze-ui 1.6.0 → 1.7.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/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/AccordionItem.js +1 -1
- package/dist/components/Affix/Affix.js +1 -1
- package/dist/components/Alert/Alert.js +6 -8
- package/dist/components/ApprovalCard/ApprovalCard.js +1 -1
- package/dist/components/AspectRatio/AspectRatio.js +4 -3
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/BackToTop/BackToTop.js +1 -1
- package/dist/components/Badge/Badge.js +4 -3
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Carousel/Carousel.js +5 -7
- package/dist/components/Carousel/CarouselSlide.js +1 -1
- package/dist/components/ChatContainer/ChatContainer.js +1 -1
- package/dist/components/ChatInput/ChatInput.js +1 -1
- package/dist/components/ChatMessage/ChatMessage.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +15 -12
- package/dist/components/Chip/Chip.js +3 -2
- package/dist/components/CodeBlock/CodeBlock.js +1 -1
- package/dist/components/Collapsible/Collapsible.js +2 -2
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/Combobox/Combobox.js +15 -13
- package/dist/components/Combobox/ComboboxOption.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/ConfirmDialog/ConfirmDialog.js +2 -2
- package/dist/components/Container/Container.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +5 -5
- package/dist/components/ContextMenu/ContextMenuContent.js +4 -4
- package/dist/components/ContextMenu/ContextMenuItem.js +4 -4
- package/dist/components/ContextMenu/ContextMenuSeparator.js +1 -1
- package/dist/components/ContextMenu/ContextMenuTrigger.js +4 -4
- package/dist/components/ConversationList/ConversationItem.js +1 -1
- package/dist/components/ConversationList/ConversationList.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/components/Datepicker/Calendar.js +1 -1
- package/dist/components/Datepicker/Datepicker.js +5 -5
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/DiffViewer/DiffViewer.js +1 -1
- package/dist/components/Disclosure/Disclosure.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +5 -5
- package/dist/components/DropdownMenu/DropdownMenuContent.js +4 -4
- package/dist/components/DropdownMenu/DropdownMenuItem.js +4 -4
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js +4 -4
- package/dist/components/Empty/Empty.js +1 -1
- package/dist/components/FileInput/FileInput.js +1 -1
- package/dist/components/Flex/Flex.js +12 -10
- package/dist/components/Grid/Grid.js +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/Image/Image.js +1 -1
- package/dist/components/InlineEdit/InlineEdit.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListItem.js +1 -1
- package/dist/components/LogViewer/LogViewer.js +1 -1
- package/dist/components/MarkdownRenderer/MarkdownRenderer.js +3 -2
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/ModelPicker/ModelPicker.js +2 -2
- package/dist/components/NavigationBar/NavLink.js +1 -1
- package/dist/components/NavigationBar/NavigationBar.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/OTPInput/OTPInput.js +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/Radio/RadioGroup.js +4 -4
- package/dist/components/Rating/Rating.js +1 -1
- package/dist/components/Resizable/Resizable.js +4 -4
- package/dist/components/ScrollArea/ScrollArea.js +3 -2
- package/dist/components/Segmented/Segmented.js +1 -1
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Skeleton/Skeleton.js +6 -5
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Stat/Stat.js +1 -1
- package/dist/components/StepTimeline/StepTimeline.js +1 -1
- package/dist/components/Stepper/Step.js +8 -8
- package/dist/components/Stepper/Stepper.js +7 -7
- package/dist/components/StreamingText/StreamingText.js +1 -1
- package/dist/components/SwipeAction/SwipeAction.js +1 -1
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Table/Table.js +2 -2
- package/dist/components/Table/TableBody.js +1 -1
- package/dist/components/Table/TableCell.js +1 -1
- package/dist/components/Table/TableHead.js +1 -1
- package/dist/components/Table/TableRow.js +1 -1
- package/dist/components/Tabs/Tab.js +4 -4
- package/dist/components/Tabs/TabList.js +1 -1
- package/dist/components/Tabs/TabPanel.js +4 -4
- package/dist/components/Tabs/Tabs.js +4 -4
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagGroup/TagGroup.js +1 -1
- package/dist/components/TagGroup/TagGroupItem.js +1 -1
- package/dist/components/TagInput/TagInput.js +1 -1
- package/dist/components/Textarea/Textarea.js +1 -1
- package/dist/components/ThinkingIndicator/ThinkingIndicator.js +1 -1
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/TokenCounter/TokenCounter.js +1 -1
- package/dist/components/ToolCallCard/ToolCallCard.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Transfer/Transfer.js +11 -11
- package/dist/components/Tree/Tree.js +39 -39
- package/dist/components/Tree/TreeItem.js +7 -7
- package/dist/components/Typography/Typography.js +3 -2
- package/dist/components/Upload/Upload.js +10 -10
- package/dist/components/VirtualList/VirtualList.js +2 -2
- package/dist/form/FormItem.js +42 -0
- package/dist/form/useFormControl.js +54 -0
- package/dist/form.js +3 -0
- package/dist/haze-ui.css +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts +1 -1
- package/dist/types/components/Accordion/AccordionItem.d.ts +1 -1
- package/dist/types/components/Affix/Affix.d.ts +1 -1
- package/dist/types/components/Alert/Alert.d.ts +1 -1
- package/dist/types/components/ApprovalCard/ApprovalCard.d.ts +1 -1
- package/dist/types/components/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -1
- package/dist/types/components/BackToTop/BackToTop.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +3 -2
- package/dist/types/components/Banner/Banner.d.ts +1 -1
- package/dist/types/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/types/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/types/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +1 -1
- package/dist/types/components/Carousel/Carousel.d.ts +1 -1
- package/dist/types/components/Carousel/CarouselSlide.d.ts +1 -1
- package/dist/types/components/ChatContainer/ChatContainer.d.ts +1 -1
- package/dist/types/components/ChatInput/ChatInput.d.ts +1 -1
- package/dist/types/components/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +3 -2
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +1 -1
- package/dist/types/components/Collapsible/Collapsible.d.ts +3 -3
- package/dist/types/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/types/components/Combobox/Combobox.d.ts +1 -1
- package/dist/types/components/Combobox/ComboboxOption.d.ts +1 -1
- package/dist/types/components/Command/Command.d.ts +4 -4
- package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/types/components/Container/Container.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenuContent.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenuSeparator.d.ts +1 -1
- package/dist/types/components/ContextMenu/ContextMenuTrigger.d.ts +1 -1
- package/dist/types/components/ConversationList/ConversationItem.d.ts +1 -1
- package/dist/types/components/ConversationList/ConversationList.d.ts +1 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/types/components/Datepicker/Calendar.d.ts +1 -1
- package/dist/types/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/DiffViewer/DiffViewer.d.ts +1 -1
- package/dist/types/components/Disclosure/Disclosure.d.ts +1 -1
- package/dist/types/components/Divider/Divider.d.ts +1 -1
- package/dist/types/components/Drawer/Drawer.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenuSeparator.d.ts +1 -1
- package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +1 -1
- package/dist/types/components/Empty/Empty.d.ts +1 -1
- package/dist/types/components/FileInput/FileInput.d.ts +1 -1
- package/dist/types/components/Flex/Flex.d.ts +2 -1
- package/dist/types/components/Grid/Grid.d.ts +1 -1
- package/dist/types/components/Grid/GridItem.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Image/Image.d.ts +1 -1
- package/dist/types/components/InlineEdit/InlineEdit.d.ts +1 -1
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/List/List.d.ts +1 -1
- package/dist/types/components/List/ListItem.d.ts +1 -1
- package/dist/types/components/LogViewer/LogViewer.d.ts +1 -1
- package/dist/types/components/MarkdownRenderer/MarkdownRenderer.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +1 -1
- package/dist/types/components/Menu/MenuDivider.d.ts +1 -1
- package/dist/types/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/components/ModelPicker/ModelPicker.d.ts +1 -1
- package/dist/types/components/NavigationBar/NavLink.d.ts +1 -1
- package/dist/types/components/NavigationBar/NavigationBar.d.ts +1 -1
- package/dist/types/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/types/components/OTPInput/OTPInput.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Progress/Progress.d.ts +1 -1
- package/dist/types/components/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Radio/RadioGroup.d.ts +1 -1
- package/dist/types/components/Rating/Rating.d.ts +1 -1
- package/dist/types/components/Resizable/Resizable.d.ts +3 -3
- package/dist/types/components/ScrollArea/ScrollArea.d.ts +1 -1
- package/dist/types/components/Segmented/Segmented.d.ts +1 -1
- package/dist/types/components/Select/Option.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +1 -1
- package/dist/types/components/Stat/Stat.d.ts +2 -2
- package/dist/types/components/StepTimeline/StepTimeline.d.ts +2 -2
- package/dist/types/components/Stepper/Step.d.ts +1 -1
- package/dist/types/components/Stepper/Stepper.d.ts +1 -1
- package/dist/types/components/StreamingText/StreamingText.d.ts +1 -1
- package/dist/types/components/SwipeAction/SwipeAction.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Table/Table.d.ts +1 -1
- package/dist/types/components/Table/TableBody.d.ts +1 -1
- package/dist/types/components/Table/TableCell.d.ts +1 -1
- package/dist/types/components/Table/TableHead.d.ts +1 -1
- package/dist/types/components/Table/TableRow.d.ts +1 -1
- package/dist/types/components/Tabs/Tab.d.ts +1 -1
- package/dist/types/components/Tabs/TabList.d.ts +1 -1
- package/dist/types/components/Tabs/TabPanel.d.ts +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/types/components/Tag/Tag.d.ts +1 -1
- package/dist/types/components/TagGroup/TagGroup.d.ts +1 -1
- package/dist/types/components/TagGroup/TagGroupItem.d.ts +1 -1
- package/dist/types/components/TagInput/TagInput.d.ts +1 -1
- package/dist/types/components/Textarea/Textarea.d.ts +1 -1
- package/dist/types/components/ThinkingIndicator/ThinkingIndicator.d.ts +1 -1
- package/dist/types/components/TimePicker/TimePicker.d.ts +1 -1
- package/dist/types/components/Timeline/Timeline.d.ts +2 -2
- package/dist/types/components/Toast/Toast.d.ts +1 -1
- package/dist/types/components/Toast/ToastContainer.d.ts +1 -1
- package/dist/types/components/TokenCounter/TokenCounter.d.ts +1 -1
- package/dist/types/components/ToolCallCard/ToolCallCard.d.ts +1 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/Transfer/Transfer.d.ts +1 -1
- package/dist/types/components/Tree/Tree.d.ts +1 -1
- package/dist/types/components/Tree/TreeItem.d.ts +1 -1
- package/dist/types/components/Typography/Typography.d.ts +4 -4
- package/dist/types/components/Upload/Upload.d.ts +1 -1
- package/dist/types/components/VirtualList/VirtualList.d.ts +1 -1
- package/dist/types/form/FormItem.d.ts +55 -0
- package/dist/types/form/index.d.ts +4 -0
- package/dist/types/form/useFormControl.d.ts +32 -0
- package/dist/types/utils/classnames.d.ts +1 -0
- package/dist/utils/classnames.js +13 -0
- package/package.json +45 -41
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import { useStepperContext as t } from "./StepperContext.js";
|
|
2
3
|
/* empty css */
|
|
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
|
//#region src/lib/components/Stepper/Step.tsx
|
|
6
6
|
var i = "haze-Step__step", a = "haze-Step__stepConnector", o = "haze-Step__stepActiveConnector", s = "haze-Step__circle", c = "haze-Step__activeCircle", l = "haze-Step__completedCircle", u = "haze-Step__titleStyle", d = "haze-Step__activeTitle", f = "haze-Step__completedTitle", p = "haze-Step__descStyle";
|
|
7
7
|
function m({ title: m, description: h, className: g, index: _ = 0 }) {
|
|
8
|
-
let { activeStep: v, totalSteps: y } =
|
|
8
|
+
let { activeStep: v, totalSteps: y } = t(), b = _ === v, x = _ < v;
|
|
9
9
|
return /* @__PURE__ */ r("div", {
|
|
10
10
|
role: "listitem",
|
|
11
|
-
className:
|
|
11
|
+
className: e([i, g]),
|
|
12
12
|
children: [
|
|
13
13
|
/* @__PURE__ */ n("div", {
|
|
14
|
-
className:
|
|
14
|
+
className: e([
|
|
15
15
|
s,
|
|
16
16
|
b && c,
|
|
17
17
|
x && l
|
|
@@ -19,7 +19,7 @@ function m({ title: m, description: h, className: g, index: _ = 0 }) {
|
|
|
19
19
|
children: x ? "✓" : _ + 1
|
|
20
20
|
}),
|
|
21
21
|
/* @__PURE__ */ n("div", {
|
|
22
|
-
className:
|
|
22
|
+
className: e([
|
|
23
23
|
u,
|
|
24
24
|
b && d,
|
|
25
25
|
x && f
|
|
@@ -27,10 +27,10 @@ function m({ title: m, description: h, className: g, index: _ = 0 }) {
|
|
|
27
27
|
children: m
|
|
28
28
|
}),
|
|
29
29
|
h && /* @__PURE__ */ n("div", {
|
|
30
|
-
className:
|
|
30
|
+
className: e([p]),
|
|
31
31
|
children: h
|
|
32
32
|
}),
|
|
33
|
-
_ < y - 1 && /* @__PURE__ */ n("div", { className:
|
|
33
|
+
_ < y - 1 && /* @__PURE__ */ n("div", { className: e([a, x && o]) })
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import { StepperProvider as t } from "./StepperContext.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import { useControl as r } from "react-use-control";
|
|
6
6
|
import { Children as i, cloneElement as a, isValidElement as o } from "react";
|
|
7
7
|
//#region src/lib/components/Stepper/Stepper.tsx
|
|
8
8
|
var s = "haze-Stepper__stepper";
|
|
9
9
|
function c({ activeStep: c, children: l, className: u }) {
|
|
10
|
-
let [d, f] = r(c, 0);
|
|
11
|
-
return /* @__PURE__ */ n(
|
|
10
|
+
let [d, f] = r(c, 0), p = i.count(l);
|
|
11
|
+
return /* @__PURE__ */ n(t, {
|
|
12
12
|
value: {
|
|
13
13
|
activeStep: d,
|
|
14
14
|
setActiveStep: f,
|
|
15
|
-
totalSteps:
|
|
15
|
+
totalSteps: p
|
|
16
16
|
},
|
|
17
|
-
children:
|
|
17
|
+
children: n("div", {
|
|
18
18
|
role: "list",
|
|
19
|
-
className:
|
|
19
|
+
className: e([s, u]),
|
|
20
20
|
children: i.map(l, (e, t) => o(e) ? a(e, { index: t }) : e)
|
|
21
21
|
})
|
|
22
22
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
5
5
|
//#region src/lib/components/StreamingText/StreamingText.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useCallback as r, useRef as i, useState as a } from "react";
|
|
5
5
|
//#region src/lib/components/SwipeAction/SwipeAction.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as n } from "react-use-control";
|
|
5
5
|
//#region src/lib/components/Switch/Switch.tsx
|
|
@@ -32,7 +32,7 @@ function v({ checked: o, size: s = "md", className: c, onClick: l, ...u }) {
|
|
|
32
32
|
d && i,
|
|
33
33
|
c
|
|
34
34
|
]),
|
|
35
|
-
children:
|
|
35
|
+
children: t("span", { className: e([
|
|
36
36
|
a,
|
|
37
37
|
g[s],
|
|
38
38
|
d && _[s]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Table/Table.tsx
|
|
5
5
|
var n = "haze-Table__wrapper", r = "haze-Table__base", i = "haze-Table__stripedStyle", a = "haze-Table__borderedStyle";
|
|
6
6
|
function o({ striped: o = !1, bordered: s = !1, className: c, children: l }) {
|
|
7
7
|
return /* @__PURE__ */ t("div", {
|
|
8
8
|
className: e([n]),
|
|
9
|
-
children:
|
|
9
|
+
children: t("table", {
|
|
10
10
|
className: e([
|
|
11
11
|
r,
|
|
12
12
|
o && i,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Table/TableBody.tsx
|
|
5
5
|
var n = "haze-TableBody__body";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { classnames as e } from "
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
//#region src/lib/components/Table/TableCell.tsx
|
|
4
4
|
function n({ as: n = "td", className: r, children: i, ...a }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Table/TableHead.tsx
|
|
5
5
|
var n = "haze-TableHead__head";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import { useTabsContext as t } from "./TabsContext.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
//#region src/lib/components/Tabs/Tab.tsx
|
|
6
6
|
var r = "haze-Tab__base", i = "haze-Tab__active";
|
|
7
7
|
function a({ value: a, className: o, children: s }) {
|
|
8
|
-
let { value: c, setValue: l } =
|
|
8
|
+
let { value: c, setValue: l } = t(), u = c === a;
|
|
9
9
|
return /* @__PURE__ */ n("button", {
|
|
10
10
|
type: "button",
|
|
11
11
|
role: "tab",
|
|
12
12
|
"aria-selected": u,
|
|
13
13
|
"aria-controls": `tabpanel-${a}`,
|
|
14
14
|
onClick: () => l(a),
|
|
15
|
-
className:
|
|
15
|
+
className: e([
|
|
16
16
|
r,
|
|
17
17
|
u && i,
|
|
18
18
|
o
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import { useTabsContext as t } from "./TabsContext.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
//#region src/lib/components/Tabs/TabPanel.tsx
|
|
6
6
|
var r = "haze-TabPanel__base", i = "haze-TabPanel__hidden";
|
|
7
7
|
function a({ value: a, className: o, children: s }) {
|
|
8
|
-
let { value: c } =
|
|
8
|
+
let { value: c } = t(), l = c === a;
|
|
9
9
|
return /* @__PURE__ */ n("div", {
|
|
10
10
|
role: "tabpanel",
|
|
11
11
|
id: `tabpanel-${a}`,
|
|
12
|
-
className:
|
|
12
|
+
className: e([
|
|
13
13
|
r,
|
|
14
14
|
!l && i,
|
|
15
15
|
o
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import { TabsProvider as t } from "./TabsContext.js";
|
|
2
3
|
/* empty css */
|
|
3
|
-
import { classnames as t } from "babel-runtime-jsx-plus";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
import { useControl as r } from "react-use-control";
|
|
6
6
|
//#region src/lib/components/Tabs/Tabs.tsx
|
|
@@ -8,8 +8,8 @@ var i = "haze-Tabs__base";
|
|
|
8
8
|
function a({ value: a, className: o, children: s }) {
|
|
9
9
|
let [c, l] = r(a, "");
|
|
10
10
|
return /* @__PURE__ */ n("div", {
|
|
11
|
-
className:
|
|
12
|
-
children:
|
|
11
|
+
className: e([i, o]),
|
|
12
|
+
children: n(t, {
|
|
13
13
|
value: {
|
|
14
14
|
value: c,
|
|
15
15
|
setValue: l
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Tag/Tag.tsx
|
|
5
5
|
var r = "haze-Tag__base", i = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/TagGroup/TagGroup.tsx
|
|
5
5
|
var n = "haze-TagGroup__group";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/TagGroup/TagGroupItem.tsx
|
|
5
5
|
var r = "haze-TagGroupItem__tag", i = "haze-TagGroupItem__closeBtn";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as r } from "react-use-control";
|
|
5
5
|
import { useCallback as i, useState as a } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as n } from "react-use-control";
|
|
5
5
|
//#region src/lib/components/Textarea/Textarea.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/ThinkingIndicator/ThinkingIndicator.tsx
|
|
5
5
|
var r = "haze-ThinkingIndicator__wrapper", i = "haze-ThinkingIndicator__dots", a = "haze-ThinkingIndicator__dot", o = "haze-ThinkingIndicator__dot2", s = "haze-ThinkingIndicator__dot3";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as n } from "react-use-control";
|
|
5
5
|
//#region src/lib/components/TimePicker/TimePicker.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Timeline/Timeline.tsx
|
|
5
5
|
var r = "haze-Timeline__base";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as r } from "react";
|
|
5
5
|
//#region src/lib/components/Toast/Toast.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/TokenCounter/TokenCounter.tsx
|
|
5
5
|
var r = "haze-TokenCounter__wrapper", i = "haze-TokenCounter__bar", a = "haze-TokenCounter__fill", o = "haze-TokenCounter__fillNormal", s = "haze-TokenCounter__fillWarning", c = "haze-TokenCounter__fillDanger", l = "haze-TokenCounter__info", u = "haze-TokenCounter__count";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/ToolCallCard/ToolCallCard.tsx
|
|
5
5
|
var r = "haze-ToolCallCard__card", i = "haze-ToolCallCard__header", a = "haze-ToolCallCard__statusIcon", o = "haze-ToolCallCard__statusPending", s = "haze-ToolCallCard__statusRunning", c = "haze-ToolCallCard__statusDone", l = "haze-ToolCallCard__statusError", u = "haze-ToolCallCard__body", d = "haze-ToolCallCard__section", f = "haze-ToolCallCard__sectionLabel", p = "haze-ToolCallCard__content", m = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useId as r } from "react";
|
|
5
5
|
//#region src/lib/components/Tooltip/Tooltip.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
import { useControl as r } from "react-use-control";
|
|
5
5
|
import { useState as i } from "react";
|
|
@@ -10,14 +10,6 @@ function f({ dataSource: f, targetKeys: p, onChange: m, className: h }) {
|
|
|
10
10
|
y((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
11
11
|
}, T = (e) => {
|
|
12
12
|
x((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
13
|
-
}, E = () => {
|
|
14
|
-
if (v.length === 0) return;
|
|
15
|
-
let e = [...g, ...v];
|
|
16
|
-
_(e), m?.(e, "right", v), y([]);
|
|
17
|
-
}, D = () => {
|
|
18
|
-
if (b.length === 0) return;
|
|
19
|
-
let e = g.filter((e) => !b.includes(e));
|
|
20
|
-
_(e), m?.(e, "left", b), x([]);
|
|
21
13
|
};
|
|
22
14
|
return /* @__PURE__ */ n("div", {
|
|
23
15
|
className: e([a, h]),
|
|
@@ -50,14 +42,22 @@ function f({ dataSource: f, targetKeys: p, onChange: m, className: h }) {
|
|
|
50
42
|
children: [/* @__PURE__ */ t("button", {
|
|
51
43
|
type: "button",
|
|
52
44
|
disabled: v.length === 0,
|
|
53
|
-
onClick:
|
|
45
|
+
onClick: () => {
|
|
46
|
+
if (v.length === 0) return;
|
|
47
|
+
let e = [...g, ...v];
|
|
48
|
+
_(e), m?.(e, "right", v), y([]);
|
|
49
|
+
},
|
|
54
50
|
"aria-label": ">",
|
|
55
51
|
className: e([d]),
|
|
56
52
|
children: "›"
|
|
57
53
|
}), /* @__PURE__ */ t("button", {
|
|
58
54
|
type: "button",
|
|
59
55
|
disabled: b.length === 0,
|
|
60
|
-
onClick:
|
|
56
|
+
onClick: () => {
|
|
57
|
+
if (b.length === 0) return;
|
|
58
|
+
let e = g.filter((e) => !b.includes(e));
|
|
59
|
+
_(e), m?.(e, "left", b), x([]);
|
|
60
|
+
},
|
|
61
61
|
"aria-label": "<",
|
|
62
62
|
className: e([d]),
|
|
63
63
|
children: "‹"
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
2
|
+
import t from "./TreeItem.js";
|
|
3
|
+
import { findNodeByKey as n, getChildKeys as r, getParentKey as i } from "./utils.js";
|
|
3
4
|
/* empty css */
|
|
4
|
-
import { classnames as i } from "babel-runtime-jsx-plus";
|
|
5
5
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import { useControl as s } from "react-use-control";
|
|
7
7
|
import { useMemo as c } from "react";
|
|
8
8
|
//#region src/lib/components/Tree/Tree.tsx
|
|
9
9
|
var l = "haze-Tree__base", u = "haze-Tree__group";
|
|
10
|
-
function d(e, t,
|
|
11
|
-
if (
|
|
10
|
+
function d(e, t, n) {
|
|
11
|
+
if (n) return {
|
|
12
12
|
checked: e,
|
|
13
13
|
halfChecked: []
|
|
14
14
|
};
|
|
15
15
|
let i = new Set(e), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
16
|
-
for (let
|
|
17
|
-
s(
|
|
18
|
-
let e =
|
|
19
|
-
c.length === 0 ? o.add(
|
|
16
|
+
for (let n of e) if (n.children?.length) {
|
|
17
|
+
s(n.children);
|
|
18
|
+
let e = r(t, n.key), c = e.filter((e) => i.has(e));
|
|
19
|
+
c.length === 0 ? o.add(n.key) : c.length < e.length && (a.add(n.key), o.add(n.key));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
return s(t), {
|
|
@@ -31,56 +31,56 @@ function f({ treeData: f, multiple: p = !1, checkable: m = !1, checkStrictly: h
|
|
|
31
31
|
h
|
|
32
32
|
]), B = z.checked, V = z.halfChecked;
|
|
33
33
|
function H(e) {
|
|
34
|
-
let
|
|
34
|
+
let t = M.includes(e), r = t ? M.filter((t) => t !== e) : [...M, e];
|
|
35
35
|
N(r), k?.(r, {
|
|
36
|
-
expanded: !
|
|
37
|
-
node:
|
|
36
|
+
expanded: !t,
|
|
37
|
+
node: n(f, e)
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
function U(e) {
|
|
41
|
-
let
|
|
42
|
-
if (!
|
|
41
|
+
let t = n(f, e);
|
|
42
|
+
if (!t?.selectable && t?.selectable !== void 0 || !g) return;
|
|
43
43
|
let r;
|
|
44
44
|
r = p ? P.indexOf(e) >= 0 ? P.filter((t) => t !== e) : [...P, e] : P.includes(e) ? [] : [e], F(r), A?.(r, {
|
|
45
45
|
selected: r.includes(e),
|
|
46
|
-
selectedNodes: r.map((e) =>
|
|
47
|
-
node:
|
|
46
|
+
selectedNodes: r.map((e) => n(f, e)).filter(Boolean),
|
|
47
|
+
node: t
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
function W(e) {
|
|
51
|
-
if (!m ||
|
|
52
|
-
let
|
|
53
|
-
if (h) a =
|
|
51
|
+
if (!m || n(f, e)?.disableCheckbox) return;
|
|
52
|
+
let t = B.includes(e), a;
|
|
53
|
+
if (h) a = t ? B.filter((t) => t !== e) : [...B, e];
|
|
54
54
|
else {
|
|
55
|
-
let
|
|
56
|
-
if (
|
|
57
|
-
a = B.filter((
|
|
58
|
-
let
|
|
59
|
-
for (;
|
|
55
|
+
let n = r(f, e);
|
|
56
|
+
if (t) {
|
|
57
|
+
a = B.filter((t) => t !== e && !n.includes(t));
|
|
58
|
+
let t = i(f, e);
|
|
59
|
+
for (; t;) a = a.filter((e) => e !== t), t = i(f, t);
|
|
60
60
|
} else {
|
|
61
|
-
let
|
|
62
|
-
a = [...B, ...
|
|
63
|
-
let o =
|
|
64
|
-
for (; o;)
|
|
61
|
+
let t = [e, ...n].filter((e) => !B.includes(e));
|
|
62
|
+
a = [...B, ...t];
|
|
63
|
+
let o = i(f, e);
|
|
64
|
+
for (; o;) r(f, o).every((e) => a.includes(e)) && !a.includes(o) && a.push(o), o = i(f, o);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
let o = d(a, f, h);
|
|
68
68
|
L(h ? a : o.checked), j?.(h ? a : o, {
|
|
69
|
-
checked: !
|
|
70
|
-
checkedNodes: a.map((e) =>
|
|
71
|
-
node:
|
|
69
|
+
checked: !t,
|
|
70
|
+
checkedNodes: a.map((e) => n(f, e)).filter(Boolean),
|
|
71
|
+
node: n(f, e),
|
|
72
72
|
halfCheckedKeys: o.halfChecked
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function G(
|
|
76
|
-
return
|
|
77
|
-
let l = !!s.children?.length, d = M.includes(s.key), f = P.includes(s.key), p = B.includes(s.key), h = V.includes(s.key), T = p ? "checked" : h ? "halfChecked" : "unchecked", E = c ===
|
|
75
|
+
function G(n, r, i) {
|
|
76
|
+
return n.map((s, c) => {
|
|
77
|
+
let l = !!s.children?.length, d = M.includes(s.key), f = P.includes(s.key), p = B.includes(s.key), h = V.includes(s.key), T = p ? "checked" : h ? "halfChecked" : "unchecked", E = c === n.length - 1, D = [...i, E];
|
|
78
78
|
return /* @__PURE__ */ o("div", {
|
|
79
79
|
role: "group",
|
|
80
|
-
className:
|
|
81
|
-
children: [/* @__PURE__ */ a(
|
|
80
|
+
className: e(u),
|
|
81
|
+
children: [/* @__PURE__ */ a(t, {
|
|
82
82
|
node: s,
|
|
83
|
-
level:
|
|
83
|
+
level: r,
|
|
84
84
|
expanded: d,
|
|
85
85
|
selected: f,
|
|
86
86
|
checked: T,
|
|
@@ -99,13 +99,13 @@ function f({ treeData: f, multiple: p = !1, checkable: m = !1, checkStrictly: h
|
|
|
99
99
|
onToggle: () => H(s.key),
|
|
100
100
|
onSelect: () => U(s.key),
|
|
101
101
|
onCheck: () => W(s.key)
|
|
102
|
-
}), l && d && /* @__PURE__ */ a("div", { children: G(s.children,
|
|
102
|
+
}), l && d && /* @__PURE__ */ a("div", { children: G(s.children, r + 1, D) })]
|
|
103
103
|
}, s.key);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
return /* @__PURE__ */ a("div", {
|
|
107
107
|
role: "tree",
|
|
108
|
-
className:
|
|
108
|
+
className: e([l, O]),
|
|
109
109
|
children: G(f, 0, [])
|
|
110
110
|
});
|
|
111
111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Tree/TreeItem.tsx
|
|
5
5
|
var r = "haze-TreeItem__item", i = "haze-TreeItem__blockItem", a = "haze-TreeItem__selectedStyle", o = "haze-TreeItem__disabledStyle", s = "haze-TreeItem__switcher", c = "haze-TreeItem__switcherExpanded", l = "haze-TreeItem__checkbox", u = "haze-TreeItem__checkboxChecked", d = "haze-TreeItem__checkboxHalfChecked", f = "haze-TreeItem__nodeIcon", p = "haze-TreeItem__title", m = "haze-TreeItem__loadingIcon", h = "haze-TreeItem__indentLine", g = "haze-TreeItem__indentLineWithBorder", _ = () => /* @__PURE__ */ t("svg", {
|
|
@@ -9,7 +9,7 @@ var r = "haze-TreeItem__item", i = "haze-TreeItem__blockItem", a = "haze-TreeIte
|
|
|
9
9
|
strokeWidth: "2",
|
|
10
10
|
strokeLinecap: "round",
|
|
11
11
|
strokeLinejoin: "round",
|
|
12
|
-
children:
|
|
12
|
+
children: t("path", { d: "M4 2l4 4-4 4" })
|
|
13
13
|
}), v = () => /* @__PURE__ */ t("svg", {
|
|
14
14
|
viewBox: "0 0 12 12",
|
|
15
15
|
fill: "none",
|
|
@@ -17,18 +17,18 @@ var r = "haze-TreeItem__item", i = "haze-TreeItem__blockItem", a = "haze-TreeIte
|
|
|
17
17
|
strokeWidth: "2",
|
|
18
18
|
strokeLinecap: "round",
|
|
19
19
|
strokeLinejoin: "round",
|
|
20
|
-
children:
|
|
20
|
+
children: t("path", { d: "M2 6l3 3 5-5" })
|
|
21
21
|
}), y = () => /* @__PURE__ */ t("svg", {
|
|
22
22
|
viewBox: "0 0 12 12",
|
|
23
23
|
fill: "none",
|
|
24
24
|
stroke: "currentColor",
|
|
25
25
|
strokeWidth: "2",
|
|
26
26
|
strokeLinecap: "round",
|
|
27
|
-
children:
|
|
27
|
+
children: t("path", { d: "M2 6h8" })
|
|
28
28
|
}), b = () => /* @__PURE__ */ t("svg", {
|
|
29
29
|
viewBox: "0 0 16 16",
|
|
30
30
|
fill: "currentColor",
|
|
31
|
-
children:
|
|
31
|
+
children: t("path", { d: "M1 3.5A1.5 1.5 0 0 1 2.5 2h2.764c.958 0 1.76.56 2.311 1.184C7.985 3.648 8.48 4 9 4h4.5A1.5 1.5 0 0 1 15 5.5v7a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 12.5v-9z" })
|
|
32
32
|
}), x = () => /* @__PURE__ */ n("svg", {
|
|
33
33
|
viewBox: "0 0 16 16",
|
|
34
34
|
fill: "currentColor",
|
|
@@ -39,7 +39,7 @@ var r = "haze-TreeItem__item", i = "haze-TreeItem__blockItem", a = "haze-TreeIte
|
|
|
39
39
|
}), S = () => /* @__PURE__ */ t("svg", {
|
|
40
40
|
viewBox: "0 0 16 16",
|
|
41
41
|
fill: "currentColor",
|
|
42
|
-
children:
|
|
42
|
+
children: t("path", { d: "M4 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.414a2 2 0 0 0-.586-1.414L10.586.172A2 2 0 0 0 9.172 0H4zm1 1a1 1 0 0 1 1-1h3.172a1 1 0 0 1 .707.293l2.121 2.121a1 1 0 0 1 .293.707V13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V1z" })
|
|
43
43
|
}), C = () => /* @__PURE__ */ n("svg", {
|
|
44
44
|
viewBox: "0 0 16 16",
|
|
45
45
|
fill: "currentColor",
|
|
@@ -50,7 +50,7 @@ var r = "haze-TreeItem__item", i = "haze-TreeItem__blockItem", a = "haze-TreeIte
|
|
|
50
50
|
});
|
|
51
51
|
function w({ node: w, level: T, expanded: E, selected: D, checked: O, disabled: k, checkable: A, selectable: j, blockNode: M, showLine: N, showIcon: P, switcherIcon: F, loadingIcon: I, loading: L, titleRender: R, iconRender: z, isLast: B, onToggle: V, onSelect: H, onCheck: U }) {
|
|
52
52
|
let W = !!w.children?.length, G = w.isLeaf ?? !W, K = Array.from({ length: T }, (e, t) => ({ showLine: N && !B[t] })), q = R ? R(w) : w.title, J = z ? z(w) : w.icon;
|
|
53
|
-
return /* @__PURE__ */ t("div", { children:
|
|
53
|
+
return /* @__PURE__ */ t("div", { children: n("div", {
|
|
54
54
|
role: "treeitem",
|
|
55
55
|
"aria-selected": D,
|
|
56
56
|
"aria-expanded": G ? void 0 : E,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/lib/components/Typography/Typography.tsx
|
|
5
5
|
var n = "haze-Typography__titleBase", r = {
|
|
@@ -10,7 +10,8 @@ var n = "haze-Typography__titleBase", r = {
|
|
|
10
10
|
5: "haze-Typography__5"
|
|
11
11
|
};
|
|
12
12
|
function i({ level: i = 1, className: a, children: o }) {
|
|
13
|
-
|
|
13
|
+
let s = `h${i}`;
|
|
14
|
+
return /* @__PURE__ */ t(s, {
|
|
14
15
|
className: e([
|
|
15
16
|
n,
|
|
16
17
|
r[i],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { useCallback as i, useRef as a } from "react";
|
|
5
5
|
//#region src/lib/components/Upload/Upload.tsx
|
|
@@ -10,17 +10,17 @@ function l({ accept: l, multiple: u = !1, onChange: d, className: f, children: p
|
|
|
10
10
|
}, []), g = i((e) => {
|
|
11
11
|
let t = Array.from(e.target.files || []);
|
|
12
12
|
t.length > 0 && d?.(t), e.target.value = "";
|
|
13
|
-
}, [d])
|
|
13
|
+
}, [d]), _ = i((e) => {
|
|
14
|
+
e.preventDefault();
|
|
15
|
+
let t = Array.from(e.dataTransfer.files);
|
|
16
|
+
t.length > 0 && d?.(t);
|
|
17
|
+
}, [d]), v = i((e) => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
}, []);
|
|
14
20
|
return /* @__PURE__ */ r("div", {
|
|
15
21
|
onClick: h,
|
|
16
|
-
onDrop:
|
|
17
|
-
|
|
18
|
-
let t = Array.from(e.dataTransfer.files);
|
|
19
|
-
t.length > 0 && d?.(t);
|
|
20
|
-
}, [d]),
|
|
21
|
-
onDragOver: i((e) => {
|
|
22
|
-
e.preventDefault();
|
|
23
|
-
}, []),
|
|
22
|
+
onDrop: _,
|
|
23
|
+
onDragOver: v,
|
|
24
24
|
role: "button",
|
|
25
25
|
tabIndex: 0,
|
|
26
26
|
className: e([o, f]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import { classnames as e } from "babel-runtime-jsx-plus";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
5
5
|
//#region src/lib/components/VirtualList/VirtualList.tsx
|
|
@@ -17,7 +17,7 @@ function c({ items: c, height: l, itemHeight: u, renderItem: d, overscan: f = 5,
|
|
|
17
17
|
ref: g,
|
|
18
18
|
style: { height: l },
|
|
19
19
|
className: e([o, p]),
|
|
20
|
-
children:
|
|
20
|
+
children: t("div", {
|
|
21
21
|
style: { height: v },
|
|
22
22
|
className: e([s]),
|
|
23
23
|
children: x.map((e, n) => /* @__PURE__ */ t("div", {
|