haze-ui 1.34.0 → 1.35.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 +26 -0
- package/dist/THIRD-PARTY-NOTICES.md +2 -1
- package/dist/components/Anchor/Anchor.js +84 -65
- package/dist/components/BackToTop/BackToTop.js +18 -12
- package/dist/components/Combobox/Combobox.js +109 -99
- package/dist/components/CopyButton/CopyButton.js +13 -12
- package/dist/components/DataTable/DataTable.js +16 -16
- package/dist/components/FloatButton/FloatButton.js +11 -19
- package/dist/components/FollowUpSuggestions/FollowUpSuggestions.js +45 -0
- package/dist/components/FollowUpSuggestions/index.js +3 -0
- package/dist/components/LocaleProvider/ar-sa.js +9 -0
- package/dist/components/LocaleProvider/de-de.js +9 -0
- package/dist/components/LocaleProvider/es-es.js +9 -0
- package/dist/components/LocaleProvider/fr-fr.js +9 -0
- package/dist/components/LocaleProvider/it-it.js +9 -0
- package/dist/components/LocaleProvider/ja-jp.js +9 -0
- package/dist/components/LocaleProvider/ko-kr.js +9 -0
- package/dist/components/LocaleProvider/locale.js +9 -0
- package/dist/components/LocaleProvider/pt-br.js +9 -0
- package/dist/components/LocaleProvider/ru-ru.js +9 -0
- package/dist/components/LocaleProvider/zh-cn.js +9 -0
- package/dist/components/NavigationBar/NavLink.js +15 -16
- package/dist/components/NotificationCenter/NotificationCenter.js +294 -0
- package/dist/components/NotificationCenter/index.js +3 -0
- package/dist/components/Tabs/Tab.js +58 -50
- package/dist/components/TaskList/TaskList.js +96 -0
- package/dist/components/TaskList/index.js +3 -0
- package/dist/components/Toggle/Toggle.js +8 -8
- package/dist/components/Toggle/ToggleCore.js +4 -5
- package/dist/components/Toolbar/ToolbarButton.js +7 -7
- package/dist/components/Toolbar/ToolbarToggle.js +9 -9
- package/dist/components/Tree/Tree.js +159 -137
- package/dist/components/Tree/index.js +2 -1
- package/dist/components/Tree/useTree.js +32 -0
- package/dist/components/Tree/utils.js +21 -11
- package/dist/css/anchor.css +1 -1
- package/dist/css/combobox.css +1 -1
- package/dist/css/copy-button.css +1 -1
- package/dist/css/data-table.css +1 -1
- package/dist/css/follow-up-suggestions.css +4 -0
- package/dist/css/notification-center.css +5 -0
- package/dist/css/task-list.css +4 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css-manifest.json +21 -0
- package/dist/haze-ui.css +18 -4
- package/dist/headless/index.js +2 -1
- package/dist/hooks/index.js +25 -0
- package/dist/hooks/useAnchorSpy.js +49 -0
- package/dist/hooks/useElementSize.js +31 -0
- package/dist/hooks/useIdle.js +45 -0
- package/dist/hooks/useMutationObserver.js +31 -0
- package/dist/hooks/useNetwork.js +28 -0
- package/dist/hooks/useOrientation.js +27 -0
- package/dist/hooks/useResizeObserver.js +16 -0
- package/dist/icons/index.js +9 -0
- package/dist/index.js +323 -318
- package/dist/mcp-docs.json +535 -13
- package/dist/registry.json +387 -7
- package/dist/sitemap.xml +6 -0
- package/dist/tokens/index.js +2 -1
- package/dist/tokens/zoom.js +6 -0
- package/dist/types/components/Anchor/Anchor.d.ts +5 -1
- package/dist/types/components/BackToTop/BackToTop.d.ts +23 -5
- package/dist/types/components/Combobox/Combobox.d.ts +17 -1
- package/dist/types/components/ConfigProvider/ConfigContext.d.ts +6 -0
- package/dist/types/components/CopyButton/CopyButton.d.ts +16 -4
- package/dist/types/components/DataTable/DataTable.bench.d.ts +1 -0
- package/dist/types/components/FloatButton/FloatButton.d.ts +25 -5
- package/dist/types/components/FollowUpSuggestions/FollowUpSuggestions.d.ts +27 -0
- package/dist/types/components/FollowUpSuggestions/index.d.ts +2 -0
- package/dist/types/components/LocaleProvider/locale.d.ts +9 -0
- package/dist/types/components/NavigationBar/NavLink.d.ts +24 -32
- package/dist/types/components/NotificationCenter/NotificationCenter.d.ts +111 -0
- package/dist/types/components/NotificationCenter/index.d.ts +2 -0
- package/dist/types/components/Select/Select.bench.d.ts +1 -0
- package/dist/types/components/Tabs/Tab.d.ts +26 -4
- package/dist/types/components/TaskList/TaskList.d.ts +50 -0
- package/dist/types/components/TaskList/index.d.ts +2 -0
- package/dist/types/components/Toggle/Toggle.d.ts +15 -8
- package/dist/types/components/Toggle/ToggleCore.d.ts +16 -7
- package/dist/types/components/Toolbar/ToolbarButton.d.ts +17 -5
- package/dist/types/components/Toolbar/ToolbarToggle.d.ts +22 -5
- package/dist/types/components/Tree/Tree.d.ts +1 -1
- package/dist/types/components/Tree/index.d.ts +4 -1
- package/dist/types/components/Tree/types.d.ts +20 -0
- package/dist/types/components/Tree/useTree.d.ts +96 -0
- package/dist/types/components/Tree/utils.d.ts +7 -0
- package/dist/types/components/VirtualList/VirtualList.bench.d.ts +1 -0
- package/dist/types/headless/index.d.ts +16 -0
- package/dist/types/hooks/index.d.ts +4 -0
- package/dist/types/hooks/useAnchorSpy.d.ts +62 -0
- package/dist/types/icons/index.d.ts +138 -0
- package/dist/types/index.d.ts +10 -2
- package/dist/types/tokens/index.d.ts +1 -0
- package/dist/types/tokens/zoom.d.ts +33 -0
- package/dist/types/utils/deprecate.d.ts +13 -0
- package/dist/types/utils/portal.d.ts +29 -0
- package/dist/utils/portal.js +13 -0
- package/package.json +40 -8
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSyncExternalStore as e } from "react";
|
|
3
|
+
//#region src/lib/hooks/useOrientation.ts
|
|
4
|
+
var t = {
|
|
5
|
+
angle: 0,
|
|
6
|
+
type: "portrait-primary"
|
|
7
|
+
}, n = () => {
|
|
8
|
+
if (!(typeof globalThis > "u")) return globalThis.screen?.orientation;
|
|
9
|
+
}, r = (e) => {
|
|
10
|
+
let t = n();
|
|
11
|
+
return !t || typeof t.addEventListener != "function" || typeof t.removeEventListener != "function" ? () => void 0 : (t.addEventListener("change", e), () => {
|
|
12
|
+
t.removeEventListener("change", e);
|
|
13
|
+
});
|
|
14
|
+
}, i = t, a = () => {
|
|
15
|
+
let e = n();
|
|
16
|
+
if (!e) return t;
|
|
17
|
+
let r = typeof e.angle == "number" ? e.angle : 0, a = e.type;
|
|
18
|
+
return i.angle === r && i.type === a || (i = {
|
|
19
|
+
angle: r,
|
|
20
|
+
type: a
|
|
21
|
+
}), i;
|
|
22
|
+
}, o = () => t;
|
|
23
|
+
function s() {
|
|
24
|
+
return e(r, a, o);
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { s as useOrientation };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback as e, useRef as t, useState as n } from "react";
|
|
3
|
+
//#region src/lib/hooks/useResizeObserver.ts
|
|
4
|
+
function r(r) {
|
|
5
|
+
let { box: i = "content-box", enabled: a = !0 } = r ?? {}, [o, s] = n(null), c = t(null);
|
|
6
|
+
return [e((e) => {
|
|
7
|
+
if (c.current?.disconnect(), c.current = null, !e || !a || typeof globalThis.ResizeObserver != "function") return;
|
|
8
|
+
let t = new globalThis.ResizeObserver((e) => {
|
|
9
|
+
let t = e[0];
|
|
10
|
+
t && s(t);
|
|
11
|
+
});
|
|
12
|
+
t.observe(e, { box: i }), c.current = t;
|
|
13
|
+
}, [i, a]), o];
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as useResizeObserver };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ArrowDown as e, ArrowLeft as t, ArrowRight as n, ArrowUp as r, ArrowUpDown as i, ArrowUpRight as a, Asterisk as o, AtSign as s, Bell as c, BellOff as l, Bold as u, BookOpen as d, Bookmark as f, Calendar as p, ChartColumn as m, ChartLine as h, ChartPie as g, Check as _, CheckCheck as v, ChevronDown as y, ChevronLeft as b, ChevronRight as x, ChevronUp as S, ChevronsUpDown as C, Circle as w, CircleQuestionMark as T, Clipboard as E, Clock as D, Cloud as O, CloudOff as k, Code as A, Command as j, Copy as M, Download as N, Ellipsis as P, EllipsisVertical as F, ExternalLink as I, Eye as L, EyeOff as R, File as z, FileText as B, Flag as V, Folder as H, FolderOpen as U, Funnel as W, Globe as G, Hash as K, Heart as q, House as J, Image as Y, Inbox as X, Info as Z, Italic as Q, LayoutGrid as $, LayoutList as ee, Link as te, List as ne, Loader as re, LoaderCircle as ie, Lock as ae, LockOpen as oe, LogOut as se, Mail as ce, MapPin as le, Menu as ue, MessageCircle as de, MessageSquare as fe, Mic as pe, Minus as me, Moon as he, Pencil as ge, Phone as _e, Play as ve, Plus as ye, QrCode as be, RefreshCw as xe, Save as Se, Search as Ce, Send as we, Settings as Te, Shield as Ee, ShieldCheck as De, ShoppingCart as Oe, Sparkles as ke, SquareCheck as Ae, Star as je, Sun as Me, Tag as Ne, Trash as Pe, Underline as Fe, Upload as Ie, User as Le, UserPlus as Re, Users as ze, Volume2 as Be, VolumeX as Ve, X as He, Zap as Ue, ZoomIn as We, ZoomOut as Ge } from "lucide-react";
|
|
2
|
+
//#region src/lib/icons/index.ts
|
|
3
|
+
var Ke = Object.freeze({
|
|
4
|
+
sm: 16,
|
|
5
|
+
md: 20,
|
|
6
|
+
lg: 24
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as ArrowDown, t as ArrowLeft, n as ArrowRight, r as ArrowUp, i as ArrowUpDown, a as ArrowUpRight, o as Asterisk, s as AtSign, c as Bell, l as BellOff, u as Bold, d as BookOpen, f as Bookmark, p as Calendar, m as ChartColumn, h as ChartLine, g as ChartPie, _ as Check, v as CheckCheck, y as ChevronDown, b as ChevronLeft, x as ChevronRight, S as ChevronUp, C as ChevronsUpDown, w as Circle, T as CircleQuestionMark, E as Clipboard, D as Clock, O as Cloud, k as CloudOff, A as Code, j as Command, M as Copy, N as Download, P as Ellipsis, F as EllipsisVertical, I as ExternalLink, L as Eye, R as EyeOff, z as File, B as FileText, V as Flag, H as Folder, U as FolderOpen, W as Funnel, G as Globe, K as Hash, q as Heart, J as House, Y as Image, X as Inbox, Z as Info, Q as Italic, $ as LayoutGrid, ee as LayoutList, te as Link, ne as List, re as Loader, ie as LoaderCircle, ae as Lock, oe as LockOpen, se as LogOut, ce as Mail, le as MapPin, ue as Menu, de as MessageCircle, fe as MessageSquare, pe as Mic, me as Minus, he as Moon, ge as Pencil, _e as Phone, ve as Play, ye as Plus, be as QrCode, xe as RefreshCw, Se as Save, Ce as Search, we as Send, Te as Settings, Ee as Shield, De as ShieldCheck, Oe as ShoppingCart, ke as Sparkles, Ae as SquareCheck, je as Star, Me as Sun, Ne as Tag, Pe as Trash, Fe as Underline, Ie as Upload, Le as User, Re as UserPlus, ze as Users, Be as Volume2, Ve as VolumeX, He as X, Ue as Zap, We as ZoomIn, Ge as ZoomOut, Ke as hazeIconSize };
|