haze-ui 1.30.0 → 1.32.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/README.md +67 -1
- package/dist/components/ActivityRail/ActivityRail.js +76 -0
- package/dist/components/ActivityRail/index.js +3 -0
- package/dist/components/BottomSheet/BottomSheet.js +12 -26
- package/dist/components/Button/Button.js +33 -15
- package/dist/components/Button/ButtonLink.js +12 -21
- package/dist/components/Button/styles.js +2 -2
- package/dist/components/Cascader/Cascader.js +11 -11
- package/dist/components/ColorPicker/ColorPicker.js +4 -4
- package/dist/components/Combobox/Combobox.js +128 -119
- package/dist/components/Command/Command.js +9 -9
- package/dist/components/ConfigProvider/ConfigContext.js +16 -0
- package/dist/components/ConfirmDialog/confirm.js +41 -0
- package/dist/components/ConfirmDialog/index.js +2 -1
- package/dist/components/ConversationList/ConversationList.js +16 -7
- package/dist/components/DataTable/DataTable.js +24 -24
- package/dist/components/DateTimePicker/DateTimePicker.js +25 -0
- package/dist/components/DateTimePicker/index.js +3 -0
- package/dist/components/Datepicker/Datepicker.js +8 -7
- package/dist/components/Datepicker/DatepickerCore.js +60 -59
- package/dist/components/Drawer/Drawer.js +45 -40
- package/dist/components/Fieldset/Fieldset.js +25 -0
- package/dist/components/Fieldset/index.js +2 -0
- package/dist/components/Highlight/Highlight.js +19 -0
- package/dist/components/Highlight/index.js +2 -0
- package/dist/components/Indicator/Indicator.js +37 -0
- package/dist/components/Indicator/index.js +2 -0
- package/dist/components/InlineCompletion/InlineCompletion.js +4 -4
- package/dist/components/Input/Input.js +9 -7
- package/dist/components/Input/InputCore.js +32 -13
- package/dist/components/List/List.js +14 -10
- package/dist/components/LoadingOverlay/LoadingOverlay.js +30 -0
- package/dist/components/LoadingOverlay/index.js +3 -0
- package/dist/components/LocaleProvider/ar-sa.js +11 -0
- package/dist/components/LocaleProvider/de-de.js +11 -0
- package/dist/components/LocaleProvider/es-es.js +11 -0
- package/dist/components/LocaleProvider/fr-fr.js +11 -0
- package/dist/components/LocaleProvider/it-it.js +11 -0
- package/dist/components/LocaleProvider/ja-jp.js +11 -0
- package/dist/components/LocaleProvider/ko-kr.js +11 -0
- package/dist/components/LocaleProvider/locale.js +11 -0
- package/dist/components/LocaleProvider/pt-br.js +11 -0
- package/dist/components/LocaleProvider/ru-ru.js +11 -0
- package/dist/components/LocaleProvider/zh-cn.js +11 -0
- package/dist/components/LogViewer/LogViewer.js +45 -38
- package/dist/components/Mark/Mark.js +20 -0
- package/dist/components/Mark/index.js +2 -0
- package/dist/components/Mentions/MentionsCore.js +3 -3
- package/dist/components/Menu/MenuItem.js +6 -4
- package/dist/components/NumberFormatter/NumberFormatter.js +16 -0
- package/dist/components/NumberFormatter/index.js +2 -0
- package/dist/components/OTPInput/OTPInputCore.js +7 -6
- package/dist/components/PasswordInput/PasswordInputCore.js +27 -26
- package/dist/components/Rating/RatingCore.js +18 -18
- package/dist/components/Resizable/Resizable.js +266 -36
- package/dist/components/Select/Select.js +28 -23
- package/dist/components/Select/SelectCore.js +26 -23
- package/dist/components/Select/SelectFloating.js +157 -153
- package/dist/components/Sparkline/Sparkline.js +45 -0
- package/dist/components/Sparkline/index.js +3 -0
- package/dist/components/Sparkline/sparkline-styles.js +18 -0
- package/dist/components/Spoiler/Spoiler.js +36 -0
- package/dist/components/Spoiler/index.js +3 -0
- package/dist/components/StatusBar/StatusBar.js +47 -0
- package/dist/components/StatusBar/index.js +3 -0
- package/dist/components/TabBar/TabBar.js +60 -0
- package/dist/components/TabBar/index.js +3 -0
- package/dist/components/Tabs/SortableTabList.js +116 -0
- package/dist/components/Tabs/Tab.js +83 -16
- package/dist/components/Tabs/TabList.js +94 -38
- package/dist/components/Tabs/edge-scroll.js +6 -0
- package/dist/components/Tabs/index.js +4 -3
- package/dist/components/Tabs/tab-metas.js +24 -0
- package/dist/components/TagGroup/SortableTagGroup.js +32 -20
- package/dist/components/TagGroup/TagGroup.js +23 -9
- package/dist/components/TagGroup/TagGroupItem.js +21 -15
- package/dist/components/TagInput/SortableTagInputCore.js +11 -11
- package/dist/components/TagInput/TagInputCore.js +10 -10
- package/dist/components/TimePicker/TimePickerPanel.js +3 -3
- package/dist/components/Toast/ToastContainer.js +5 -5
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toast/{toast2.js → toast-channel.js} +1 -1
- package/dist/components/Toast/useToast.js +1 -1
- package/dist/components/Tree/SortableTree.js +39 -39
- package/dist/components/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/VirtualList/VirtualList.js +133 -121
- package/dist/components/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/components/VisuallyHidden/index.js +2 -0
- package/dist/components/Workbench/Workbench.js +144 -0
- package/dist/components/Workbench/index.js +3 -0
- package/dist/css/accordion.css +2 -0
- package/dist/css/activity-rail.css +4 -0
- package/dist/css/affix.css +2 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/anchor.css +2 -0
- package/dist/css/app-shell.css +3 -1
- package/dist/css/approval-card.css +2 -0
- package/dist/css/aspect-ratio.css +2 -0
- package/dist/css/async-section.css +2 -0
- package/dist/css/avatar-group.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/back-to-top.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/banner.css +2 -0
- package/dist/css/bottom-sheet.css +2 -0
- package/dist/css/breadcrumb.css +3 -1
- package/dist/css/button.css +3 -2
- package/dist/css/calendar.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/cascader.css +2 -0
- package/dist/css/chart.css +2 -0
- package/dist/css/chat-container.css +2 -0
- package/dist/css/chat-input.css +2 -0
- package/dist/css/chat-message.css +2 -0
- package/dist/css/checkbox.css +3 -1
- package/dist/css/chip.css +2 -0
- package/dist/css/code-block.css +2 -0
- package/dist/css/collapsible.css +2 -0
- package/dist/css/color-picker.css +2 -0
- package/dist/css/combobox.css +2 -0
- package/dist/css/command.css +3 -1
- package/dist/css/confirm-dialog.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/context-menu.css +3 -1
- package/dist/css/conversation-list.css +2 -0
- package/dist/css/count-up.css +2 -0
- package/dist/css/data-table.css +2 -0
- package/dist/css/date-range-picker.css +3 -1
- package/dist/css/datepicker.css +2 -0
- package/dist/css/descriptions.css +2 -0
- package/dist/css/dialog.css +2 -0
- package/dist/css/diff-viewer.css +2 -0
- package/dist/css/disclosure.css +2 -0
- package/dist/css/divider.css +2 -0
- package/dist/css/drawer.css +3 -1
- package/dist/css/dropdown-menu.css +4 -2
- package/dist/css/ellipsis.css +2 -0
- package/dist/css/empty.css +2 -0
- package/dist/css/fieldset.css +4 -0
- package/dist/css/file-input.css +2 -0
- package/dist/css/file-preview.css +2 -0
- package/dist/css/flex.css +2 -0
- package/dist/css/float-button.css +2 -0
- package/dist/css/form.css +2 -0
- package/dist/css/grid.css +2 -0
- package/dist/css/hover-card.css +3 -1
- package/dist/css/icon.css +2 -0
- package/dist/css/image.css +2 -0
- package/dist/css/indicator.css +4 -0
- package/dist/css/inline-completion.css +2 -0
- package/dist/css/inline-edit.css +2 -0
- package/dist/css/input.css +3 -1
- package/dist/css/json-view.css +2 -0
- package/dist/css/kbd.css +2 -0
- package/dist/css/list.css +3 -1
- package/dist/css/loading-overlay.css +4 -0
- package/dist/css/log-viewer.css +2 -0
- package/dist/css/mark.css +4 -0
- package/dist/css/markdown-renderer.css +2 -0
- package/dist/css/masonry.css +2 -0
- package/dist/css/mentions.css +2 -0
- package/dist/css/menu.css +5 -3
- package/dist/css/model-picker.css +2 -0
- package/dist/css/navigation-bar.css +2 -0
- package/dist/css/number-input.css +2 -0
- package/dist/css/otp-input.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/password-input.css +3 -1
- package/dist/css/popover.css +3 -1
- package/dist/css/progress.css +2 -0
- package/dist/css/prompt-input.css +2 -0
- package/dist/css/qr-code.css +2 -0
- package/dist/css/radio.css +3 -1
- package/dist/css/rating.css +2 -0
- package/dist/css/resizable.css +3 -1
- package/dist/css/result.css +2 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/segmented.css +3 -1
- package/dist/css/select.css +2 -0
- package/dist/css/sidebar.css +3 -1
- package/dist/css/signature.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/slider.css +3 -1
- package/dist/css/sources.css +2 -0
- package/dist/css/sparkline.css +4 -0
- package/dist/css/spinner.css +2 -0
- package/dist/css/spoiler.css +4 -0
- package/dist/css/stat.css +2 -0
- package/dist/css/status-bar.css +4 -0
- package/dist/css/step-timeline.css +2 -0
- package/dist/css/stepper.css +2 -0
- package/dist/css/streaming-text.css +2 -0
- package/dist/css/swipe-action.css +2 -0
- package/dist/css/switch.css +3 -1
- package/dist/css/tab-bar.css +4 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +5 -2
- package/dist/css/tag-group.css +2 -0
- package/dist/css/tag-input.css +2 -0
- package/dist/css/tag.css +3 -1
- package/dist/css/textarea.css +2 -0
- package/dist/css/thinking-indicator.css +2 -0
- package/dist/css/time-picker.css +2 -0
- package/dist/css/timeline.css +2 -0
- package/dist/css/toast.css +2 -0
- package/dist/css/toggle.css +2 -0
- package/dist/css/token-counter.css +2 -0
- package/dist/css/tokens.css +2 -0
- package/dist/css/tool-call-card.css +2 -0
- package/dist/css/toolbar.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/tour.css +2 -0
- package/dist/css/transfer.css +2 -0
- package/dist/css/tree-select.css +2 -0
- package/dist/css/tree.css +3 -1
- package/dist/css/typography.css +2 -0
- package/dist/css/upload.css +2 -0
- package/dist/css/virtual-list.css +2 -0
- package/dist/css/visually-hidden.css +4 -0
- package/dist/css/watermark.css +2 -0
- package/dist/css/workbench.css +4 -0
- package/dist/css-manifest.json +202 -1
- package/dist/dates/adapter.js +9 -1
- package/dist/dates/buddhist.js +43 -0
- package/dist/dates/ethiopic.js +67 -0
- package/dist/dates/hebrew.js +95 -0
- package/dist/dates/japanese.js +41 -0
- package/dist/dates/persian.js +121 -0
- package/dist/dates/registry.js +14 -4
- package/dist/haze-ui.css +435 -29
- package/dist/headless/index.js +18 -17
- package/dist/hooks/useBusyPressable.js +10 -0
- package/dist/index.js +263 -241
- package/dist/mcp-docs.json +1073 -33
- package/dist/registry.json +256 -14
- package/dist/types/components/ActivityRail/ActivityRail.d.ts +30 -0
- package/dist/types/components/ActivityRail/index.d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +50 -5
- package/dist/types/components/Button/ButtonLink.d.ts +27 -15
- package/dist/types/components/Button/styles.d.ts +34 -0
- package/dist/types/components/Combobox/Combobox.d.ts +20 -2
- package/dist/types/components/Combobox/index.d.ts +1 -1
- package/dist/types/components/ConfigProvider/ConfigContext.d.ts +20 -0
- package/dist/types/components/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/types/components/ConfirmDialog/confirm.d.ts +33 -0
- package/dist/types/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/types/components/ConversationList/ConversationList.d.ts +10 -1
- package/dist/types/components/DateTimePicker/DateTimePicker.d.ts +36 -0
- package/dist/types/components/DateTimePicker/index.d.ts +2 -0
- package/dist/types/components/Datepicker/Datepicker.d.ts +3 -3
- package/dist/types/components/Datepicker/DatepickerCore.d.ts +3 -3
- package/dist/types/components/Drawer/Drawer.d.ts +15 -2
- package/dist/types/components/Drawer/index.d.ts +1 -1
- package/dist/types/components/Fieldset/Fieldset.d.ts +16 -0
- package/dist/types/components/Fieldset/index.d.ts +2 -0
- package/dist/types/components/Highlight/Highlight.d.ts +27 -0
- package/dist/types/components/Highlight/index.d.ts +2 -0
- package/dist/types/components/Indicator/Indicator.d.ts +24 -0
- package/dist/types/components/Indicator/index.d.ts +2 -0
- package/dist/types/components/Input/Input.d.ts +8 -2
- package/dist/types/components/Input/InputCore.d.ts +11 -2
- package/dist/types/components/List/List.d.ts +10 -1
- package/dist/types/components/LoadingOverlay/LoadingOverlay.d.ts +25 -0
- package/dist/types/components/LoadingOverlay/index.d.ts +2 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +11 -0
- package/dist/types/components/LogViewer/LogViewer.d.ts +10 -1
- package/dist/types/components/Mark/Mark.d.ts +12 -0
- package/dist/types/components/Mark/index.d.ts +2 -0
- package/dist/types/components/Menu/MenuItem.d.ts +15 -4
- package/dist/types/components/NumberFormatter/NumberFormatter.d.ts +23 -0
- package/dist/types/components/NumberFormatter/index.d.ts +2 -0
- package/dist/types/components/Resizable/Resizable.d.ts +24 -7
- package/dist/types/components/Resizable/index.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +23 -2
- package/dist/types/components/Select/SelectCore.d.ts +4 -1
- package/dist/types/components/Select/SelectFloating.d.ts +6 -1
- package/dist/types/components/Select/index.d.ts +1 -1
- package/dist/types/components/Sparkline/Sparkline.d.ts +31 -0
- package/dist/types/components/Sparkline/index.d.ts +3 -0
- package/dist/types/components/Sparkline/sparkline-styles.d.ts +26 -0
- package/dist/types/components/Spoiler/Spoiler.d.ts +20 -0
- package/dist/types/components/Spoiler/index.d.ts +2 -0
- package/dist/types/components/StatusBar/StatusBar.d.ts +18 -0
- package/dist/types/components/StatusBar/index.d.ts +3 -0
- package/dist/types/components/TabBar/TabBar.d.ts +23 -0
- package/dist/types/components/TabBar/index.d.ts +4 -0
- package/dist/types/components/Tabs/SortableTabList.d.ts +46 -0
- package/dist/types/components/Tabs/Tab.d.ts +54 -3
- package/dist/types/components/Tabs/TabList.d.ts +26 -2
- package/dist/types/components/Tabs/edge-scroll.d.ts +17 -0
- package/dist/types/components/Tabs/index.d.ts +3 -1
- package/dist/types/components/Tabs/tab-metas.d.ts +20 -0
- package/dist/types/components/TagGroup/SortableTagGroup.d.ts +5 -1
- package/dist/types/components/TagGroup/TagGroup.d.ts +24 -2
- package/dist/types/components/TagGroup/index.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +2 -2
- package/dist/types/components/Toast/useToast.d.ts +1 -1
- package/dist/types/components/VirtualList/VirtualList.d.ts +20 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +4 -0
- package/dist/types/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/types/components/Workbench/Workbench.d.ts +50 -0
- package/dist/types/components/Workbench/index.d.ts +2 -0
- package/dist/types/dates/adapter.d.ts +33 -6
- package/dist/types/dates/buddhist.d.ts +14 -0
- package/dist/types/dates/ethiopic.d.ts +15 -0
- package/dist/types/dates/hebrew.d.ts +19 -0
- package/dist/types/dates/index.d.ts +5 -0
- package/dist/types/dates/japanese.d.ts +16 -0
- package/dist/types/dates/persian.d.ts +18 -0
- package/dist/types/dates/registry.d.ts +1 -1
- package/dist/types/headless/index.d.ts +9 -0
- package/dist/types/hooks/index.d.ts +13 -0
- package/dist/types/hooks/useBusyPressable.d.ts +33 -0
- package/dist/types/hooks/useElementSize.d.ts +38 -0
- package/dist/types/hooks/useIdle.d.ts +45 -0
- package/dist/types/hooks/useMutationObserver.d.ts +35 -0
- package/dist/types/hooks/useNetwork.d.ts +31 -0
- package/dist/types/hooks/useOrientation.d.ts +23 -0
- package/dist/types/hooks/useResizeObserver.d.ts +48 -0
- package/dist/types/index.d.ts +37 -9
- package/dist/types/utils/sortable.d.ts +8 -1
- package/dist/types/utils/use-end-reached.d.ts +56 -0
- package/dist/types/utils/viewport.d.ts +12 -0
- package/dist/utils/sortable-shared.js +3 -3
- package/dist/utils/sortable.js +15 -14
- package/dist/utils/use-end-reached.js +46 -0
- package/dist/utils/viewport.js +20 -0
- package/package.json +13 -5
- /package/dist/types/components/Toast/{toast.d.ts → toast-channel.d.ts} +0 -0
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
import { classnames as e } from "../../utils/classnames.js";
|
|
4
4
|
import { getDirection as t } from "../../utils/direction.js";
|
|
5
|
+
import { useEndReached as n } from "../../utils/use-end-reached.js";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { jsx as
|
|
7
|
+
import { useCallback as r, useEffect as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
|
|
8
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
9
|
//#region src/lib/components/VirtualList/VirtualList.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
10
|
+
var u = "haze-VirtualList__container", d = "haze-VirtualList__containerHorizontal", f = "haze-VirtualList__viewport", p = "haze-VirtualList__viewportHorizontal", ee = "haze-VirtualList__groupHeader", te = "haze-VirtualList__groupHeaderHorizontal";
|
|
11
|
+
function ne(e, t, n) {
|
|
11
12
|
let r = 0, i = t - 1;
|
|
12
13
|
for (; r < i;) {
|
|
13
14
|
let t = r + i >> 1;
|
|
@@ -15,7 +16,7 @@ function te(e, t, n) {
|
|
|
15
16
|
}
|
|
16
17
|
return r;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function re(e, t, n) {
|
|
19
20
|
let r = 0, i = t;
|
|
20
21
|
for (; r < i;) {
|
|
21
22
|
let t = r + i >> 1;
|
|
@@ -36,141 +37,152 @@ function g(e, n, r) {
|
|
|
36
37
|
}
|
|
37
38
|
e.scrollLeft = t(e) === "rtl" ? -r : r;
|
|
38
39
|
}
|
|
39
|
-
function _({ items: t, height: _, width: v, itemHeight: y, estimatedItemHeight: b, columns: x, columnWidth:
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
let
|
|
45
|
-
|
|
40
|
+
function _({ items: t, height: _, width: v, itemHeight: y, estimatedItemHeight: b, columns: x, columnWidth: ie, orientation: ae = "vertical", groups: S, renderItem: C, overscan: w = 5, onEndReached: oe, endReachedThreshold: se, reverse: T = !1, className: ce, style: le, ref: ue, ...de }) {
|
|
41
|
+
let E = ae === "horizontal", D = !E && x !== void 0 && x > 1, O = D ? x : 1, k = ie ?? y;
|
|
42
|
+
i(() => {
|
|
43
|
+
E && x !== void 0 && x > 1 && console.error("VirtualList: `columns` requires orientation='vertical' (the default); the horizontal list ignores it.");
|
|
44
|
+
}, [E, x]);
|
|
45
|
+
let A = b !== void 0, j = S !== void 0 && S.length > 0, M = b ?? y, N = D ? Math.ceil(t.length / O) : t.length, [P, F] = s(0), [I, L] = s(0), [R, fe] = s(0), [z, pe] = s(0), B = o(null), V = o(!0), H = o(/* @__PURE__ */ new Map()), U = o(/* @__PURE__ */ new Map()), W = o(null), me = o(null), G = n({
|
|
46
|
+
ref: B,
|
|
47
|
+
onEndReached: oe,
|
|
48
|
+
threshold: se ?? 200,
|
|
49
|
+
contentUnits: t.length,
|
|
50
|
+
axis: E ? "x" : "y",
|
|
51
|
+
fromStart: T,
|
|
52
|
+
extentFallback: E ? v : _,
|
|
53
|
+
attach: !1
|
|
54
|
+
}), K = r(() => {
|
|
55
|
+
let e = B.current;
|
|
46
56
|
if (e) {
|
|
47
|
-
if (
|
|
48
|
-
if (
|
|
57
|
+
if (F(h(e, E ? "x" : "y")), T) {
|
|
58
|
+
if (E) {
|
|
49
59
|
let t = e.clientWidth || v || 0;
|
|
50
|
-
|
|
60
|
+
V.current = e.scrollWidth - h(e, "x") - t <= 1;
|
|
51
61
|
} else {
|
|
52
62
|
let t = e.clientHeight || _;
|
|
53
|
-
|
|
63
|
+
V.current = e.scrollHeight - e.scrollTop - t <= 1;
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
|
-
|
|
66
|
+
D && L(h(e, "x")), G();
|
|
57
67
|
}
|
|
58
68
|
}, [
|
|
59
|
-
|
|
69
|
+
E,
|
|
60
70
|
T,
|
|
61
71
|
_,
|
|
62
72
|
v,
|
|
63
|
-
|
|
73
|
+
D,
|
|
74
|
+
G
|
|
64
75
|
]);
|
|
65
|
-
|
|
66
|
-
let e =
|
|
67
|
-
if (e) return e.addEventListener("scroll",
|
|
68
|
-
}, [
|
|
69
|
-
let e =
|
|
70
|
-
if (e && T &&
|
|
71
|
-
if (
|
|
76
|
+
i(() => {
|
|
77
|
+
let e = B.current;
|
|
78
|
+
if (e) return e.addEventListener("scroll", K, { passive: !0 }), () => e.removeEventListener("scroll", K);
|
|
79
|
+
}, [K]), i(() => {
|
|
80
|
+
let e = B.current;
|
|
81
|
+
if (e && T && V.current) {
|
|
82
|
+
if (E) {
|
|
72
83
|
let t = e.clientWidth || v || 0;
|
|
73
84
|
g(e, "x", Math.max(0, e.scrollWidth - t));
|
|
74
85
|
} else {
|
|
75
86
|
let t = e.clientHeight || _;
|
|
76
87
|
e.scrollTop = Math.max(0, e.scrollHeight - t);
|
|
77
88
|
}
|
|
78
|
-
|
|
89
|
+
F(h(e, E ? "x" : "y")), G();
|
|
79
90
|
}
|
|
80
91
|
}, [
|
|
81
92
|
T,
|
|
82
|
-
|
|
93
|
+
E,
|
|
83
94
|
v,
|
|
84
95
|
t,
|
|
85
|
-
|
|
86
|
-
_
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
96
|
+
z,
|
|
97
|
+
_,
|
|
98
|
+
G
|
|
99
|
+
]), i(() => {
|
|
100
|
+
if (!E && !D) return;
|
|
101
|
+
let e = B.current;
|
|
90
102
|
if (!e) return;
|
|
91
|
-
let t = () =>
|
|
103
|
+
let t = () => fe(e.clientWidth);
|
|
92
104
|
if (t(), typeof ResizeObserver > "u") return;
|
|
93
105
|
let n = new ResizeObserver(() => t());
|
|
94
106
|
return n.observe(e), () => n.disconnect();
|
|
95
|
-
}, [
|
|
96
|
-
let
|
|
97
|
-
let e =
|
|
98
|
-
if (e?.items === t && e.version ===
|
|
99
|
-
let n = new Float64Array(
|
|
100
|
-
for (let e = 0; e <
|
|
101
|
-
return
|
|
107
|
+
}, [E, D]);
|
|
108
|
+
let q = (() => {
|
|
109
|
+
let e = me.current;
|
|
110
|
+
if (e?.items === t && e.version === z && e.itemHeight === y && e.estimated === b && e.dynamic === A && e.units === N) return e.sums;
|
|
111
|
+
let n = new Float64Array(N + 1);
|
|
112
|
+
for (let e = 0; e < N; e++) n[e + 1] = (n[e] ?? 0) + (A ? H.current.get(e) ?? M : y);
|
|
113
|
+
return me.current = {
|
|
102
114
|
items: t,
|
|
103
|
-
version:
|
|
115
|
+
version: z,
|
|
104
116
|
itemHeight: y,
|
|
105
117
|
estimated: b,
|
|
106
|
-
dynamic:
|
|
107
|
-
units:
|
|
118
|
+
dynamic: A,
|
|
119
|
+
units: N,
|
|
108
120
|
sums: n
|
|
109
121
|
}, n;
|
|
110
|
-
})(),
|
|
111
|
-
|
|
112
|
-
let e =
|
|
113
|
-
for (let t of e.keys()) t >=
|
|
114
|
-
}, [
|
|
122
|
+
})(), J = q[N] ?? 0, Y = E ? R || v || 0 : _, X = T ? Math.max(0, J - Y - P) : P, Z = Math.max(0, ne(q, N, X) - w), Q = Math.min(N, re(q, N, X + Y) + w), he = O * k, ge = D ? Math.max(0, Math.floor(I / k) - w) : 0, _e = D ? R > 0 ? Math.min(O, Math.ceil((I + R) / k) + w) : O : 0;
|
|
123
|
+
i(() => {
|
|
124
|
+
let e = H.current;
|
|
125
|
+
for (let t of e.keys()) t >= N && e.delete(t);
|
|
126
|
+
}, [N]), i(() => {
|
|
115
127
|
if (!S) return;
|
|
116
|
-
let e =
|
|
128
|
+
let e = U.current, t = new Set(S.map((e) => e.key));
|
|
117
129
|
for (let n of e.keys()) t.has(n) || e.delete(n);
|
|
118
|
-
}, [S]),
|
|
119
|
-
if (!
|
|
130
|
+
}, [S]), i(() => {
|
|
131
|
+
if (!A && !j) return;
|
|
120
132
|
let e = new ResizeObserver((e) => {
|
|
121
133
|
let t = !1;
|
|
122
134
|
for (let n of e) {
|
|
123
|
-
let e = n.target, { index: r, groupKey: i } = e.dataset, a = e.getBoundingClientRect(), o =
|
|
135
|
+
let e = n.target, { index: r, groupKey: i } = e.dataset, a = e.getBoundingClientRect(), o = E ? a.width : a.height;
|
|
124
136
|
if (r !== void 0) {
|
|
125
137
|
let e = Number(r);
|
|
126
|
-
|
|
127
|
-
} else i !== void 0 &&
|
|
138
|
+
H.current.get(e) !== o && (H.current.set(e, o), t = !0);
|
|
139
|
+
} else i !== void 0 && U.current.get(i) !== o && (U.current.set(i, o), t = !0);
|
|
128
140
|
}
|
|
129
|
-
t &&
|
|
141
|
+
t && pe((e) => e + 1);
|
|
130
142
|
});
|
|
131
|
-
return
|
|
132
|
-
|
|
143
|
+
return W.current = e, () => {
|
|
144
|
+
W.current = null, e.disconnect();
|
|
133
145
|
};
|
|
134
146
|
}, [
|
|
147
|
+
A,
|
|
135
148
|
j,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
let e = G.current, t = V.current;
|
|
149
|
+
E
|
|
150
|
+
]), i(() => {
|
|
151
|
+
let e = W.current, t = B.current;
|
|
140
152
|
e && t && t.querySelectorAll("[data-index], [data-group-key]").forEach((t) => {
|
|
141
153
|
e.observe(t);
|
|
142
154
|
});
|
|
143
155
|
}, [
|
|
156
|
+
Z,
|
|
144
157
|
Q,
|
|
145
|
-
|
|
146
|
-
B,
|
|
158
|
+
z,
|
|
147
159
|
S,
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
A,
|
|
161
|
+
j
|
|
150
162
|
]);
|
|
151
|
-
let
|
|
163
|
+
let ve = (() => {
|
|
152
164
|
if (!S) return null;
|
|
153
|
-
let t =
|
|
165
|
+
let t = X + Y, n = [];
|
|
154
166
|
for (let r = 0; r < S.length; r++) {
|
|
155
167
|
let i = S[r];
|
|
156
168
|
if (!i) continue;
|
|
157
|
-
let a = r + 1 < S.length ? S[r + 1] : void 0, o = (e) =>
|
|
158
|
-
if (l <=
|
|
159
|
-
let u =
|
|
160
|
-
n.push(/* @__PURE__ */
|
|
169
|
+
let a = r + 1 < S.length ? S[r + 1] : void 0, o = (e) => D ? Math.floor(e / O) : e, s = m(q, N, o(i.startIndex)), l = a ? m(q, N, o(a.startIndex)) : J;
|
|
170
|
+
if (l <= X || s >= t) continue;
|
|
171
|
+
let u = U.current.get(i.key) ?? M, d = Math.max(s, Math.min(X, l - u)), f = E ? T ? { insetInlineEnd: d } : { insetInlineStart: d } : T ? { bottom: d } : { top: d };
|
|
172
|
+
n.push(/* @__PURE__ */ c("div", {
|
|
161
173
|
"data-slot": "group-header",
|
|
162
174
|
"data-group-key": i.key,
|
|
163
175
|
style: f,
|
|
164
|
-
className: e([
|
|
176
|
+
className: e([E ? te : ee]),
|
|
165
177
|
children: i.render()
|
|
166
178
|
}, i.key));
|
|
167
179
|
}
|
|
168
180
|
return n;
|
|
169
|
-
})(),
|
|
170
|
-
let r =
|
|
181
|
+
})(), $ = r((e, n = "auto") => {
|
|
182
|
+
let r = B.current;
|
|
171
183
|
if (!r || t.length === 0) return;
|
|
172
|
-
let i = Math.max(0, Math.min(t.length - 1, Math.floor(e))), a =
|
|
173
|
-
g(r, c, Math.max(0, Math.min(e, u))),
|
|
184
|
+
let i = Math.max(0, Math.min(t.length - 1, Math.floor(e))), a = D ? Math.min(N - 1, Math.floor(i / O)) : i, o = q[a] ?? 0, s = A ? H.current.get(a) ?? M : y, c = E ? "x" : "y", l = E ? r.clientWidth || v || 0 : r.clientHeight || _, u = Math.max(0, (E ? r.scrollWidth : r.scrollHeight) - l), d = (e) => e === "start" ? o : e === "end" ? o + s - l : o + s / 2 - l / 2, f = (e) => {
|
|
185
|
+
g(r, c, Math.max(0, Math.min(e, u))), F(h(r, c));
|
|
174
186
|
}, p;
|
|
175
187
|
if (T) {
|
|
176
188
|
let e = Math.max(0, u - h(r, c));
|
|
@@ -179,105 +191,105 @@ function _({ items: t, height: _, width: v, itemHeight: y, estimatedItemHeight:
|
|
|
179
191
|
let e = h(r, c);
|
|
180
192
|
p = n === "auto" && o >= e && o + s <= e + l ? null : d(n === "auto" ? o < e ? "end" : "start" : n);
|
|
181
193
|
}
|
|
182
|
-
if (p !== null && f(p),
|
|
183
|
-
let e = i %
|
|
194
|
+
if (p !== null && f(p), D) {
|
|
195
|
+
let e = i % O * k, t = r.clientWidth || 0;
|
|
184
196
|
if (t > 0) {
|
|
185
197
|
let n = h(r, "x"), i = n;
|
|
186
|
-
e < n ? i = e : e +
|
|
198
|
+
e < n ? i = e : e + k > n + t && (i = e + k - t), i !== n && (g(r, "x", Math.max(0, Math.min(i, Math.max(0, r.scrollWidth - t)))), L(h(r, "x")));
|
|
187
199
|
}
|
|
188
200
|
}
|
|
189
201
|
}, [
|
|
190
|
-
|
|
202
|
+
q,
|
|
191
203
|
t.length,
|
|
192
|
-
|
|
193
|
-
|
|
204
|
+
A,
|
|
205
|
+
M,
|
|
194
206
|
y,
|
|
195
207
|
_,
|
|
196
208
|
v,
|
|
197
209
|
T,
|
|
210
|
+
E,
|
|
198
211
|
D,
|
|
212
|
+
N,
|
|
199
213
|
O,
|
|
200
|
-
|
|
201
|
-
k,
|
|
202
|
-
A
|
|
214
|
+
k
|
|
203
215
|
]);
|
|
204
|
-
|
|
205
|
-
let
|
|
216
|
+
a(ue, () => ({ scrollToIndex: $ }), [$]);
|
|
217
|
+
let ye = E ? {
|
|
206
218
|
height: _,
|
|
207
219
|
...v === void 0 ? void 0 : { width: v },
|
|
208
|
-
...
|
|
220
|
+
...le
|
|
209
221
|
} : {
|
|
210
222
|
height: _,
|
|
211
|
-
...
|
|
212
|
-
},
|
|
213
|
-
height:
|
|
214
|
-
width:
|
|
215
|
-
} : { height:
|
|
216
|
-
return /* @__PURE__ */
|
|
217
|
-
ref:
|
|
223
|
+
...le
|
|
224
|
+
}, be = E ? { width: J } : D ? {
|
|
225
|
+
height: J,
|
|
226
|
+
width: he
|
|
227
|
+
} : { height: J };
|
|
228
|
+
return /* @__PURE__ */ c("div", {
|
|
229
|
+
ref: B,
|
|
218
230
|
"data-slot": "virtual-list",
|
|
219
|
-
style:
|
|
220
|
-
...
|
|
221
|
-
className: e([
|
|
222
|
-
children:
|
|
231
|
+
style: ye,
|
|
232
|
+
...de,
|
|
233
|
+
className: e([E ? d : u, ce]),
|
|
234
|
+
children: l("div", {
|
|
223
235
|
"data-slot": "viewport",
|
|
224
|
-
style:
|
|
225
|
-
className: e([
|
|
226
|
-
children: [
|
|
227
|
-
let r =
|
|
236
|
+
style: be,
|
|
237
|
+
className: e([E ? p : f]),
|
|
238
|
+
children: [D ? Array.from({ length: Q - Z }, (e, n) => {
|
|
239
|
+
let r = Z + n, i = {
|
|
228
240
|
position: "absolute",
|
|
229
241
|
width: "100%"
|
|
230
242
|
};
|
|
231
|
-
if (T ? i.bottom =
|
|
232
|
-
let e =
|
|
243
|
+
if (T ? i.bottom = q[r] : i.top = q[r], A) {
|
|
244
|
+
let e = H.current.get(r);
|
|
233
245
|
e !== void 0 && (i.height = e);
|
|
234
246
|
} else i.height = y;
|
|
235
247
|
let a = [];
|
|
236
|
-
for (let e =
|
|
237
|
-
let n = r *
|
|
248
|
+
for (let e = ge; e < _e; e++) {
|
|
249
|
+
let n = r * O + e, i = t[n];
|
|
238
250
|
if (i === void 0) break;
|
|
239
|
-
a.push(/* @__PURE__ */
|
|
251
|
+
a.push(/* @__PURE__ */ c("div", {
|
|
240
252
|
"data-slot": "item",
|
|
241
253
|
"data-cell": n,
|
|
242
254
|
style: {
|
|
243
255
|
flex: "none",
|
|
244
|
-
width:
|
|
256
|
+
width: k
|
|
245
257
|
},
|
|
246
258
|
children: C(i, n)
|
|
247
259
|
}, e));
|
|
248
260
|
}
|
|
249
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ c("div", {
|
|
250
262
|
"data-slot": "row",
|
|
251
263
|
"data-index": r,
|
|
252
264
|
style: i,
|
|
253
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ c("div", {
|
|
254
266
|
style: {
|
|
255
267
|
display: "flex",
|
|
256
268
|
height: "100%",
|
|
257
|
-
marginInlineStart:
|
|
269
|
+
marginInlineStart: ge * k
|
|
258
270
|
},
|
|
259
271
|
children: a
|
|
260
272
|
})
|
|
261
273
|
}, r);
|
|
262
|
-
}) : t.slice(
|
|
263
|
-
let n =
|
|
274
|
+
}) : t.slice(Z, Q).map((e, t) => {
|
|
275
|
+
let n = Z + t, r = E ? {
|
|
264
276
|
position: "absolute",
|
|
265
277
|
height: "100%"
|
|
266
278
|
} : {
|
|
267
279
|
position: "absolute",
|
|
268
280
|
width: "100%"
|
|
269
281
|
};
|
|
270
|
-
if (T ?
|
|
271
|
-
let e =
|
|
272
|
-
e !== void 0 && (
|
|
273
|
-
} else
|
|
274
|
-
return /* @__PURE__ */
|
|
282
|
+
if (T ? E ? r.insetInlineEnd = q[n] : r.bottom = q[n] : E ? r.insetInlineStart = q[n] : r.top = q[n], A) {
|
|
283
|
+
let e = H.current.get(n);
|
|
284
|
+
e !== void 0 && (E ? r.width = e : r.height = e);
|
|
285
|
+
} else E ? r.width = y : r.height = y;
|
|
286
|
+
return /* @__PURE__ */ c("div", {
|
|
275
287
|
"data-slot": "item",
|
|
276
288
|
"data-index": n,
|
|
277
289
|
style: r,
|
|
278
290
|
children: C(e, n)
|
|
279
291
|
}, n);
|
|
280
|
-
}),
|
|
292
|
+
}), ve]
|
|
281
293
|
})
|
|
282
294
|
});
|
|
283
295
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region src/lib/components/VisuallyHidden/VisuallyHidden.tsx
|
|
6
|
+
var n = "haze-VisuallyHidden__hidden";
|
|
7
|
+
function r({ className: r, ...i }) {
|
|
8
|
+
return /* @__PURE__ */ t("span", {
|
|
9
|
+
"data-slot": "visually-hidden",
|
|
10
|
+
...i,
|
|
11
|
+
className: e([n, r])
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as default };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { classnames as e } from "../../utils/classnames.js";
|
|
4
|
+
import { useFocusScope as t } from "../../utils/focus-scope.js";
|
|
5
|
+
import { ResizableGroup as n, ResizableHandle as r, ResizablePanel as i } from "../Resizable/Resizable.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { useEffect as a } from "react";
|
|
8
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
|
+
import { useControl as c } from "react-use-control";
|
|
10
|
+
//#region src/lib/components/Workbench/Workbench.tsx
|
|
11
|
+
var l = 160, u = 480, d = 300, f = 180, p = 480, m = 300, ee = 120, te = 720, ne = 240, h = "haze-Workbench__workbench", g = "haze-Workbench__body", _ = "haze-Workbench__activityBar", v = "haze-Workbench__activityBarDocked", y = "haze-Workbench__activityBarDockedEnd", re = "haze-Workbench__sidebarColumn", ie = "haze-Workbench__regionFill", b = "haze-Workbench__region", x = "haze-Workbench__editor", S = "haze-Workbench__verticalFill", C = "haze-Workbench__statusBarRegion", w = "haze-Workbench__tabBarRegion", T = "haze-Workbench__scrim", E = "haze-Workbench__sidenavOverlay", D = "haze-Workbench__auxOverlay", O = "haze-Workbench__mobileHidden";
|
|
12
|
+
function k({ activityBar: k, activityBarPosition: A, sidebar: j, auxiliaryBar: M, panel: N, statusBar: P, tabBar: F, sidebarWidth: I, sidebarCollapsed: L, mobileSidebarOpen: R, auxiliaryBarWidth: z, auxiliaryBarCollapsed: B, panelHeight: V, panelCollapsed: H, panelMaximized: ae, className: U, style: W, children: G, ...K }) {
|
|
13
|
+
let [q, J] = c(I, d), [Y, oe] = c(z, m), [se, ce] = c(V, ne), [le, ue, de] = c(L, !1), [X, Z, fe] = c(R, !1);
|
|
14
|
+
a(() => {
|
|
15
|
+
if (!X) return;
|
|
16
|
+
let e = (e) => {
|
|
17
|
+
e.key === "Escape" && Z(!1);
|
|
18
|
+
};
|
|
19
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
20
|
+
}, [X, Z]);
|
|
21
|
+
let pe = t({
|
|
22
|
+
enabled: X,
|
|
23
|
+
trapped: !1
|
|
24
|
+
}), [Q] = c(A, "side"), [me, he, ge] = c(B, !1), [, , _e] = c(H, !1), [$] = c(ae, !1), ve = (e) => {
|
|
25
|
+
let t = e.sidebar;
|
|
26
|
+
t !== void 0 && t > 0 && J(t);
|
|
27
|
+
let n = e.auxiliary;
|
|
28
|
+
n !== void 0 && n > 0 && oe(n);
|
|
29
|
+
}, ye = (e) => {
|
|
30
|
+
let t = e.panel;
|
|
31
|
+
t !== void 0 && t > 0 && ce(t);
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ s("div", {
|
|
34
|
+
"data-slot": "workbench",
|
|
35
|
+
"data-panel-maximized": $ || void 0,
|
|
36
|
+
style: {
|
|
37
|
+
height: "100dvh",
|
|
38
|
+
...W
|
|
39
|
+
},
|
|
40
|
+
...K,
|
|
41
|
+
className: e([h, U]),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ s(n, {
|
|
44
|
+
direction: "horizontal",
|
|
45
|
+
className: g,
|
|
46
|
+
onResizeCommit: ve,
|
|
47
|
+
children: [
|
|
48
|
+
k != null && Q === "side" && /* @__PURE__ */ o("div", {
|
|
49
|
+
"data-slot": "workbench-activity-bar",
|
|
50
|
+
className: e([_]),
|
|
51
|
+
children: k
|
|
52
|
+
}),
|
|
53
|
+
j != null && /* @__PURE__ */ s(i, {
|
|
54
|
+
id: "sidebar",
|
|
55
|
+
defaultSize: q,
|
|
56
|
+
minSize: l,
|
|
57
|
+
maxSize: u,
|
|
58
|
+
collapsible: !0,
|
|
59
|
+
collapsed: de,
|
|
60
|
+
className: Q === "side" ? E : `${E} ${re}`,
|
|
61
|
+
"data-open": X || void 0,
|
|
62
|
+
style: { "--haze-workbench-sidebar-width": `${q}px` },
|
|
63
|
+
children: [k != null && Q !== "side" && /* @__PURE__ */ o("div", {
|
|
64
|
+
"data-slot": "workbench-activity-bar",
|
|
65
|
+
className: e([v, Q === "bottom" && y]),
|
|
66
|
+
children: k
|
|
67
|
+
}), /* @__PURE__ */ o("div", {
|
|
68
|
+
ref: pe,
|
|
69
|
+
"data-slot": "workbench-sidebar",
|
|
70
|
+
className: e([b, Q !== "side" && ie]),
|
|
71
|
+
children: j
|
|
72
|
+
})]
|
|
73
|
+
}),
|
|
74
|
+
j != null && /* @__PURE__ */ o(r, { className: O }),
|
|
75
|
+
/* @__PURE__ */ o(i, {
|
|
76
|
+
id: "main",
|
|
77
|
+
children: /* @__PURE__ */ s(n, {
|
|
78
|
+
direction: "vertical",
|
|
79
|
+
className: S,
|
|
80
|
+
onResizeCommit: ye,
|
|
81
|
+
children: [
|
|
82
|
+
!$ && /* @__PURE__ */ o("main", {
|
|
83
|
+
"data-slot": "workbench-main",
|
|
84
|
+
className: e([x]),
|
|
85
|
+
children: G
|
|
86
|
+
}),
|
|
87
|
+
N != null && !$ && /* @__PURE__ */ o(r, { className: O }),
|
|
88
|
+
N != null && /* @__PURE__ */ o(i, {
|
|
89
|
+
id: "panel",
|
|
90
|
+
defaultSize: $ ? void 0 : se,
|
|
91
|
+
minSize: ee,
|
|
92
|
+
maxSize: te,
|
|
93
|
+
collapsible: !$,
|
|
94
|
+
collapsed: _e,
|
|
95
|
+
className: O,
|
|
96
|
+
children: /* @__PURE__ */ o("div", {
|
|
97
|
+
"data-slot": "workbench-panel",
|
|
98
|
+
className: e([b]),
|
|
99
|
+
children: N
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
}),
|
|
105
|
+
M != null && /* @__PURE__ */ o(r, { className: O }),
|
|
106
|
+
M != null && /* @__PURE__ */ o(i, {
|
|
107
|
+
id: "auxiliary",
|
|
108
|
+
defaultSize: Y,
|
|
109
|
+
minSize: f,
|
|
110
|
+
maxSize: p,
|
|
111
|
+
collapsible: !0,
|
|
112
|
+
collapsed: ge,
|
|
113
|
+
className: D,
|
|
114
|
+
style: { "--haze-workbench-auxiliary-width": `${Y}px` },
|
|
115
|
+
children: /* @__PURE__ */ o("div", {
|
|
116
|
+
"data-slot": "workbench-auxiliary-bar",
|
|
117
|
+
className: e([b]),
|
|
118
|
+
children: M
|
|
119
|
+
})
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
}),
|
|
123
|
+
P != null && /* @__PURE__ */ o("div", {
|
|
124
|
+
"data-slot": "workbench-status-bar",
|
|
125
|
+
className: e([C]),
|
|
126
|
+
children: P
|
|
127
|
+
}),
|
|
128
|
+
F != null && /* @__PURE__ */ o("div", {
|
|
129
|
+
"data-slot": "workbench-tab-bar",
|
|
130
|
+
className: e([w]),
|
|
131
|
+
children: F
|
|
132
|
+
}),
|
|
133
|
+
M != null && !me && /* @__PURE__ */ o("div", {
|
|
134
|
+
"data-slot": "workbench-scrim",
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
"data-open": !0,
|
|
137
|
+
onClick: () => he(!0),
|
|
138
|
+
className: e([T])
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { k as default };
|
package/dist/css/accordion.css
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/* haze-ui accordion — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
2
3
|
.haze-Accordion__base{width:100%}
|
|
3
4
|
.haze-AccordionItem__item{border-bottom:1px solid var(--haze-color-border)}.haze-AccordionItem__item:first-of-type{border-top:1px solid var(--haze-color-border)}@supports selector(::details-content) and (interpolate-size:allow-keywords){.haze-AccordionItem__item::details-content{interpolate-size:allow-keywords;height:0;-webkit-transition:height var(--haze-duration-normal) var(--haze-ease-in-out),content-visibility var(--haze-duration-normal) allow-discrete;transition:height var(--haze-duration-normal) var(--haze-ease-in-out),content-visibility var(--haze-duration-normal) allow-discrete;overflow:clip}.haze-AccordionItem__item[open]::details-content{height:auto}}.haze-AccordionItem__summary{-webkit-box-pack:justify;align-items:center;-ms-flex-pack:space-between;padding:var(--haze-space-3) var(--haze-space-4);font-family:var(--haze-font-sans);font-size:var(--haze-text-sm);font-weight:var(--haze-weight-medium);color:var(--haze-color-text);cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-transition:background var(--haze-duration-fast);transition:background var(--haze-duration-fast);justify-content:space-between;list-style:none;display:flex}.haze-AccordionItem__summary:hover{background:var(--haze-color-bg-subtle)}.haze-AccordionItem__summary:active{background:var(--haze-color-bg-muted)}.haze-AccordionItem__summary:focus-visible{box-shadow:inset 0 0 0 3px var(--haze-color-focus-ring);outline:none}.haze-AccordionItem__summary::marker{display:none}.haze-AccordionItem__summary::-webkit-details-marker{display:none}.haze-AccordionItem__summary:after{content:"";border-right:2px solid var(--haze-color-text-muted);border-bottom:2px solid var(--haze-color-text-muted);width:8px;height:8px;-webkit-transition:-webkit-transform var(--haze-duration-normal);transition:transform var(--haze-duration-normal);flex-shrink:0;transform:rotate(-45deg)}details[open]>.haze-AccordionItem__summary:after{transform:rotate(45deg)}.haze-AccordionItem__content{padding:0 var(--haze-space-4) var(--haze-space-4);font-family:var(--haze-font-sans);font-size:var(--haze-text-sm);color:var(--haze-color-text-secondary);line-height:var(--haze-leading-normal)}
|
|
5
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* haze-ui activity-rail — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
3
|
+
.haze-ActivityRail__rail{box-sizing:border-box;align-items:center;gap:var(--haze-space-1);padding-block:var(--haze-space-1);width:var(--haze-space-12);border-inline-end:1px solid var(--haze-color-border);flex-direction:column;height:100%;display:flex}@container rail-track (width>=96px){.haze-ActivityRail__railHorizontal{width:100%;height:var(--haze-space-12);padding-inline:var(--haze-space-1);border-inline-end:none;border-block-end:1px solid var(--haze-color-border);flex-direction:row}.haze-ActivityRail__railHorizontal [data-slot=activity-rail-item-indicator]{inset-block:auto;width:auto;height:calc(var(--haze-space-1) / 2);inset-block-start:calc(var(--haze-space-1) / -2);inset-inline:0}}.haze-ActivityRail__endGroup{box-sizing:border-box;align-items:center;gap:var(--haze-space-1);flex-direction:column;margin-block-start:auto;display:flex}@container rail-track (width>=96px){.haze-ActivityRail__endGroupHorizontal{-webkit-margin-start:auto;flex-direction:row;margin-block-start:0;margin-inline-start:auto}}.haze-ActivityRail__item{box-sizing:border-box;padding:var(--haze-space-0);width:calc(var(--haze-space-10) + var(--haze-space-1));height:calc(var(--haze-space-10) + var(--haze-space-1));border-radius:var(--haze-radius-md);color:var(--haze-color-text-muted);cursor:pointer;-webkit-transition:color var(--haze-duration-fast) var(--haze-ease),background var(--haze-duration-fast) var(--haze-ease);transition:color var(--haze-duration-fast) var(--haze-ease),background var(--haze-duration-fast) var(--haze-ease);background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex;position:relative}.haze-ActivityRail__item:hover{color:var(--haze-color-text);background:var(--haze-color-bg-muted)}.haze-ActivityRail__item:focus-visible{box-shadow:0 0 0 var(--haze-space-1) var(--haze-color-focus-ring);outline:none}.haze-ActivityRail__itemActive,.haze-ActivityRail__itemActive:hover{color:var(--haze-color-text)}.haze-ActivityRail__indicator{width:calc(var(--haze-space-1) / 2);border-radius:var(--haze-radius-full);background:var(--haze-color-primary);position:absolute;inset-block:0;inset-inline-start:calc(var(--haze-space-1) / -2)}.haze-ActivityRail__itemIcon{width:var(--haze-space-5);height:var(--haze-space-5);justify-content:center;align-items:center;display:inline-flex}.haze-ActivityRail__itemIcon>svg{width:100%;height:100%}.haze-ActivityRail__itemBadge{pointer-events:none;position:absolute;inset-block-start:calc(var(--haze-space-1) / -2);inset-inline-end:calc(var(--haze-space-1) / -2)}
|
|
4
|
+
}
|
package/dist/css/affix.css
CHANGED
package/dist/css/alert.css
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/* haze-ui alert — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
2
3
|
.haze-Alert__base{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;gap:var(--haze-space-3);padding:var(--haze-space-3) var(--haze-space-4);border-radius:var(--haze-radius-md);font-family:var(--haze-font-sans);font-size:var(--haze-text-sm);line-height:var(--haze-leading-normal);display:flex}.haze-Alert__info{background:var(--haze-color-info-subtle);color:var(--haze-color-info);border:1px solid color-mix(in srgb, var(--haze-color-info) 25%, transparent)}.haze-Alert__success{background:var(--haze-color-success-subtle);color:var(--haze-color-success);border:1px solid color-mix(in srgb, var(--haze-color-success) 25%, transparent)}.haze-Alert__warning{background:var(--haze-color-warning-subtle);color:var(--haze-color-warning);border:1px solid color-mix(in srgb, var(--haze-color-warning) 25%, transparent)}.haze-Alert__danger{background:var(--haze-color-danger-subtle);color:var(--haze-color-danger);border:1px solid color-mix(in srgb, var(--haze-color-danger) 25%, transparent)}.haze-Alert__contentStyle{flex:1}.haze-Alert__closeBtn{appearance:none;color:inherit;cursor:pointer;font-size:var(--haze-text-lg);opacity:.6;-webkit-transition:opacity var(--haze-duration-fast);transition:opacity var(--haze-duration-fast);background:0 0;border:none;padding:0;line-height:1}.haze-Alert__closeBtn:hover{opacity:1}.haze-Alert__closeBtn:focus-visible{box-shadow:0 0 0 3px var(--haze-color-focus-ring);border-radius:var(--haze-radius-sm);outline:none}@media (forced-colors:active){.haze-Alert__closeBtn:focus-visible{outline:2px solid highlight}}
|
|
4
|
+
}
|
package/dist/css/anchor.css
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/* haze-ui anchor — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
2
3
|
.haze-Anchor__nav{font-size:var(--haze-text-sm);position:sticky;top:0}.haze-Anchor__list{gap:var(--haze-space-1);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.haze-Anchor__link{padding:var(--haze-space-1) var(--haze-space-2);border-inline-start:var(--haze-space-1) solid transparent;border-radius:0 var(--haze-radius-sm) var(--haze-radius-sm) 0;color:var(--haze-color-text-muted);-webkit-transition:color var(--haze-duration-fast) var(--haze-ease),border-color var(--haze-duration-fast) var(--haze-ease);transition:color var(--haze-duration-fast) var(--haze-ease),border-color var(--haze-duration-fast) var(--haze-ease);-webkit-text-decoration:none;text-decoration:none;display:block}.haze-Anchor__link:hover{color:var(--haze-color-text)}.haze-Anchor__linkActive{border-inline-start-color:var(--haze-color-primary);color:var(--haze-color-primary);font-weight:var(--haze-weight-medium)}
|
|
4
|
+
}
|
package/dist/css/app-shell.css
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/* haze-ui app-shell — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
-
|
|
2
|
+
@layer haze {
|
|
3
|
+
.haze-AppShell__shell{display:-ms-grid;-ms-grid-rows:auto minmax(0, 1fr) auto;-ms-grid-columns:minmax(0, 1fr);box-sizing:border-box;grid-template:"header""content"minmax(0,1fr)"footer"/minmax(0,1fr);min-height:100dvh;display:grid;position:relative}.haze-AppShell__withSidebar{-ms-grid-columns:auto minmax(0, 1fr);grid-template-columns:auto minmax(0,1fr);grid-template-areas:"header header""sidebar content""footer footer"}@media (width<=768px){.haze-AppShell__withSidebar{-ms-grid-columns:minmax(0, 1fr);grid-template-columns:minmax(0,1fr);grid-template-areas:"header""content""footer"}}.haze-AppShell__header{z-index:1;align-items:center;gap:var(--haze-space-3);padding:var(--haze-space-3) var(--haze-space-4);background:var(--haze-color-bg);border-block-end:1px solid var(--haze-color-border);grid-area:header;display:flex;position:sticky;top:0}.haze-AppShell__sidebar{box-sizing:border-box;width:var(--haze-appshell-sidebar-width,calc(var(--haze-space-16) * 4));background:var(--haze-color-bg-subtle);min-height:0;-webkit-transition:width var(--haze-duration-normal) var(--haze-ease),-webkit-transform var(--haze-duration-normal) var(--haze-ease);transition:width var(--haze-duration-normal) var(--haze-ease),transform var(--haze-duration-normal) var(--haze-ease);grid-area:sidebar;overflow:hidden}.haze-AppShell__sidebar[data-state=collapsed]{width:var(--haze-appshell-sidebar-width-collapsed,var(--haze-space-16))}@media (width<=768px){.haze-AppShell__sidebar{z-index:2;box-shadow:var(--haze-shadow-lg);position:absolute;inset-block:0;inset-inline-start:0}.haze-AppShell__sidebar[data-state=collapsed]{width:var(--haze-appshell-sidebar-width,calc(var(--haze-space-16) * 4));transform:translate(-100%)}}.haze-AppShell__content{grid-area:content;min-width:0}.haze-AppShell__footer{padding:var(--haze-space-3) var(--haze-space-4);background:var(--haze-color-bg);border-block-start:1px solid var(--haze-color-border);grid-area:footer}
|
|
4
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/* haze-ui approval-card — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
2
3
|
.haze-ApprovalCard__card{border:1px solid var(--haze-color-warning);border-radius:var(--haze-radius-md);font-family:var(--haze-font-sans);background:var(--haze-color-bg);overflow:hidden}.haze-ApprovalCard__header{padding:var(--haze-space-3) var(--haze-space-4);background:var(--haze-color-warning-subtle);font-size:var(--haze-text-sm);font-weight:var(--haze-weight-medium);color:var(--haze-color-text)}.haze-ApprovalCard__body{padding:var(--haze-space-3) var(--haze-space-4)}.haze-ApprovalCard__desc{font-size:var(--haze-text-sm);color:var(--haze-color-text-muted);margin-bottom:var(--haze-space-3)}.haze-ApprovalCard__content{margin-bottom:var(--haze-space-3)}.haze-ApprovalCard__actions{gap:var(--haze-space-2);padding:var(--haze-space-3) var(--haze-space-4);border-top:1px solid var(--haze-color-border);display:flex}.haze-ApprovalCard__btn{padding:var(--haze-space-2) var(--haze-space-4);border-radius:var(--haze-radius-md);font-size:var(--haze-text-sm);font-family:var(--haze-font-sans);font-weight:var(--haze-weight-medium);cursor:pointer;-webkit-transition:background var(--haze-duration-fast);transition:background var(--haze-duration-fast);flex:1}.haze-ApprovalCard__denyBtn{background:var(--haze-color-bg);border:1px solid var(--haze-color-border);color:var(--haze-color-text)}.haze-ApprovalCard__denyBtn:hover{background:var(--haze-color-bg-muted)}.haze-ApprovalCard__approveBtn{background:var(--haze-color-primary);border:1px solid var(--haze-color-primary);color:var(--haze-color-bg)}.haze-ApprovalCard__approveBtn:hover{opacity:.9}
|
|
4
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/* haze-ui aspect-ratio — generated by scripts/split-css.mjs, do not edit */
|
|
2
|
+
@layer haze {
|
|
2
3
|
.haze-AspectRatio__wrapper{width:100%;position:relative}.haze-AspectRatio__inner{justify-content:center;align-items:center;display:flex;position:absolute;inset:0;overflow:hidden}
|
|
4
|
+
}
|