wimui 0.40.0 → 0.41.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.
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/minus.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("./layoutTree.cjs"),a=require("./tree-diagram.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=200,u=64,d=24,f=48,p=(e,t=[])=>{for(let n of e)n.children?.length&&(t.push(n.value),p(n.children,t));return t},m=(e,t=new Map)=>{for(let n of e)t.set(n.value,n),n.children&&m(n.children,t);return t},h=e=>typeof e.label==`string`?e.label:e.value,g=o.default.forwardRef(({nodes:e,orientation:g=`vertical`,expandedValues:_,defaultExpandedValues:v,onExpandedChange:y,selectedValue:b,onSelect:x,renderNode:S,nodeWidth:C=l,nodeHeight:w=u,labels:T,className:E,"aria-label":D,...O},k)=>{let{t:A}=t.useWimTranslation(`components`),j=o.default.useId(),M=T?.expand??(e=>A(`treediagram.expand`,{label:e})),N=T?.collapse??(e=>A(`treediagram.collapse`,{label:e})),[P,F]=(0,o.useState)(()=>v??p(e)),I=_??P,L=(0,o.useMemo)(()=>new Set(I),[I]),R=(0,o.useCallback)(e=>{_===void 0&&F(e),y?.(e)},[_,y]),z=(0,o.useCallback)(e=>R(L.has(e)?I.filter(t=>t!==e):[...I,e]),[I,L,R]),B=(0,o.useMemo)(()=>m(e),[e]),V=(0,o.useMemo)(()=>i.layoutTree(e,{nodeWidth:C,nodeHeight:w,siblingGap:d,levelGap:f,orientation:g,isExpanded:e=>L.has(e)}),[e,C,w,g,L]),H=(0,o.useMemo)(()=>new Map(V.nodes.map(e=>[e.value,e])),[V]),[U,W]=(0,o.useState)(null),G=U!==null&&H.has(U)?U:null,K=G??b??V.nodes[0]?.value??null,q=(0,o.useRef)(new Map),J=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(U===null||H.has(U))return;let e=U,t=e=>{for(let[t,n]of B)if(n.children?.some(t=>t.value===e))return t;return null};for(;e&&!H.has(e);)e=t(e);W(e??null),J.current=!0},[U,H,B]),(0,o.useEffect)(()=>{if(!J.current||G===null)return;J.current=!1;let e=q.current.get(G);e?.focus(),e?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[G]);let Y=e=>{e!==void 0&&(J.current=!0,W(e))},X=(e,t,n)=>{let r=V.nodes,i=L.has(t.value);switch(e.key){case`ArrowDown`:Y(r[n+1]?.value);break;case`ArrowUp`:Y(r[n-1]?.value);break;case`Home`:Y(r[0]?.value);break;case`End`:Y(r[r.length-1]?.value);break;case`ArrowRight`:t.hasChildren&&!i?z(t.value):t.hasChildren&&Y(r[n+1]?.value);break;case`ArrowLeft`:t.hasChildren&&i?z(t.value):t.parent!==null&&Y(t.parent);break;case`Enter`:case` `:if(!x)return;x(t.value);break;default:return}e.preventDefault()},Z=g===`vertical`,Q=(e,t)=>{if(Z){let n=e.x+C/2,r=e.y+w,i=t.x+C/2;return`M${n} ${r}V${r+f/2}H${i}V${t.y}`}let n=e.x+C,r=e.y+w/2,i=t.y+w/2;return`M${n} ${r}H${n+f/2}V${i}H${t.x}`};return(0,c.jsx)(`div`,{ref:k,role:`tree`,"aria-label":D??A(`treediagram.aria`),"aria-orientation":g,className:(0,s.default)(`wim-tree-diagram`,a.default.root,Z?a.default.vertical:a.default.horizontal,E),...O,children:(0,c.jsxs)(`div`,{className:a.default.canvas,style:{width:V.width,height:V.height},children:[(0,c.jsx)(`svg`,{className:a.default.edges,width:V.width,height:V.height,"aria-hidden":`true`,focusable:`false`,children:V.edges.map(e=>(0,c.jsx)(`path`,{d:Q(H.get(e.from),H.get(e.to))},`${e.from}>${e.to}`))}),V.nodes.map((e,t)=>{let i=B.get(e.value),o=L.has(e.value),l=b===e.value,u={depth:e.depth,expanded:o,selected:l,hiddenCount:e.hiddenCount},d=h(i);return(0,c.jsxs)(`div`,{ref:t=>{t?q.current.set(e.value,t):q.current.delete(e.value)},role:`treeitem`,"aria-level":e.depth+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":e.hasChildren?o:void 0,"aria-selected":x?l:void 0,tabIndex:e.value===K?0:-1,"data-value":e.value,"aria-labelledby":S||!i.description?`${j}-${t}`:`${j}-${t} ${j}-${t}-d`,className:(0,s.default)(a.default.node,l&&a.default.selected,x&&a.default.selectable),style:{left:e.x,top:e.y,width:C,height:w},title:d,onKeyDown:n=>X(n,e,t),onFocus:()=>W(e.value),onClick:x?()=>x(e.value):void 0,children:[S?(0,c.jsx)(`span`,{id:`${j}-${t}`,className:a.default.custom,children:S(i,u)}):(0,c.jsxs)(`span`,{className:a.default.content,children:[i.avatar&&(0,c.jsx)(`span`,{className:a.default.avatar,children:i.avatar}),(0,c.jsxs)(`span`,{className:a.default.text,children:[(0,c.jsx)(`span`,{id:`${j}-${t}`,className:a.default.label,children:i.label}),i.description&&(0,c.jsx)(`span`,{id:`${j}-${t}-d`,className:a.default.description,children:i.description})]})]}),e.hasChildren&&(0,c.jsx)(`button`,{type:`button`,tabIndex:-1,className:a.default.toggle,"aria-label":o?N(d):M(d),onClick:t=>{t.stopPropagation(),z(e.value)},children:o?(0,c.jsx)(r.Icon,{component:n.default,size:`xs`}):`+${e.hiddenCount}`})]},e.value)})]})})});g.displayName=`TreeDiagram`,exports.TreeDiagram=g;
@@ -0,0 +1,107 @@
1
+ import { default as React } from 'react';
2
+ export type TreeDiagramNode = {
3
+ /** Unique across the whole diagram (used for expansion, selection and focus). */
4
+ value: string;
5
+ /** Main line of the card, e.g. a person's name. */
6
+ label: React.ReactNode;
7
+ /** Second line of the card, e.g. a job title. */
8
+ description?: React.ReactNode;
9
+ /** Leading visual, e.g. an `Avatar`. */
10
+ avatar?: React.ReactNode;
11
+ children?: TreeDiagramNode[];
12
+ };
13
+ export type TreeDiagramNodeState = {
14
+ depth: number;
15
+ expanded: boolean;
16
+ selected: boolean;
17
+ /** Descendants hidden because this node is collapsed (0 when expanded). */
18
+ hiddenCount: number;
19
+ };
20
+ export type TreeDiagramLabels = {
21
+ /** Accessible name of the collapse / expand button. */
22
+ expand?: (label: string) => string;
23
+ collapse?: (label: string) => string;
24
+ };
25
+ export type TreeDiagramProps = Omit<React.ComponentPropsWithoutRef<"div">, "children" | "onSelect"> & {
26
+ /** The roots of the tree. Several roots are laid out side by side. */
27
+ nodes: TreeDiagramNode[];
28
+ /**
29
+ * `vertical` grows from top to bottom (an org chart). `horizontal` grows from left to
30
+ * right, which suits deep trees and narrow containers.
31
+ */
32
+ orientation?: "vertical" | "horizontal";
33
+ /** Expanded nodes (controlled). A node that is not listed shows only itself. */
34
+ expandedValues?: string[];
35
+ /** Expanded nodes on first render (uncontrolled). Defaults to every node that has children. */
36
+ defaultExpandedValues?: string[];
37
+ /** Called with the new list of expanded nodes when a node is expanded or collapsed. */
38
+ onExpandedChange?: (values: string[]) => void;
39
+ /** Selected node (controlled). Pass `null` for none. */
40
+ selectedValue?: string | null;
41
+ /**
42
+ * Called when a node is chosen by click, Enter or Space. Nodes are only selectable when
43
+ * this is given; without it the diagram is read-only.
44
+ */
45
+ onSelect?: (value: string) => void;
46
+ /** Replaces the default card (label, description, avatar). The card frame stays. */
47
+ renderNode?: (node: TreeDiagramNode, state: TreeDiagramNodeState) => React.ReactNode;
48
+ /**
49
+ * Card width in px. Every card has the same size so the layout is decided before
50
+ * anything is measured; long text is truncated and read in full by assistive technology.
51
+ */
52
+ nodeWidth?: number;
53
+ /** Card height in px. */
54
+ nodeHeight?: number;
55
+ /** Accessible names of the collapse / expand button, for when the built-in translations do not fit. */
56
+ labels?: TreeDiagramLabels;
57
+ };
58
+ /**
59
+ * TreeDiagram — lays out a tree (an org chart, a site map, a taxonomy) from the data alone:
60
+ * no coordinates are passed. Parents sit centred over their children and sibling subtrees
61
+ * never overlap. Subtrees can be collapsed.
62
+ *
63
+ * Keyboard follows the WAI-ARIA tree pattern, the same as `TreeView`: Up / Down move through
64
+ * the visible nodes in reading order, Right expands or moves to the first child, Left
65
+ * collapses or moves to the parent, Home / End jump to the first / last node, and Enter /
66
+ * Space select when `onSelect` is given.
67
+ *
68
+ * Only trees: every node has one parent. A family tree with two parents per person is a
69
+ * different layout problem and is out of scope.
70
+ *
71
+ * Composition Contract:
72
+ * - Managed by: App consumption
73
+ * - Scroll lock: No (the diagram scrolls inside its own box when it is wider than it)
74
+ */
75
+ export declare const TreeDiagram: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onSelect"> & {
76
+ /** The roots of the tree. Several roots are laid out side by side. */
77
+ nodes: TreeDiagramNode[];
78
+ /**
79
+ * `vertical` grows from top to bottom (an org chart). `horizontal` grows from left to
80
+ * right, which suits deep trees and narrow containers.
81
+ */
82
+ orientation?: "vertical" | "horizontal";
83
+ /** Expanded nodes (controlled). A node that is not listed shows only itself. */
84
+ expandedValues?: string[];
85
+ /** Expanded nodes on first render (uncontrolled). Defaults to every node that has children. */
86
+ defaultExpandedValues?: string[];
87
+ /** Called with the new list of expanded nodes when a node is expanded or collapsed. */
88
+ onExpandedChange?: (values: string[]) => void;
89
+ /** Selected node (controlled). Pass `null` for none. */
90
+ selectedValue?: string | null;
91
+ /**
92
+ * Called when a node is chosen by click, Enter or Space. Nodes are only selectable when
93
+ * this is given; without it the diagram is read-only.
94
+ */
95
+ onSelect?: (value: string) => void;
96
+ /** Replaces the default card (label, description, avatar). The card frame stays. */
97
+ renderNode?: (node: TreeDiagramNode, state: TreeDiagramNodeState) => React.ReactNode;
98
+ /**
99
+ * Card width in px. Every card has the same size so the layout is decided before
100
+ * anything is measured; long text is truncated and read in full by assistive technology.
101
+ */
102
+ nodeWidth?: number;
103
+ /** Card height in px. */
104
+ nodeHeight?: number;
105
+ /** Accessible names of the collapse / expand button, for when the built-in translations do not fit. */
106
+ labels?: TreeDiagramLabels;
107
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,190 @@
1
+ "use client";
2
+ import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
+ import t from "../../../icon/minus.js";
4
+ import { Icon as n } from "../../media/Icon/Icon.js";
5
+ import { layoutTree as r } from "./layoutTree.js";
6
+ import i from "./tree-diagram.module.js";
7
+ import a, { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
8
+ import d from "classnames";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
10
+ //#region src/components/data-display/TreeDiagram/TreeDiagram.tsx
11
+ var m = 200, h = 64, g = 24, _ = 48, v = (e, t = []) => {
12
+ for (let n of e) n.children?.length && (t.push(n.value), v(n.children, t));
13
+ return t;
14
+ }, y = (e, t = /* @__PURE__ */ new Map()) => {
15
+ for (let n of e) t.set(n.value, n), n.children && y(n.children, t);
16
+ return t;
17
+ }, b = (e) => typeof e.label == "string" ? e.label : e.value, x = a.forwardRef(({ nodes: x, orientation: S = "vertical", expandedValues: C, defaultExpandedValues: w, onExpandedChange: T, selectedValue: E, onSelect: D, renderNode: O, nodeWidth: k = m, nodeHeight: A = h, labels: j, className: M, "aria-label": ee, ...te }, ne) => {
18
+ let { t: N } = e("components"), P = a.useId(), F = j?.expand ?? ((e) => N("treediagram.expand", { label: e })), I = j?.collapse ?? ((e) => N("treediagram.collapse", { label: e })), [L, R] = u(() => w ?? v(x)), z = C ?? L, B = c(() => new Set(z), [z]), V = o((e) => {
19
+ C === void 0 && R(e), T?.(e);
20
+ }, [C, T]), H = o((e) => V(B.has(e) ? z.filter((t) => t !== e) : [...z, e]), [
21
+ z,
22
+ B,
23
+ V
24
+ ]), U = c(() => y(x), [x]), W = c(() => r(x, {
25
+ nodeWidth: k,
26
+ nodeHeight: A,
27
+ siblingGap: g,
28
+ levelGap: _,
29
+ orientation: S,
30
+ isExpanded: (e) => B.has(e)
31
+ }), [
32
+ x,
33
+ k,
34
+ A,
35
+ S,
36
+ B
37
+ ]), G = c(() => new Map(W.nodes.map((e) => [e.value, e])), [W]), [K, q] = u(null), J = K !== null && G.has(K) ? K : null, Y = J ?? E ?? W.nodes[0]?.value ?? null, X = l(/* @__PURE__ */ new Map()), Z = l(!1);
38
+ s(() => {
39
+ if (K === null || G.has(K)) return;
40
+ let e = K, t = (e) => {
41
+ for (let [t, n] of U) if (n.children?.some((t) => t.value === e)) return t;
42
+ return null;
43
+ };
44
+ for (; e && !G.has(e);) e = t(e);
45
+ q(e ?? null), Z.current = !0;
46
+ }, [
47
+ K,
48
+ G,
49
+ U
50
+ ]), s(() => {
51
+ if (!Z.current || J === null) return;
52
+ Z.current = !1;
53
+ let e = X.current.get(J);
54
+ e?.focus(), e?.scrollIntoView?.({
55
+ block: "nearest",
56
+ inline: "nearest"
57
+ });
58
+ }, [J]);
59
+ let Q = (e) => {
60
+ e !== void 0 && (Z.current = !0, q(e));
61
+ }, re = (e, t, n) => {
62
+ let r = W.nodes, i = B.has(t.value);
63
+ switch (e.key) {
64
+ case "ArrowDown":
65
+ Q(r[n + 1]?.value);
66
+ break;
67
+ case "ArrowUp":
68
+ Q(r[n - 1]?.value);
69
+ break;
70
+ case "Home":
71
+ Q(r[0]?.value);
72
+ break;
73
+ case "End":
74
+ Q(r[r.length - 1]?.value);
75
+ break;
76
+ case "ArrowRight":
77
+ t.hasChildren && !i ? H(t.value) : t.hasChildren && Q(r[n + 1]?.value);
78
+ break;
79
+ case "ArrowLeft":
80
+ t.hasChildren && i ? H(t.value) : t.parent !== null && Q(t.parent);
81
+ break;
82
+ case "Enter":
83
+ case " ":
84
+ if (!D) return;
85
+ D(t.value);
86
+ break;
87
+ default: return;
88
+ }
89
+ e.preventDefault();
90
+ }, $ = S === "vertical", ie = (e, t) => {
91
+ if ($) {
92
+ let n = e.x + k / 2, r = e.y + A, i = t.x + k / 2;
93
+ return `M${n} ${r}V${r + _ / 2}H${i}V${t.y}`;
94
+ }
95
+ let n = e.x + k, r = e.y + A / 2, i = t.y + A / 2;
96
+ return `M${n} ${r}H${n + _ / 2}V${i}H${t.x}`;
97
+ };
98
+ return /* @__PURE__ */ f("div", {
99
+ ref: ne,
100
+ role: "tree",
101
+ "aria-label": ee ?? N("treediagram.aria"),
102
+ "aria-orientation": S,
103
+ className: d("wim-tree-diagram", i.root, $ ? i.vertical : i.horizontal, M),
104
+ ...te,
105
+ children: /* @__PURE__ */ p("div", {
106
+ className: i.canvas,
107
+ style: {
108
+ width: W.width,
109
+ height: W.height
110
+ },
111
+ children: [/* @__PURE__ */ f("svg", {
112
+ className: i.edges,
113
+ width: W.width,
114
+ height: W.height,
115
+ "aria-hidden": "true",
116
+ focusable: "false",
117
+ children: W.edges.map((e) => /* @__PURE__ */ f("path", { d: ie(G.get(e.from), G.get(e.to)) }, `${e.from}>${e.to}`))
118
+ }), W.nodes.map((e, r) => {
119
+ let a = U.get(e.value), o = B.has(e.value), s = E === e.value, c = {
120
+ depth: e.depth,
121
+ expanded: o,
122
+ selected: s,
123
+ hiddenCount: e.hiddenCount
124
+ }, l = b(a);
125
+ return /* @__PURE__ */ p("div", {
126
+ ref: (t) => {
127
+ t ? X.current.set(e.value, t) : X.current.delete(e.value);
128
+ },
129
+ role: "treeitem",
130
+ "aria-level": e.depth + 1,
131
+ "aria-setsize": e.setSize,
132
+ "aria-posinset": e.posInSet,
133
+ "aria-expanded": e.hasChildren ? o : void 0,
134
+ "aria-selected": D ? s : void 0,
135
+ tabIndex: e.value === Y ? 0 : -1,
136
+ "data-value": e.value,
137
+ "aria-labelledby": O || !a.description ? `${P}-${r}` : `${P}-${r} ${P}-${r}-d`,
138
+ className: d(i.node, s && i.selected, D && i.selectable),
139
+ style: {
140
+ left: e.x,
141
+ top: e.y,
142
+ width: k,
143
+ height: A
144
+ },
145
+ title: l,
146
+ onKeyDown: (t) => re(t, e, r),
147
+ onFocus: () => q(e.value),
148
+ onClick: D ? () => D(e.value) : void 0,
149
+ children: [O ? /* @__PURE__ */ f("span", {
150
+ id: `${P}-${r}`,
151
+ className: i.custom,
152
+ children: O(a, c)
153
+ }) : /* @__PURE__ */ p("span", {
154
+ className: i.content,
155
+ children: [a.avatar && /* @__PURE__ */ f("span", {
156
+ className: i.avatar,
157
+ children: a.avatar
158
+ }), /* @__PURE__ */ p("span", {
159
+ className: i.text,
160
+ children: [/* @__PURE__ */ f("span", {
161
+ id: `${P}-${r}`,
162
+ className: i.label,
163
+ children: a.label
164
+ }), a.description && /* @__PURE__ */ f("span", {
165
+ id: `${P}-${r}-d`,
166
+ className: i.description,
167
+ children: a.description
168
+ })]
169
+ })]
170
+ }), e.hasChildren && /* @__PURE__ */ f("button", {
171
+ type: "button",
172
+ tabIndex: -1,
173
+ className: i.toggle,
174
+ "aria-label": o ? I(l) : F(l),
175
+ onClick: (t) => {
176
+ t.stopPropagation(), H(e.value);
177
+ },
178
+ children: o ? /* @__PURE__ */ f(n, {
179
+ component: t,
180
+ size: "xs"
181
+ }) : `+${e.hiddenCount}`
182
+ })]
183
+ }, e.value);
184
+ })]
185
+ })
186
+ });
187
+ });
188
+ x.displayName = "TreeDiagram";
189
+ //#endregion
190
+ export { x as TreeDiagram };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var e=t=>(t.children??[]).reduce((t,n)=>t+1+e(n),0);function t(t,n){let{nodeWidth:r,nodeHeight:i,siblingGap:a,levelGap:o,orientation:s,isExpanded:c}=n,l=s===`vertical`?r:i,u=s===`vertical`?i:r,d=l+a,f=e=>{let t=[],n=[];e.forEach((e,r)=>{let i=0;if(r>0){i=-1/0;let t=Math.min(n.length,e.left.length);for(let r=0;r<t;r++)i=Math.max(i,n[r]-e.left[r]+d)}e.offset=i,e.left.forEach((e,n)=>{(t[n]===void 0||e+i<t[n])&&(t[n]=e+i)}),e.right.forEach((e,t)=>{(n[t]===void 0||e+i>n[t])&&(n[t]=e+i)})});let r=e.length?(e[0].offset+e[e.length-1].offset)/2:0;return e.forEach(e=>e.offset-=r),{items:e,left:t.map(e=>e-r),right:n.map(e=>e-r)}},p=e=>{let t=c(e.value)?e.children??[]:[],n=f(t.map(p));return{source:e,offset:0,children:n.items,left:[0,...n.left],right:[0,...n.right]}},m=f(t.map(p)),h=[],g=[],_=[],v=0,y=(t,n,r,i,a,o)=>{let s=(t.source.children?.length??0)>0;h.push({value:t.source.value,x:0,y:0,depth:r,parent:i,hasChildren:s,hiddenCount:s&&t.children.length===0?e(t.source):0,posInSet:a,setSize:o}),g.push(n),v=Math.max(v,r),t.children.forEach((e,i)=>{_.push({from:t.source.value,to:e.source.value}),y(e,n+e.offset,r+1,t.source.value,i+1,t.children.length)})};if(m.items.forEach((e,t)=>y(e,e.offset,0,null,t+1,m.items.length)),h.length===0)return{nodes:h,edges:_,width:0,height:0};let b=Math.min(...g),x=Math.max(...g);h.forEach((e,t)=>{let n=g[t]-b,r=e.depth*(u+o);s===`vertical`?(e.x=n,e.y=r):(e.x=r,e.y=n)});let S=x-b+l,C=(v+1)*u+v*o;return s===`vertical`?{nodes:h,edges:_,width:S,height:C}:{nodes:h,edges:_,width:C,height:S}}exports.layoutTree=t;
@@ -0,0 +1,62 @@
1
+ /**
2
+ * 木の自動配置(tidy tree)。
3
+ *
4
+ * 描画から切り離した純粋な関数で、座標は「幅方向(breadth)× 深さ方向(depth)」で
5
+ * 計算してから、`orientation` に合わせて x / y に写す。縦(上から下)なら幅方向が x、
6
+ * 横(左から右)なら幅方向が y になる。
7
+ *
8
+ * 約束(`layoutTree.test.ts` が見る):
9
+ * 1. 兄弟の部分木は、どの深さでも `siblingGap` 以上離れて重ならない
10
+ * 2. 親は、見えている子の列の中央(最初の子と最後の子の中点)に置く
11
+ * 3. 同じ深さのノードは、深さ方向の同じ位置に並ぶ
12
+ * 4. 折りたたんだノードの子孫は配置しない
13
+ *
14
+ * 手法は Reingold–Tilford の考え方そのまま ── 部分木ごとに「深さごとの左端・右端」
15
+ * (輪郭)を持ち、次の兄弟を、左の兄弟たちの右の輪郭にぶつからない所まで右へずらす。
16
+ * 輪郭の比較は深さの数だけかかるので O(ノード数 × 深さ)。組織図の規模(数百)では
17
+ * 十分速く、Buchheim の線形時間版の複雑さ(スレッド・ancestor の付け替え)を持たない。
18
+ * 兄弟の間の余りを均す処理(Walker の apportion)はしない ── 狭い部分木どうしの間に
19
+ * 広い部分木があるときに間隔が左右で不揃いになりうるが、重なりは起きない。
20
+ */
21
+ export type TreeLayoutInput = {
22
+ value: string;
23
+ children?: TreeLayoutInput[];
24
+ };
25
+ export type TreeLayoutNode = {
26
+ value: string;
27
+ /** 描画座標(ノードの左上)。 */
28
+ x: number;
29
+ y: number;
30
+ depth: number;
31
+ parent: string | null;
32
+ /** 子を持つか(折りたたみ中でも true)。 */
33
+ hasChildren: boolean;
34
+ /** 折りたたんで隠している子孫の数。開いていれば 0。 */
35
+ hiddenCount: number;
36
+ /** 兄弟の中での位置(1 始まり)と兄弟の数。`aria-posinset` / `aria-setsize` に使う。 */
37
+ posInSet: number;
38
+ setSize: number;
39
+ };
40
+ export type TreeLayoutEdge = {
41
+ from: string;
42
+ to: string;
43
+ };
44
+ export type TreeLayoutOptions = {
45
+ nodeWidth: number;
46
+ nodeHeight: number;
47
+ /** 兄弟(幅方向)の間隔。 */
48
+ siblingGap: number;
49
+ /** 親子(深さ方向)の間隔。 */
50
+ levelGap: number;
51
+ orientation: "vertical" | "horizontal";
52
+ /** 開いているか。false のノードは子孫を配置しない。 */
53
+ isExpanded: (value: string) => boolean;
54
+ };
55
+ export type TreeLayoutResult = {
56
+ /** 前順(親 → 子、兄弟は左から)。キーボードの「次に見えているノード」の順と同じ。 */
57
+ nodes: TreeLayoutNode[];
58
+ edges: TreeLayoutEdge[];
59
+ width: number;
60
+ height: number;
61
+ };
62
+ export declare function layoutTree(roots: TreeLayoutInput[], options: TreeLayoutOptions): TreeLayoutResult;
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ //#region src/components/data-display/TreeDiagram/layoutTree.ts
3
+ var e = (t) => (t.children ?? []).reduce((t, n) => t + 1 + e(n), 0);
4
+ function t(t, n) {
5
+ let { nodeWidth: r, nodeHeight: i, siblingGap: a, levelGap: o, orientation: s, isExpanded: c } = n, l = s === "vertical" ? r : i, u = s === "vertical" ? i : r, d = l + a, f = (e) => {
6
+ let t = [], n = [];
7
+ e.forEach((e, r) => {
8
+ let i = 0;
9
+ if (r > 0) {
10
+ i = -Infinity;
11
+ let t = Math.min(n.length, e.left.length);
12
+ for (let r = 0; r < t; r++) i = Math.max(i, n[r] - e.left[r] + d);
13
+ }
14
+ e.offset = i, e.left.forEach((e, n) => {
15
+ (t[n] === void 0 || e + i < t[n]) && (t[n] = e + i);
16
+ }), e.right.forEach((e, t) => {
17
+ (n[t] === void 0 || e + i > n[t]) && (n[t] = e + i);
18
+ });
19
+ });
20
+ let r = e.length ? (e[0].offset + e[e.length - 1].offset) / 2 : 0;
21
+ return e.forEach((e) => e.offset -= r), {
22
+ items: e,
23
+ left: t.map((e) => e - r),
24
+ right: n.map((e) => e - r)
25
+ };
26
+ }, p = (e) => {
27
+ let t = c(e.value) ? e.children ?? [] : [], n = f(t.map(p));
28
+ return {
29
+ source: e,
30
+ offset: 0,
31
+ children: n.items,
32
+ left: [0, ...n.left],
33
+ right: [0, ...n.right]
34
+ };
35
+ }, m = f(t.map(p)), h = [], g = [], _ = [], v = 0, y = (t, n, r, i, a, o) => {
36
+ let s = (t.source.children?.length ?? 0) > 0;
37
+ h.push({
38
+ value: t.source.value,
39
+ x: 0,
40
+ y: 0,
41
+ depth: r,
42
+ parent: i,
43
+ hasChildren: s,
44
+ hiddenCount: s && t.children.length === 0 ? e(t.source) : 0,
45
+ posInSet: a,
46
+ setSize: o
47
+ }), g.push(n), v = Math.max(v, r), t.children.forEach((e, i) => {
48
+ _.push({
49
+ from: t.source.value,
50
+ to: e.source.value
51
+ }), y(e, n + e.offset, r + 1, t.source.value, i + 1, t.children.length);
52
+ });
53
+ };
54
+ if (m.items.forEach((e, t) => y(e, e.offset, 0, null, t + 1, m.items.length)), h.length === 0) return {
55
+ nodes: h,
56
+ edges: _,
57
+ width: 0,
58
+ height: 0
59
+ };
60
+ let b = Math.min(...g), x = Math.max(...g);
61
+ h.forEach((e, t) => {
62
+ let n = g[t] - b, r = e.depth * (u + o);
63
+ s === "vertical" ? (e.x = n, e.y = r) : (e.x = r, e.y = n);
64
+ });
65
+ let S = x - b + l, C = (v + 1) * u + v * o;
66
+ return s === "vertical" ? {
67
+ nodes: h,
68
+ edges: _,
69
+ width: S,
70
+ height: C
71
+ } : {
72
+ nodes: h,
73
+ edges: _,
74
+ width: C,
75
+ height: S
76
+ };
77
+ }
78
+ //#endregion
79
+ export { t as layoutTree };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ var e=`_root_smsot_4`,t=`_canvas_smsot_10`,n=`_edges_smsot_14`,r=`_node_smsot_25`,i=`_selectable_smsot_42`,a=`_selected_smsot_48`,o=`_content_smsot_52`,s=`_custom_smsot_53`,c=`_avatar_smsot_60`,l=`_text_smsot_64`,u=`_label_smsot_70`,d=`_description_smsot_71`,f=`_toggle_smsot_85`,p=`_vertical_smsot_106`,m=`_horizontal_smsot_111`,h={root:e,canvas:t,edges:n,node:r,selectable:i,selected:a,content:o,custom:s,avatar:c,text:l,label:u,description:d,toggle:f,vertical:p,horizontal:m};exports.avatar=c,exports.canvas=t,exports.content=o,exports.custom=s,exports.default=h,exports.description=d,exports.edges=n,exports.horizontal=m,exports.label=u,exports.node=r,exports.root=e,exports.selectable=i,exports.selected=a,exports.text=l,exports.toggle=f,exports.vertical=p;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ //#region src/components/data-display/TreeDiagram/tree-diagram.module.scss
3
+ var e = "_root_smsot_4", t = "_canvas_smsot_10", n = "_edges_smsot_14", r = "_node_smsot_25", i = "_selectable_smsot_42", a = "_selected_smsot_48", o = "_content_smsot_52", s = "_custom_smsot_53", c = "_avatar_smsot_60", l = "_text_smsot_64", u = "_label_smsot_70", d = "_description_smsot_71", f = "_toggle_smsot_85", p = "_vertical_smsot_106", m = "_horizontal_smsot_111", h = {
4
+ root: e,
5
+ canvas: t,
6
+ edges: n,
7
+ node: r,
8
+ selectable: i,
9
+ selected: a,
10
+ content: o,
11
+ custom: s,
12
+ avatar: c,
13
+ text: l,
14
+ label: u,
15
+ description: d,
16
+ toggle: f,
17
+ vertical: p,
18
+ horizontal: m
19
+ };
20
+ //#endregion
21
+ export { c as avatar, t as canvas, o as content, s as custom, h as default, d as description, n as edges, m as horizontal, u as label, r as node, e as root, i as selectable, a as selected, l as text, f as toggle, p as vertical };
@@ -18,6 +18,7 @@ export * from './components/data-display/Table/Table';
18
18
  export * from './components/data-display/Tag/Tag';
19
19
  export * from './components/data-display/Timeline/Timeline';
20
20
  export * from './components/data-display/TreeView/TreeView';
21
+ export * from './components/data-display/TreeDiagram/TreeDiagram';
21
22
  export * from './components/data-display/VirtualList/VirtualList';
22
23
  export * from './components/data-display/FAQSection/FAQSection';
23
24
  export * from './components/data-display/InfiniteScroll/InfiniteScroll';
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/data-display/Card/Card.cjs"),t=require("./components/data-display/Badge/Badge.cjs"),n=require("./components/data-display/Calendar/Calendar.cjs"),r=require("./components/data-display/Chip/Chip.cjs"),i=require("./components/data-display/VirtualList/VirtualList.cjs"),a=require("./components/data-display/TreeView/TreeView.cjs"),o=require("./components/data-display/Tag/Tag.cjs"),s=require("./components/data-display/Accordion/Accordion.cjs"),c=require("./components/data-display/Avatar/Avatar.cjs"),l=require("./components/data-display/AvatarGroup/AvatarGroup.cjs"),u=require("./components/data-display/Calendar/RangeCalendar.cjs"),d=require("./components/data-display/Carousel/Carousel.cjs"),f=require("./components/data-display/Table/useTableSort.cjs"),p=require("./components/data-display/Table/Table.cjs"),m=require("./components/data-display/DataGrid/DataGrid.cjs"),h=require("./components/data-display/DescriptionList/DescriptionList.cjs"),g=require("./components/data-display/EmptyState/EmptyState.cjs"),_=require("./components/data-display/Kanban/Kanban.cjs"),v=require("./components/data-display/List/List.cjs"),y=require("./components/data-display/Marquee/Marquee.cjs"),b=require("./components/data-display/Stats/Stats.cjs"),x=require("./components/data-display/Timeline/Timeline.cjs"),S=require("./components/data-display/FAQSection/FAQSection.cjs"),C=require("./components/data-display/InfiniteScroll/InfiniteScroll.cjs"),w=require("./components/data-display/SortableList/SortableList.cjs"),T=require("./components/data-display/SwipeAction/SwipeableList.cjs"),E=require("./components/data-display/SwipeAction/SwipeAction.cjs"),D=require("./components/data-display/PullToRefresh/PullToRefresh.cjs"),O=require("./components/data-display/JsonViewer/JsonViewer.cjs"),k=require("./components/data-display/CalendarHeatmap/CalendarHeatmap.cjs"),A=require("./components/data-display/Reaction/Reaction.cjs"),j=require("./components/data-display/Leaderboard/Leaderboard.cjs"),M=require("./components/data-display/RelativeTime/RelativeTime.cjs"),N=require("./components/data-display/Comment/Comment.cjs"),P=require("./components/data-display/Countdown/Countdown.cjs"),F=require("./components/data-display/Presence/Presence.cjs"),I=require("./components/data-display/Barcode/Barcode.cjs");exports.Accordion=s.Accordion,exports.AccordionContent=s.AccordionContent,exports.AccordionItem=s.AccordionItem,exports.AccordionTrigger=s.AccordionTrigger,exports.Avatar=c.Avatar,exports.AvatarGroup=l.AvatarGroup,exports.Badge=t.Badge,exports.Barcode=I.Barcode,exports.Calendar=n.Calendar,exports.CalendarHeatmap=k.CalendarHeatmap,exports.Card=e.Card,exports.CardBody=e.CardBody,exports.CardFooter=e.CardFooter,exports.CardHeader=e.CardHeader,exports.Carousel=d.Carousel,exports.Chip=r.Chip,exports.Comment=N.Comment,exports.Countdown=P.Countdown,exports.DataGrid=m.DataGrid,exports.DescriptionList=h.DescriptionList,exports.DescriptionListDetails=h.DescriptionListDetails,exports.DescriptionListItem=h.DescriptionListItem,exports.DescriptionListTerm=h.DescriptionListTerm,exports.EmptyState=g.EmptyState,exports.FAQSection=S.FAQSection,exports.InfiniteScroll=C.InfiniteScroll,exports.JsonViewer=O.JsonViewer,exports.Kanban=_.Kanban,exports.KanbanBoard=_.KanbanBoard,exports.KanbanCard=_.KanbanCard,exports.KanbanColumn=_.KanbanColumn,exports.Leaderboard=j.Leaderboard,exports.List=v.List,exports.ListItem=v.ListItem,exports.Marquee=y.Marquee,exports.Presence=F.Presence,exports.PullToRefresh=D.PullToRefresh,exports.RangeCalendar=u.RangeCalendar,exports.Reaction=A.Reaction,exports.RelativeTime=M.RelativeTime,exports.SortableList=w.SortableList,exports.SortableListDragHandle=w.SortableListDragHandle,exports.SortableListItem=w.SortableListItem,exports.Stats=b.Stats,exports.StatsDescription=b.StatsDescription,exports.StatsLabel=b.StatsLabel,exports.StatsTrend=b.StatsTrend,exports.StatsValue=b.StatsValue,exports.SwipeAction=E.SwipeAction,exports.SwipeableList=T.SwipeableList,exports.Table=p.Table,exports.TableBody=p.TableBody,exports.TableCell=p.TableCell,exports.TableFooter=p.TableFooter,exports.TableHead=p.TableHead,exports.TableHeader=p.TableHeader,exports.TableRow=p.TableRow,exports.Tag=o.Tag,exports.Timeline=x.Timeline,exports.TimelineConnector=x.TimelineConnector,exports.TimelineContent=x.TimelineContent,exports.TimelineItem=x.TimelineItem,exports.TimelineOppositeContent=x.TimelineOppositeContent,exports.TimelinePoint=x.TimelinePoint,exports.TimelineSeparator=x.TimelineSeparator,exports.TreeView=a.TreeView,exports.TreeViewItem=a.TreeViewItem,exports.VirtualList=i.VirtualList,exports.getNextSortDirection=f.getNextSortDirection,exports.useTableSort=f.useTableSort;
2
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components/data-display/Card/Card.cjs"),t=require("./components/data-display/Badge/Badge.cjs"),n=require("./components/data-display/Calendar/Calendar.cjs"),r=require("./components/data-display/Chip/Chip.cjs"),i=require("./components/data-display/VirtualList/VirtualList.cjs"),a=require("./components/data-display/TreeView/TreeView.cjs"),o=require("./components/data-display/Tag/Tag.cjs"),s=require("./components/data-display/Accordion/Accordion.cjs"),c=require("./components/data-display/Avatar/Avatar.cjs"),l=require("./components/data-display/AvatarGroup/AvatarGroup.cjs"),u=require("./components/data-display/Calendar/RangeCalendar.cjs"),d=require("./components/data-display/Carousel/Carousel.cjs"),f=require("./components/data-display/Table/useTableSort.cjs"),p=require("./components/data-display/Table/Table.cjs"),m=require("./components/data-display/DataGrid/DataGrid.cjs"),h=require("./components/data-display/DescriptionList/DescriptionList.cjs"),g=require("./components/data-display/EmptyState/EmptyState.cjs"),_=require("./components/data-display/Kanban/Kanban.cjs"),v=require("./components/data-display/List/List.cjs"),y=require("./components/data-display/Marquee/Marquee.cjs"),b=require("./components/data-display/Stats/Stats.cjs"),x=require("./components/data-display/Timeline/Timeline.cjs"),S=require("./components/data-display/TreeDiagram/TreeDiagram.cjs"),C=require("./components/data-display/FAQSection/FAQSection.cjs"),w=require("./components/data-display/InfiniteScroll/InfiniteScroll.cjs"),T=require("./components/data-display/SortableList/SortableList.cjs"),E=require("./components/data-display/SwipeAction/SwipeableList.cjs"),D=require("./components/data-display/SwipeAction/SwipeAction.cjs"),O=require("./components/data-display/PullToRefresh/PullToRefresh.cjs"),k=require("./components/data-display/JsonViewer/JsonViewer.cjs"),A=require("./components/data-display/CalendarHeatmap/CalendarHeatmap.cjs"),j=require("./components/data-display/Reaction/Reaction.cjs"),M=require("./components/data-display/Leaderboard/Leaderboard.cjs"),N=require("./components/data-display/RelativeTime/RelativeTime.cjs"),P=require("./components/data-display/Comment/Comment.cjs"),F=require("./components/data-display/Countdown/Countdown.cjs"),I=require("./components/data-display/Presence/Presence.cjs"),L=require("./components/data-display/Barcode/Barcode.cjs");exports.Accordion=s.Accordion,exports.AccordionContent=s.AccordionContent,exports.AccordionItem=s.AccordionItem,exports.AccordionTrigger=s.AccordionTrigger,exports.Avatar=c.Avatar,exports.AvatarGroup=l.AvatarGroup,exports.Badge=t.Badge,exports.Barcode=L.Barcode,exports.Calendar=n.Calendar,exports.CalendarHeatmap=A.CalendarHeatmap,exports.Card=e.Card,exports.CardBody=e.CardBody,exports.CardFooter=e.CardFooter,exports.CardHeader=e.CardHeader,exports.Carousel=d.Carousel,exports.Chip=r.Chip,exports.Comment=P.Comment,exports.Countdown=F.Countdown,exports.DataGrid=m.DataGrid,exports.DescriptionList=h.DescriptionList,exports.DescriptionListDetails=h.DescriptionListDetails,exports.DescriptionListItem=h.DescriptionListItem,exports.DescriptionListTerm=h.DescriptionListTerm,exports.EmptyState=g.EmptyState,exports.FAQSection=C.FAQSection,exports.InfiniteScroll=w.InfiniteScroll,exports.JsonViewer=k.JsonViewer,exports.Kanban=_.Kanban,exports.KanbanBoard=_.KanbanBoard,exports.KanbanCard=_.KanbanCard,exports.KanbanColumn=_.KanbanColumn,exports.Leaderboard=M.Leaderboard,exports.List=v.List,exports.ListItem=v.ListItem,exports.Marquee=y.Marquee,exports.Presence=I.Presence,exports.PullToRefresh=O.PullToRefresh,exports.RangeCalendar=u.RangeCalendar,exports.Reaction=j.Reaction,exports.RelativeTime=N.RelativeTime,exports.SortableList=T.SortableList,exports.SortableListDragHandle=T.SortableListDragHandle,exports.SortableListItem=T.SortableListItem,exports.Stats=b.Stats,exports.StatsDescription=b.StatsDescription,exports.StatsLabel=b.StatsLabel,exports.StatsTrend=b.StatsTrend,exports.StatsValue=b.StatsValue,exports.SwipeAction=D.SwipeAction,exports.SwipeableList=E.SwipeableList,exports.Table=p.Table,exports.TableBody=p.TableBody,exports.TableCell=p.TableCell,exports.TableFooter=p.TableFooter,exports.TableHead=p.TableHead,exports.TableHeader=p.TableHeader,exports.TableRow=p.TableRow,exports.Tag=o.Tag,exports.Timeline=x.Timeline,exports.TimelineConnector=x.TimelineConnector,exports.TimelineContent=x.TimelineContent,exports.TimelineItem=x.TimelineItem,exports.TimelineOppositeContent=x.TimelineOppositeContent,exports.TimelinePoint=x.TimelinePoint,exports.TimelineSeparator=x.TimelineSeparator,exports.TreeDiagram=S.TreeDiagram,exports.TreeView=a.TreeView,exports.TreeViewItem=a.TreeViewItem,exports.VirtualList=i.VirtualList,exports.getNextSortDirection=f.getNextSortDirection,exports.useTableSort=f.useTableSort;
@@ -21,19 +21,20 @@ import { List as R, ListItem as z } from "./components/data-display/List/List.js
21
21
  import { Marquee as B } from "./components/data-display/Marquee/Marquee.js";
22
22
  import { Stats as V, StatsDescription as H, StatsLabel as U, StatsTrend as W, StatsValue as G } from "./components/data-display/Stats/Stats.js";
23
23
  import { Timeline as K, TimelineConnector as q, TimelineContent as J, TimelineItem as Y, TimelineOppositeContent as X, TimelinePoint as Z, TimelineSeparator as Q } from "./components/data-display/Timeline/Timeline.js";
24
- import { FAQSection as $ } from "./components/data-display/FAQSection/FAQSection.js";
25
- import { InfiniteScroll as ee } from "./components/data-display/InfiniteScroll/InfiniteScroll.js";
26
- import { SortableList as te, SortableListDragHandle as ne, SortableListItem as re } from "./components/data-display/SortableList/SortableList.js";
27
- import { SwipeableList as ie } from "./components/data-display/SwipeAction/SwipeableList.js";
28
- import { SwipeAction as ae } from "./components/data-display/SwipeAction/SwipeAction.js";
29
- import { PullToRefresh as oe } from "./components/data-display/PullToRefresh/PullToRefresh.js";
30
- import { JsonViewer as se } from "./components/data-display/JsonViewer/JsonViewer.js";
31
- import { CalendarHeatmap as ce } from "./components/data-display/CalendarHeatmap/CalendarHeatmap.js";
32
- import { Reaction as le } from "./components/data-display/Reaction/Reaction.js";
33
- import { Leaderboard as ue } from "./components/data-display/Leaderboard/Leaderboard.js";
34
- import { RelativeTime as de } from "./components/data-display/RelativeTime/RelativeTime.js";
35
- import { Comment as fe } from "./components/data-display/Comment/Comment.js";
36
- import { Countdown as pe } from "./components/data-display/Countdown/Countdown.js";
37
- import { Presence as me } from "./components/data-display/Presence/Presence.js";
38
- import { Barcode as he } from "./components/data-display/Barcode/Barcode.js";
39
- export { d as Accordion, f as AccordionContent, p as AccordionItem, m as AccordionTrigger, h as Avatar, g as AvatarGroup, i as Badge, he as Barcode, a as Calendar, ce as CalendarHeatmap, e as Card, t as CardBody, n as CardFooter, r as CardHeader, v as Carousel, o as Chip, fe as Comment, pe as Countdown, O as DataGrid, k as DescriptionList, A as DescriptionListDetails, j as DescriptionListItem, M as DescriptionListTerm, N as EmptyState, $ as FAQSection, ee as InfiniteScroll, se as JsonViewer, P as Kanban, F as KanbanBoard, I as KanbanCard, L as KanbanColumn, ue as Leaderboard, R as List, z as ListItem, B as Marquee, me as Presence, oe as PullToRefresh, _ as RangeCalendar, le as Reaction, de as RelativeTime, te as SortableList, ne as SortableListDragHandle, re as SortableListItem, V as Stats, H as StatsDescription, U as StatsLabel, W as StatsTrend, G as StatsValue, ae as SwipeAction, ie as SwipeableList, x as Table, S as TableBody, C as TableCell, w as TableFooter, T as TableHead, E as TableHeader, D as TableRow, u as Tag, K as Timeline, q as TimelineConnector, J as TimelineContent, Y as TimelineItem, X as TimelineOppositeContent, Z as TimelinePoint, Q as TimelineSeparator, c as TreeView, l as TreeViewItem, s as VirtualList, y as getNextSortDirection, b as useTableSort };
24
+ import { TreeDiagram as $ } from "./components/data-display/TreeDiagram/TreeDiagram.js";
25
+ import { FAQSection as ee } from "./components/data-display/FAQSection/FAQSection.js";
26
+ import { InfiniteScroll as te } from "./components/data-display/InfiniteScroll/InfiniteScroll.js";
27
+ import { SortableList as ne, SortableListDragHandle as re, SortableListItem as ie } from "./components/data-display/SortableList/SortableList.js";
28
+ import { SwipeableList as ae } from "./components/data-display/SwipeAction/SwipeableList.js";
29
+ import { SwipeAction as oe } from "./components/data-display/SwipeAction/SwipeAction.js";
30
+ import { PullToRefresh as se } from "./components/data-display/PullToRefresh/PullToRefresh.js";
31
+ import { JsonViewer as ce } from "./components/data-display/JsonViewer/JsonViewer.js";
32
+ import { CalendarHeatmap as le } from "./components/data-display/CalendarHeatmap/CalendarHeatmap.js";
33
+ import { Reaction as ue } from "./components/data-display/Reaction/Reaction.js";
34
+ import { Leaderboard as de } from "./components/data-display/Leaderboard/Leaderboard.js";
35
+ import { RelativeTime as fe } from "./components/data-display/RelativeTime/RelativeTime.js";
36
+ import { Comment as pe } from "./components/data-display/Comment/Comment.js";
37
+ import { Countdown as me } from "./components/data-display/Countdown/Countdown.js";
38
+ import { Presence as he } from "./components/data-display/Presence/Presence.js";
39
+ import { Barcode as ge } from "./components/data-display/Barcode/Barcode.js";
40
+ export { d as Accordion, f as AccordionContent, p as AccordionItem, m as AccordionTrigger, h as Avatar, g as AvatarGroup, i as Badge, ge as Barcode, a as Calendar, le as CalendarHeatmap, e as Card, t as CardBody, n as CardFooter, r as CardHeader, v as Carousel, o as Chip, pe as Comment, me as Countdown, O as DataGrid, k as DescriptionList, A as DescriptionListDetails, j as DescriptionListItem, M as DescriptionListTerm, N as EmptyState, ee as FAQSection, te as InfiniteScroll, ce as JsonViewer, P as Kanban, F as KanbanBoard, I as KanbanCard, L as KanbanColumn, de as Leaderboard, R as List, z as ListItem, B as Marquee, he as Presence, se as PullToRefresh, _ as RangeCalendar, ue as Reaction, fe as RelativeTime, ne as SortableList, re as SortableListDragHandle, ie as SortableListItem, V as Stats, H as StatsDescription, U as StatsLabel, W as StatsTrend, G as StatsValue, oe as SwipeAction, ae as SwipeableList, x as Table, S as TableBody, C as TableCell, w as TableFooter, T as TableHead, E as TableHeader, D as TableRow, u as Tag, K as Timeline, q as TimelineConnector, J as TimelineContent, Y as TimelineItem, X as TimelineOppositeContent, Z as TimelinePoint, Q as TimelineSeparator, $ as TreeDiagram, c as TreeView, l as TreeViewItem, s as VirtualList, y as getNextSortDirection, b as useTableSort };