@t3q-ui/design-system 1.66.3 → 1.67.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release: v1.67.1 -->
4
+ ## 1.67.1 (2026-11-23)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **chat:** :bug: 답변이 흘러나오는 중에 위로 올려도 다시 맨 아래로 끌려가던 것 (526332f)
10
+
11
+ <!-- release: v1.67.0 -->
12
+ # 1.67.0 (2026-11-23)
13
+
14
+
15
+ ### Features
16
+
17
+ * **FileTree:** :sparkles: 파일 트리 FileTree 추가 — rc-tree 기반, 지연 로드·가상 스크롤·드래그·비활성, 소개 사이트 타일 (328a63b)
18
+
3
19
  <!-- release: v1.66.3 -->
4
20
  ## 1.66.3 (2026-11-23)
5
21
 
package/LICENSE.md CHANGED
@@ -26,7 +26,8 @@ Copyright (c) 2025-present 티쓰리큐 주식회사 (T3Q Inc.)
26
26
 
27
27
  5. 제3자 구성요소
28
28
  본 소프트웨어가 의존하는 제3자 구성요소는 각자의 라이선스를 따릅니다. Pretendard 글꼴은 SIL Open Font
29
- License 1.1, lucide 아이콘은 ISC 라이선스입니다. 이 라이선스는 그 조건을 바꾸지 않습니다.
29
+ License 1.1, lucide 아이콘은 ISC 라이선스, FileTree 기본 파일·폴더 아이콘의 Material Symbols는 Apache
30
+ License 2.0입니다. 이 라이선스는 그 조건을 바꾸지 않습니다.
30
31
 
31
32
  6. 보증의 부인과 책임의 제한
32
33
  본 소프트웨어는 "있는 그대로" 제공되며, 상품성, 특정 목적 적합성, 권리 비침해를 포함한 어떠한 명시적·묵시적
@@ -71,7 +72,8 @@ You must include the above copyright notice and this license in all copies or di
71
72
 
72
73
  5. Third-Party Components
73
74
  Third-party components the Software depends on remain under their own licenses, including the Pretendard font
74
- (SIL Open Font License 1.1) and lucide icons (ISC License). This license does not change those terms.
75
+ (SIL Open Font License 1.1), lucide icons (ISC License) and the Material Symbols icons used as the FileTree default
76
+ file and folder icons (Apache License 2.0). This license does not change those terms.
75
77
 
76
78
  6. Disclaimer and Limitation of Liability
77
79
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY,
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ "use strict";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const jsxRuntime = require("react/jsx-runtime");
5
+ const React = require("react");
6
+ const lucide = require("lucide-react");
7
+ const TreeImport = require("rc-tree");
8
+ const index = require("../spinner/index.cjs");
9
+ ;/* empty css */
10
+ const Tree = TreeImport.default ?? TreeImport;
11
+ const PREFIX_CLS = "t3q-file-tree";
12
+ const FILE_PATH = "M6 22q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 20V4q0-.824.588-1.412A1.93 1.93 0 0 1 6 2h7.175a1.98 1.98 0 0 1 1.4.575l4.85 4.85q.275.275.425.638.15.361.15.762V20q0 .824-.587 1.413A1.93 1.93 0 0 1 18 22zm7-14q0 .424.287.713Q13.576 9 14 9h4l-5-5z";
13
+ const FOLDER_PATH = "M4 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 2 18V6q0-.824.587-1.412A1.93 1.93 0 0 1 4 4h5.175a1.98 1.98 0 0 1 1.4.575L12 6h8q.824 0 1.413.588Q22 7.175 22 8v10q0 .824-.587 1.413A1.93 1.93 0 0 1 20 20z";
14
+ function NodeIcon({ d, className }) {
15
+ return /* @__PURE__ */ jsxRuntime.jsx(
16
+ "svg",
17
+ {
18
+ width: 24,
19
+ height: 24,
20
+ viewBox: "0 0 24 24",
21
+ "aria-hidden": "true",
22
+ focusable: "false",
23
+ className,
24
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d, fill: "currentColor" })
25
+ }
26
+ );
27
+ }
28
+ function renderSwitcher(node) {
29
+ if (node.isLeaf) return null;
30
+ return node.expanded ? /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronDown, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronRight, { size: 16 });
31
+ }
32
+ function renderDropIndicator({ dropPosition, dropLevelOffset, indent }) {
33
+ const style = {};
34
+ switch (dropPosition) {
35
+ case -1:
36
+ style.top = 0;
37
+ style.left = -dropLevelOffset * indent;
38
+ break;
39
+ case 1:
40
+ style.bottom = 0;
41
+ style.left = -dropLevelOffset * indent;
42
+ break;
43
+ case 0:
44
+ style.bottom = 0;
45
+ style.left = indent;
46
+ break;
47
+ }
48
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${PREFIX_CLS}-drop-indicator`, style });
49
+ }
50
+ function markDisabledLeaves(nodes, childrenKey, treeDisabled, hasLoadData) {
51
+ let changed = false;
52
+ const next = nodes.map((node) => {
53
+ const children = node[childrenKey];
54
+ const nextChildren = children && markDisabledLeaves(children, childrenKey, treeDisabled, hasLoadData);
55
+ const isLeaf = node.isLeaf !== false && !children?.length && (node.isLeaf === true || !hasLoadData);
56
+ const mark = isLeaf && (treeDisabled || node.disabled);
57
+ if (nextChildren === children && !mark) return node;
58
+ changed = true;
59
+ return {
60
+ ...node,
61
+ ...nextChildren !== children && { [childrenKey]: nextChildren },
62
+ ...mark && { "aria-disabled": true }
63
+ };
64
+ });
65
+ return changed ? next : nodes;
66
+ }
67
+ function FileTree({
68
+ icon,
69
+ treeData,
70
+ ...rest
71
+ }) {
72
+ const childrenKey = rest.fieldNames?.children ?? "children";
73
+ const treeDisabled = !!rest.disabled;
74
+ const hasLoadData = !!rest.loadData;
75
+ const markedData = React.useMemo(
76
+ () => treeData && markDisabledLeaves(treeData, childrenKey, treeDisabled, hasLoadData),
77
+ [treeData, childrenKey, treeDisabled, hasLoadData]
78
+ );
79
+ const renderIcon = (node) => {
80
+ if (node.loading) return /* @__PURE__ */ jsxRuntime.jsx(index.Spinner, { size: "small" });
81
+ const custom = typeof icon === "function" ? icon(node) : icon;
82
+ return custom ?? (node.isLeaf ? /* @__PURE__ */ jsxRuntime.jsx(NodeIcon, { d: FILE_PATH, className: `${PREFIX_CLS}-icon-file` }) : /* @__PURE__ */ jsxRuntime.jsx(NodeIcon, { d: FOLDER_PATH, className: `${PREFIX_CLS}-icon-folder` }));
83
+ };
84
+ return /* @__PURE__ */ jsxRuntime.jsx(
85
+ Tree,
86
+ {
87
+ ...rest,
88
+ treeData: markedData,
89
+ prefixCls: PREFIX_CLS,
90
+ showLine: false,
91
+ itemHeight: 28,
92
+ icon: renderIcon,
93
+ switcherIcon: renderSwitcher,
94
+ dropIndicatorRender: renderDropIndicator
95
+ }
96
+ );
97
+ }
98
+ exports.FileTree = FileTree;
99
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/fileTree/index.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useMemo } from 'react'\nimport { ChevronDown, ChevronRight } from 'lucide-react'\nimport TreeImport, { type BasicDataNode, type TreeNodeProps, type TreeProps } from 'rc-tree'\nimport type { DataNode, EventDataNode } from 'rc-tree/lib/interface'\n\nimport { Spinner } from '../spinner'\n\nimport './fileTree.css'\n\n// rc-tree 는 CJS(`exports.default = Tree`, package.json 에 exports·type 없음). 이 DS 는 ESM 으로 배포되므로\n// 소비처가 패키지를 트랜스파일하지 않으면 default 로 module.exports 전체(객체)가 넘어와 <Tree/> 가 크래시한다.\n// Spinner 와 같이 런타임에 .default 를 풀어 둔다.\nconst Tree = ((TreeImport as any).default ?? TreeImport) as typeof TreeImport\n\nconst PREFIX_CLS = 't3q-file-tree'\n\n/**\n * 트리 노드 데이터. `key`(필수)·`title`·`children`·`isLeaf`·`disabled` 등.\n *\n * `disabled: true` 는 선택·드래그를 막는다. 폴더는 계속 펼칠 수 있고, 펼칠 것이 없는 노드는 FileTree 가 `aria-disabled` 를 붙인다.\n * 비활성 노드에는 우클릭 메뉴를 열지 않는다 — rc-tree 는 우클릭을 막지 않는다.\n */\nexport type FileTreeNode = DataNode\n\n/** 이벤트 핸들러(`onSelect`·`onExpand`·`loadData` 등)가 받는 노드. 노드 데이터에 `expanded`·`selected`·`loaded` 같은 상태가 붙는다 */\nexport type FileTreeEventNode<T extends BasicDataNode = DataNode> = EventDataNode<T>\n\ntype DropIndicatorProps = Parameters<NonNullable<TreeProps['dropIndicatorRender']>>[0]\n\n/** FileTree 가 외형을 정해 두어 받지 않는 rc-tree props — 접두사·연결선·행 높이·펼침 아이콘·체크박스·드롭 표시선 */\ntype FixedTreeProps =\n | 'prefixCls'\n | 'showLine'\n | 'itemHeight'\n | 'switcherIcon'\n | 'checkable'\n | 'dropIndicatorRender'\n\nexport interface FileTreeProps<T extends BasicDataNode = DataNode> extends Omit<\n TreeProps<T>,\n FixedTreeProps\n> {\n /** 트리 데이터. 노드마다 `key`·`title`·`children` 을 두고, 폴더를 펼칠 때 불러오는 노드는 `isLeaf: false`, 파일은 `isLeaf: true`. 비활성 잎이 있으면 그 노드와 상위 노드는 복사본이 콜백으로 온다 — 노드는 `key` 로 비교한다 */\n treeData?: TreeProps<T>['treeData']\n /** 아이콘 칸에 그릴 내용(노드 또는 노드를 받는 함수). 없으면 폴더·파일 기본 아이콘이고, 불러오는 중에는 이 값과 상관없이 Spinner. 노드 데이터의 `icon` 은 이 값과 불러오는 중 표시를 덮는다 */\n icon?: TreeProps<T>['icon']\n /** 폴더를 펼칠 때 하위 노드를 불러오는 함수. 반환한 Promise 가 끝나면 펼쳐진다 — 그동안 아이콘 칸에 Spinner */\n loadData?: TreeProps<T>['loadData']\n /** 목록 높이(px). 주면 보이는 만큼만 그리는 가상 스크롤이 켜진다. 노드가 많을 때 준다 */\n height?: TreeProps<T>['height']\n /** 노드를 눌러 선택이 바뀔 때 호출된다 */\n onSelect?: TreeProps<T>['onSelect']\n /** 노드를 우클릭할 때 호출된다. 메뉴는 앱이 DropdownMenu 등으로 그린다 */\n onRightClick?: TreeProps<T>['onRightClick']\n /** 노드 제목을 직접 그린다. 노드 데이터를 받아 제목 자리에 들어갈 내용을 돌려준다 */\n titleRender?: TreeProps<T>['titleRender']\n}\n\n// Material Symbols Rounded draft·folder(채움, Apache-2.0) — dl-ui-v3 파일 트리가 @tpl/icons 3.6.0 note·folder 로 그리는 것과 같은 path.\n// 원본의 전체 덮개 mask·고정 id 는 그림에 영향이 없어 뺐다.\nconst FILE_PATH =\n 'M6 22q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 20V4q0-.824.588-1.412A1.93 1.93 0 0 1 6 2h7.175a1.98 1.98 0 0 1 1.4.575l4.85 4.85q.275.275.425.638.15.361.15.762V20q0 .824-.587 1.413A1.93 1.93 0 0 1 18 22zm7-14q0 .424.287.713Q13.576 9 14 9h4l-5-5z'\nconst FOLDER_PATH =\n 'M4 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 2 18V6q0-.824.587-1.412A1.93 1.93 0 0 1 4 4h5.175a1.98 1.98 0 0 1 1.4.575L12 6h8q.824 0 1.413.588Q22 7.175 22 8v10q0 .824-.587 1.413A1.93 1.93 0 0 1 20 20z'\n\nfunction NodeIcon({ d, className }: { d: string; className: string }) {\n return (\n <svg\n width={24}\n height={24}\n viewBox='0 0 24 24'\n aria-hidden='true'\n focusable='false'\n className={className}\n >\n <path d={d} fill='currentColor' />\n </svg>\n )\n}\n\nfunction renderSwitcher(node: TreeNodeProps): ReactNode {\n if (node.isLeaf) return null\n return node.expanded ? <ChevronDown size={16} /> : <ChevronRight size={16} />\n}\n\n// rc-tree 기본 표시선과 같은 위치 계산(dropPosition -1 위 · 0 안 · 1 아래). 색·두께는 CSS.\nfunction renderDropIndicator({ dropPosition, dropLevelOffset, indent }: DropIndicatorProps) {\n const style: CSSProperties = {}\n switch (dropPosition) {\n case -1:\n style.top = 0\n style.left = -dropLevelOffset * indent\n break\n case 1:\n style.bottom = 0\n style.left = -dropLevelOffset * indent\n break\n case 0:\n style.bottom = 0\n style.left = indent\n break\n }\n return <div className={`${PREFIX_CLS}-drop-indicator`} style={style} />\n}\n\n// rc-tree 는 비활성 노드를 클래스로만 흐리게 그리고 treeitem 에 `aria-disabled` 를 붙이지 않는다. 접근성 검사는\n// `aria-disabled` 가 있어야 비활성 글자를 대비 검사에서 뺀다. 그런데 rc-tree 의 비활성 폴더는 펼침 화살표·←/→·\n// `expandAction` 으로 여전히 펼쳐지므로 \"조작 불가\"가 사실인 노드, 곧 펼칠 것이 없는 비활성 잎에만 붙인다\n// (폴더는 속성 없이 CSS 의 대비 색으로 그린다). 잎 판정은 rc-tree 의 펼침 경로(화살표 TreeNode.js·키보드 Tree.js)가\n// 모두 못 펴는 조건과 같다. 바뀐 것이 없는 배열·노드는 받은 것 그대로 돌려줘 넘긴 객체를 변이하지 않는다.\nfunction markDisabledLeaves<N extends BasicDataNode>(\n nodes: N[],\n childrenKey: string,\n treeDisabled: boolean,\n hasLoadData: boolean,\n): N[] {\n let changed = false\n const next = nodes.map((node) => {\n const children = (node as Record<string, unknown>)[childrenKey] as N[] | undefined\n const nextChildren =\n children && markDisabledLeaves(children, childrenKey, treeDisabled, hasLoadData)\n const isLeaf =\n node.isLeaf !== false && !children?.length && (node.isLeaf === true || !hasLoadData)\n const mark = isLeaf && (treeDisabled || node.disabled)\n if (nextChildren === children && !mark) return node\n changed = true\n return {\n ...node,\n ...(nextChildren !== children && { [childrenKey]: nextChildren }),\n ...(mark && { 'aria-disabled': true }),\n }\n })\n return (changed ? next : nodes) as N[]\n}\n\n/**\n * 파일·폴더 계층을 펼치고 접으며 고르는 트리.\n *\n * 언제 쓰나: 파일·폴더 계층 탐색, 폴더를 펼칠 때 하위 항목을 그때그때 불러오는 목록(`loadData`), 노드가 많은 목록(`height` 를 주면 가상 스크롤).\n * 언제 안 쓰나: 평면 목록(→ Table·AgGridTable), 화면 이동 메뉴(→ Sidebar).\n * 대신/함께: 우클릭 메뉴는 `onRightClick` 과 DropdownMenu 를 앱이 이어 붙인다. \"더 보기\" 같은 앱 고유 노드·실행 모듈 표시는 `treeData`·`icon`·`titleRender` 로, 검색어 강조는 `filterTreeNode` 로 그린다.\n */\nexport function FileTree<T extends BasicDataNode = DataNode>({\n icon,\n treeData,\n ...rest\n}: FileTreeProps<T>) {\n const childrenKey = rest.fieldNames?.children ?? 'children'\n const treeDisabled = !!rest.disabled\n const hasLoadData = !!rest.loadData\n const markedData = useMemo(\n () => treeData && markDisabledLeaves(treeData, childrenKey, treeDisabled, hasLoadData),\n [treeData, childrenKey, treeDisabled, hasLoadData],\n )\n\n const renderIcon = (node: TreeNodeProps): ReactNode => {\n if (node.loading) return <Spinner size='small' />\n const custom = typeof icon === 'function' ? icon(node) : icon\n return (\n custom ??\n (node.isLeaf ? (\n <NodeIcon d={FILE_PATH} className={`${PREFIX_CLS}-icon-file`} />\n ) : (\n <NodeIcon d={FOLDER_PATH} className={`${PREFIX_CLS}-icon-folder`} />\n ))\n )\n }\n\n return (\n <Tree<T>\n {...rest}\n treeData={markedData}\n prefixCls={PREFIX_CLS}\n showLine={false}\n itemHeight={28}\n icon={renderIcon}\n switcherIcon={renderSwitcher}\n dropIndicatorRender={renderDropIndicator}\n />\n )\n}\n"],"names":["jsx","ChevronDown","ChevronRight","useMemo","Spinner"],"mappings":"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"}
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useMemo } from "react";
4
+ import { ChevronDown, ChevronRight } from "lucide-react";
5
+ import TreeImport from "rc-tree";
6
+ import { Spinner } from "../spinner/index.js";
7
+ /* empty css */
8
+ const Tree = TreeImport.default ?? TreeImport;
9
+ const PREFIX_CLS = "t3q-file-tree";
10
+ const FILE_PATH = "M6 22q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 20V4q0-.824.588-1.412A1.93 1.93 0 0 1 6 2h7.175a1.98 1.98 0 0 1 1.4.575l4.85 4.85q.275.275.425.638.15.361.15.762V20q0 .824-.587 1.413A1.93 1.93 0 0 1 18 22zm7-14q0 .424.287.713Q13.576 9 14 9h4l-5-5z";
11
+ const FOLDER_PATH = "M4 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 2 18V6q0-.824.587-1.412A1.93 1.93 0 0 1 4 4h5.175a1.98 1.98 0 0 1 1.4.575L12 6h8q.824 0 1.413.588Q22 7.175 22 8v10q0 .824-.587 1.413A1.93 1.93 0 0 1 20 20z";
12
+ function NodeIcon({ d, className }) {
13
+ return /* @__PURE__ */ jsx(
14
+ "svg",
15
+ {
16
+ width: 24,
17
+ height: 24,
18
+ viewBox: "0 0 24 24",
19
+ "aria-hidden": "true",
20
+ focusable: "false",
21
+ className,
22
+ children: /* @__PURE__ */ jsx("path", { d, fill: "currentColor" })
23
+ }
24
+ );
25
+ }
26
+ function renderSwitcher(node) {
27
+ if (node.isLeaf) return null;
28
+ return node.expanded ? /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 16 });
29
+ }
30
+ function renderDropIndicator({ dropPosition, dropLevelOffset, indent }) {
31
+ const style = {};
32
+ switch (dropPosition) {
33
+ case -1:
34
+ style.top = 0;
35
+ style.left = -dropLevelOffset * indent;
36
+ break;
37
+ case 1:
38
+ style.bottom = 0;
39
+ style.left = -dropLevelOffset * indent;
40
+ break;
41
+ case 0:
42
+ style.bottom = 0;
43
+ style.left = indent;
44
+ break;
45
+ }
46
+ return /* @__PURE__ */ jsx("div", { className: `${PREFIX_CLS}-drop-indicator`, style });
47
+ }
48
+ function markDisabledLeaves(nodes, childrenKey, treeDisabled, hasLoadData) {
49
+ let changed = false;
50
+ const next = nodes.map((node) => {
51
+ const children = node[childrenKey];
52
+ const nextChildren = children && markDisabledLeaves(children, childrenKey, treeDisabled, hasLoadData);
53
+ const isLeaf = node.isLeaf !== false && !children?.length && (node.isLeaf === true || !hasLoadData);
54
+ const mark = isLeaf && (treeDisabled || node.disabled);
55
+ if (nextChildren === children && !mark) return node;
56
+ changed = true;
57
+ return {
58
+ ...node,
59
+ ...nextChildren !== children && { [childrenKey]: nextChildren },
60
+ ...mark && { "aria-disabled": true }
61
+ };
62
+ });
63
+ return changed ? next : nodes;
64
+ }
65
+ function FileTree({
66
+ icon,
67
+ treeData,
68
+ ...rest
69
+ }) {
70
+ const childrenKey = rest.fieldNames?.children ?? "children";
71
+ const treeDisabled = !!rest.disabled;
72
+ const hasLoadData = !!rest.loadData;
73
+ const markedData = useMemo(
74
+ () => treeData && markDisabledLeaves(treeData, childrenKey, treeDisabled, hasLoadData),
75
+ [treeData, childrenKey, treeDisabled, hasLoadData]
76
+ );
77
+ const renderIcon = (node) => {
78
+ if (node.loading) return /* @__PURE__ */ jsx(Spinner, { size: "small" });
79
+ const custom = typeof icon === "function" ? icon(node) : icon;
80
+ return custom ?? (node.isLeaf ? /* @__PURE__ */ jsx(NodeIcon, { d: FILE_PATH, className: `${PREFIX_CLS}-icon-file` }) : /* @__PURE__ */ jsx(NodeIcon, { d: FOLDER_PATH, className: `${PREFIX_CLS}-icon-folder` }));
81
+ };
82
+ return /* @__PURE__ */ jsx(
83
+ Tree,
84
+ {
85
+ ...rest,
86
+ treeData: markedData,
87
+ prefixCls: PREFIX_CLS,
88
+ showLine: false,
89
+ itemHeight: 28,
90
+ icon: renderIcon,
91
+ switcherIcon: renderSwitcher,
92
+ dropIndicatorRender: renderDropIndicator
93
+ }
94
+ );
95
+ }
96
+ export {
97
+ FileTree
98
+ };
99
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/fileTree/index.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useMemo } from 'react'\nimport { ChevronDown, ChevronRight } from 'lucide-react'\nimport TreeImport, { type BasicDataNode, type TreeNodeProps, type TreeProps } from 'rc-tree'\nimport type { DataNode, EventDataNode } from 'rc-tree/lib/interface'\n\nimport { Spinner } from '../spinner'\n\nimport './fileTree.css'\n\n// rc-tree 는 CJS(`exports.default = Tree`, package.json 에 exports·type 없음). 이 DS 는 ESM 으로 배포되므로\n// 소비처가 패키지를 트랜스파일하지 않으면 default 로 module.exports 전체(객체)가 넘어와 <Tree/> 가 크래시한다.\n// Spinner 와 같이 런타임에 .default 를 풀어 둔다.\nconst Tree = ((TreeImport as any).default ?? TreeImport) as typeof TreeImport\n\nconst PREFIX_CLS = 't3q-file-tree'\n\n/**\n * 트리 노드 데이터. `key`(필수)·`title`·`children`·`isLeaf`·`disabled` 등.\n *\n * `disabled: true` 는 선택·드래그를 막는다. 폴더는 계속 펼칠 수 있고, 펼칠 것이 없는 노드는 FileTree 가 `aria-disabled` 를 붙인다.\n * 비활성 노드에는 우클릭 메뉴를 열지 않는다 — rc-tree 는 우클릭을 막지 않는다.\n */\nexport type FileTreeNode = DataNode\n\n/** 이벤트 핸들러(`onSelect`·`onExpand`·`loadData` 등)가 받는 노드. 노드 데이터에 `expanded`·`selected`·`loaded` 같은 상태가 붙는다 */\nexport type FileTreeEventNode<T extends BasicDataNode = DataNode> = EventDataNode<T>\n\ntype DropIndicatorProps = Parameters<NonNullable<TreeProps['dropIndicatorRender']>>[0]\n\n/** FileTree 가 외형을 정해 두어 받지 않는 rc-tree props — 접두사·연결선·행 높이·펼침 아이콘·체크박스·드롭 표시선 */\ntype FixedTreeProps =\n | 'prefixCls'\n | 'showLine'\n | 'itemHeight'\n | 'switcherIcon'\n | 'checkable'\n | 'dropIndicatorRender'\n\nexport interface FileTreeProps<T extends BasicDataNode = DataNode> extends Omit<\n TreeProps<T>,\n FixedTreeProps\n> {\n /** 트리 데이터. 노드마다 `key`·`title`·`children` 을 두고, 폴더를 펼칠 때 불러오는 노드는 `isLeaf: false`, 파일은 `isLeaf: true`. 비활성 잎이 있으면 그 노드와 상위 노드는 복사본이 콜백으로 온다 — 노드는 `key` 로 비교한다 */\n treeData?: TreeProps<T>['treeData']\n /** 아이콘 칸에 그릴 내용(노드 또는 노드를 받는 함수). 없으면 폴더·파일 기본 아이콘이고, 불러오는 중에는 이 값과 상관없이 Spinner. 노드 데이터의 `icon` 은 이 값과 불러오는 중 표시를 덮는다 */\n icon?: TreeProps<T>['icon']\n /** 폴더를 펼칠 때 하위 노드를 불러오는 함수. 반환한 Promise 가 끝나면 펼쳐진다 — 그동안 아이콘 칸에 Spinner */\n loadData?: TreeProps<T>['loadData']\n /** 목록 높이(px). 주면 보이는 만큼만 그리는 가상 스크롤이 켜진다. 노드가 많을 때 준다 */\n height?: TreeProps<T>['height']\n /** 노드를 눌러 선택이 바뀔 때 호출된다 */\n onSelect?: TreeProps<T>['onSelect']\n /** 노드를 우클릭할 때 호출된다. 메뉴는 앱이 DropdownMenu 등으로 그린다 */\n onRightClick?: TreeProps<T>['onRightClick']\n /** 노드 제목을 직접 그린다. 노드 데이터를 받아 제목 자리에 들어갈 내용을 돌려준다 */\n titleRender?: TreeProps<T>['titleRender']\n}\n\n// Material Symbols Rounded draft·folder(채움, Apache-2.0) — dl-ui-v3 파일 트리가 @tpl/icons 3.6.0 note·folder 로 그리는 것과 같은 path.\n// 원본의 전체 덮개 mask·고정 id 는 그림에 영향이 없어 뺐다.\nconst FILE_PATH =\n 'M6 22q-.824 0-1.412-.587A1.93 1.93 0 0 1 4 20V4q0-.824.588-1.412A1.93 1.93 0 0 1 6 2h7.175a1.98 1.98 0 0 1 1.4.575l4.85 4.85q.275.275.425.638.15.361.15.762V20q0 .824-.587 1.413A1.93 1.93 0 0 1 18 22zm7-14q0 .424.287.713Q13.576 9 14 9h4l-5-5z'\nconst FOLDER_PATH =\n 'M4 20q-.824 0-1.412-.587A1.93 1.93 0 0 1 2 18V6q0-.824.587-1.412A1.93 1.93 0 0 1 4 4h5.175a1.98 1.98 0 0 1 1.4.575L12 6h8q.824 0 1.413.588Q22 7.175 22 8v10q0 .824-.587 1.413A1.93 1.93 0 0 1 20 20z'\n\nfunction NodeIcon({ d, className }: { d: string; className: string }) {\n return (\n <svg\n width={24}\n height={24}\n viewBox='0 0 24 24'\n aria-hidden='true'\n focusable='false'\n className={className}\n >\n <path d={d} fill='currentColor' />\n </svg>\n )\n}\n\nfunction renderSwitcher(node: TreeNodeProps): ReactNode {\n if (node.isLeaf) return null\n return node.expanded ? <ChevronDown size={16} /> : <ChevronRight size={16} />\n}\n\n// rc-tree 기본 표시선과 같은 위치 계산(dropPosition -1 위 · 0 안 · 1 아래). 색·두께는 CSS.\nfunction renderDropIndicator({ dropPosition, dropLevelOffset, indent }: DropIndicatorProps) {\n const style: CSSProperties = {}\n switch (dropPosition) {\n case -1:\n style.top = 0\n style.left = -dropLevelOffset * indent\n break\n case 1:\n style.bottom = 0\n style.left = -dropLevelOffset * indent\n break\n case 0:\n style.bottom = 0\n style.left = indent\n break\n }\n return <div className={`${PREFIX_CLS}-drop-indicator`} style={style} />\n}\n\n// rc-tree 는 비활성 노드를 클래스로만 흐리게 그리고 treeitem 에 `aria-disabled` 를 붙이지 않는다. 접근성 검사는\n// `aria-disabled` 가 있어야 비활성 글자를 대비 검사에서 뺀다. 그런데 rc-tree 의 비활성 폴더는 펼침 화살표·←/→·\n// `expandAction` 으로 여전히 펼쳐지므로 \"조작 불가\"가 사실인 노드, 곧 펼칠 것이 없는 비활성 잎에만 붙인다\n// (폴더는 속성 없이 CSS 의 대비 색으로 그린다). 잎 판정은 rc-tree 의 펼침 경로(화살표 TreeNode.js·키보드 Tree.js)가\n// 모두 못 펴는 조건과 같다. 바뀐 것이 없는 배열·노드는 받은 것 그대로 돌려줘 넘긴 객체를 변이하지 않는다.\nfunction markDisabledLeaves<N extends BasicDataNode>(\n nodes: N[],\n childrenKey: string,\n treeDisabled: boolean,\n hasLoadData: boolean,\n): N[] {\n let changed = false\n const next = nodes.map((node) => {\n const children = (node as Record<string, unknown>)[childrenKey] as N[] | undefined\n const nextChildren =\n children && markDisabledLeaves(children, childrenKey, treeDisabled, hasLoadData)\n const isLeaf =\n node.isLeaf !== false && !children?.length && (node.isLeaf === true || !hasLoadData)\n const mark = isLeaf && (treeDisabled || node.disabled)\n if (nextChildren === children && !mark) return node\n changed = true\n return {\n ...node,\n ...(nextChildren !== children && { [childrenKey]: nextChildren }),\n ...(mark && { 'aria-disabled': true }),\n }\n })\n return (changed ? next : nodes) as N[]\n}\n\n/**\n * 파일·폴더 계층을 펼치고 접으며 고르는 트리.\n *\n * 언제 쓰나: 파일·폴더 계층 탐색, 폴더를 펼칠 때 하위 항목을 그때그때 불러오는 목록(`loadData`), 노드가 많은 목록(`height` 를 주면 가상 스크롤).\n * 언제 안 쓰나: 평면 목록(→ Table·AgGridTable), 화면 이동 메뉴(→ Sidebar).\n * 대신/함께: 우클릭 메뉴는 `onRightClick` 과 DropdownMenu 를 앱이 이어 붙인다. \"더 보기\" 같은 앱 고유 노드·실행 모듈 표시는 `treeData`·`icon`·`titleRender` 로, 검색어 강조는 `filterTreeNode` 로 그린다.\n */\nexport function FileTree<T extends BasicDataNode = DataNode>({\n icon,\n treeData,\n ...rest\n}: FileTreeProps<T>) {\n const childrenKey = rest.fieldNames?.children ?? 'children'\n const treeDisabled = !!rest.disabled\n const hasLoadData = !!rest.loadData\n const markedData = useMemo(\n () => treeData && markDisabledLeaves(treeData, childrenKey, treeDisabled, hasLoadData),\n [treeData, childrenKey, treeDisabled, hasLoadData],\n )\n\n const renderIcon = (node: TreeNodeProps): ReactNode => {\n if (node.loading) return <Spinner size='small' />\n const custom = typeof icon === 'function' ? icon(node) : icon\n return (\n custom ??\n (node.isLeaf ? (\n <NodeIcon d={FILE_PATH} className={`${PREFIX_CLS}-icon-file`} />\n ) : (\n <NodeIcon d={FOLDER_PATH} className={`${PREFIX_CLS}-icon-folder`} />\n ))\n )\n }\n\n return (\n <Tree<T>\n {...rest}\n treeData={markedData}\n prefixCls={PREFIX_CLS}\n showLine={false}\n itemHeight={28}\n icon={renderIcon}\n switcherIcon={renderSwitcher}\n dropIndicatorRender={renderDropIndicator}\n />\n )\n}\n"],"names":[],"mappings":";;;;;;;AAYA,MAAM,OAAS,WAAmB,WAAW;AAE7C,MAAM,aAAa;AA8CnB,MAAM,YACJ;AACF,MAAM,cACJ;AAEF,SAAS,SAAS,EAAE,GAAG,aAA+C;AACpE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,eAAY;AAAA,MACZ,WAAU;AAAA,MACV;AAAA,MAEA,UAAA,oBAAC,QAAA,EAAK,GAAM,MAAK,eAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAGtC;AAEA,SAAS,eAAe,MAAgC;AACtD,MAAI,KAAK,OAAQ,QAAO;AACxB,SAAO,KAAK,WAAW,oBAAC,aAAA,EAAY,MAAM,IAAI,IAAK,oBAAC,cAAA,EAAa,MAAM,GAAA,CAAI;AAC7E;AAGA,SAAS,oBAAoB,EAAE,cAAc,iBAAiB,UAA8B;AAC1F,QAAM,QAAuB,CAAA;AAC7B,UAAQ,cAAA;AAAA,IACN,KAAK;AACH,YAAM,MAAM;AACZ,YAAM,OAAO,CAAC,kBAAkB;AAChC;AAAA,IACF,KAAK;AACH,YAAM,SAAS;AACf,YAAM,OAAO,CAAC,kBAAkB;AAChC;AAAA,IACF,KAAK;AACH,YAAM,SAAS;AACf,YAAM,OAAO;AACb;AAAA,EAAA;AAEJ,6BAAQ,OAAA,EAAI,WAAW,GAAG,UAAU,mBAAmB,OAAc;AACvE;AAOA,SAAS,mBACP,OACA,aACA,cACA,aACK;AACL,MAAI,UAAU;AACd,QAAM,OAAO,MAAM,IAAI,CAAC,SAAS;AAC/B,UAAM,WAAY,KAAiC,WAAW;AAC9D,UAAM,eACJ,YAAY,mBAAmB,UAAU,aAAa,cAAc,WAAW;AACjF,UAAM,SACJ,KAAK,WAAW,SAAS,CAAC,UAAU,WAAW,KAAK,WAAW,QAAQ,CAAC;AAC1E,UAAM,OAAO,WAAW,gBAAgB,KAAK;AAC7C,QAAI,iBAAiB,YAAY,CAAC,KAAM,QAAO;AAC/C,cAAU;AACV,WAAO;AAAA,MACL,GAAG;AAAA,MACH,GAAI,iBAAiB,YAAY,EAAE,CAAC,WAAW,GAAG,aAAA;AAAA,MAClD,GAAI,QAAQ,EAAE,iBAAiB,KAAA;AAAA,IAAK;AAAA,EAExC,CAAC;AACD,SAAQ,UAAU,OAAO;AAC3B;AASO,SAAS,SAA6C;AAAA,EAC3D;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,QAAM,cAAc,KAAK,YAAY,YAAY;AACjD,QAAM,eAAe,CAAC,CAAC,KAAK;AAC5B,QAAM,cAAc,CAAC,CAAC,KAAK;AAC3B,QAAM,aAAa;AAAA,IACjB,MAAM,YAAY,mBAAmB,UAAU,aAAa,cAAc,WAAW;AAAA,IACrF,CAAC,UAAU,aAAa,cAAc,WAAW;AAAA,EAAA;AAGnD,QAAM,aAAa,CAAC,SAAmC;AACrD,QAAI,KAAK,QAAS,QAAO,oBAAC,SAAA,EAAQ,MAAK,SAAQ;AAC/C,UAAM,SAAS,OAAO,SAAS,aAAa,KAAK,IAAI,IAAI;AACzD,WACE,WACC,KAAK,6BACH,UAAA,EAAS,GAAG,WAAW,WAAW,GAAG,UAAU,aAAA,CAAc,wBAE7D,UAAA,EAAS,GAAG,aAAa,WAAW,GAAG,UAAU,eAAA,CAAgB;AAAA,EAGxE;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,MACV,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,cAAc;AAAA,MACd,qBAAqB;AAAA,IAAA;AAAA,EAAA;AAG3B;"}
@@ -1,3 +1,152 @@
1
+ /* FileTree — rc-tree 를 접두사 `t3q-file-tree` 로 그린다.
2
+ rc-tree 기본 CSS(rc-tree/assets/index.css)는 쓰지 않는다. 기본 CSS 가 하던 일 중 필요한 것
3
+ (내용 칸 위치 기준·검색어 강조·말줄임)만 아래에서 대신하고, 색은 전부 DS 토큰이다.
4
+ 행 높이 28 = 위아래 padding 2 + 내용 칸 24 (index.tsx 의 itemHeight 와 같은 값). */
5
+
6
+ /* ==================== 행 ==================== */
7
+
8
+ .t3q-file-tree-treenode {
9
+ display: flex;
10
+ align-items: center;
11
+ gap: 2px;
12
+ margin: 0;
13
+ padding: 2px 0;
14
+ white-space: nowrap;
15
+ }
16
+
17
+ /* 들여쓰기 — 단계마다 12px. rc-tree 가 이 폭을 재서 드롭 표시선 위치에 쓴다 */
18
+ .t3q-file-tree-indent {
19
+ display: inline-block;
20
+ height: 0;
21
+ }
22
+
23
+ .t3q-file-tree-indent-unit {
24
+ display: inline-block;
25
+ width: 12px;
26
+ }
27
+
28
+ /* 펼침 칸(16×16). 잎은 안이 비어 있어 칸만 차지한다 */
29
+ .t3q-file-tree-switcher {
30
+ display: inline-flex;
31
+ flex-shrink: 0;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 16px;
35
+ height: 16px;
36
+ cursor: pointer;
37
+ }
38
+
39
+ .t3q-file-tree-switcher-noop {
40
+ cursor: auto;
41
+ }
42
+
43
+ /* 내용 칸(아이콘 + 제목). position: relative 는 드롭 표시선(내용 칸 안에 그려짐)의 위치 기준 —
44
+ 없으면 표시선이 대상 행이 아니라 목록 가장자리에 찍힌다 */
45
+ .t3q-file-tree-node-content-wrapper {
46
+ position: relative;
47
+ display: inline-flex;
48
+ flex: 1;
49
+ align-items: center;
50
+ gap: 4px;
51
+ min-width: 0;
52
+ cursor: pointer;
53
+ }
54
+
55
+ /* 아이콘 칸 24×24 */
56
+ .t3q-file-tree-iconEle {
57
+ display: inline-flex;
58
+ flex-shrink: 0;
59
+ align-items: center;
60
+ justify-content: center;
61
+ width: 24px;
62
+ height: 24px;
63
+ }
64
+
65
+ .t3q-file-tree-icon-folder {
66
+ color: var(--color-primary20);
67
+ }
68
+
69
+ .t3q-file-tree-icon-file {
70
+ color: var(--color-secondary50);
71
+ }
72
+
73
+ .t3q-file-tree-title {
74
+ flex: 1;
75
+ min-width: 0;
76
+ overflow: hidden;
77
+ font-size: var(--text-base-regular);
78
+ line-height: var(--text-base-regular--line-height);
79
+ color: var(--color-sys-text-main);
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ /* ==================== 상태 ==================== */
85
+ /* 같은 특이도라 아래 규칙이 위 규칙을 이긴다(hover < 누름 < 선택 < 끌리는 중 < 놓을 곳) */
86
+
87
+ .t3q-file-tree-treenode:hover {
88
+ background-color: var(--color-secondary-o10);
89
+ }
90
+
91
+ .t3q-file-tree-treenode:active {
92
+ background-color: var(--color-secondary-o20);
93
+ }
94
+
95
+ .t3q-file-tree-treenode.t3q-file-tree-treenode-selected {
96
+ background-color: var(--color-primary-o10);
97
+ }
98
+
99
+ .t3q-file-tree-treenode.dragging {
100
+ background-color: var(--color-primary30);
101
+ }
102
+
103
+ .t3q-file-tree-treenode.dragging .t3q-file-tree-title,
104
+ .t3q-file-tree-treenode.dragging .t3q-file-tree-iconEle,
105
+ .t3q-file-tree-treenode.dragging .t3q-file-tree-iconEle > svg {
106
+ color: var(--color-sys-background);
107
+ }
108
+
109
+ .t3q-file-tree-treenode.drop-target {
110
+ background-color: var(--color-primary-o10);
111
+ }
112
+
113
+ /* 검색어 일치(`filterTreeNode` 가 true 인 노드) — rc-tree 는 클래스만 붙이므로 여기서 보이게 한다 */
114
+ .t3q-file-tree-treenode.filter-node .t3q-file-tree-title {
115
+ font-weight: var(--font-weight-bold);
116
+ }
117
+
118
+ /* 키보드로 움직인 행의 링. 행은 포커스를 받지 않고(포커스는 트리 밖 숨은 입력란) rc-tree 가
119
+ 활성 행에 `-treenode-active` 를 붙인다. 안쪽 offset 이라 가상 스크롤 목록(overflow hidden)에서도 안 잘린다 */
120
+ .t3q-file-tree-focused .t3q-file-tree-treenode-active {
121
+ outline: 2px solid var(--color-sys-focus-ring-main);
122
+ outline-offset: -2px;
123
+ }
124
+
125
+ /* 비활성 — 선택·드래그만 막힌다. 폴더는 계속 펼쳐지는 조작 가능한 노드라 `aria-disabled` 가 없고,
126
+ 대비 4.5:1 을 지키는 subtler 로 그린다. 펼칠 것이 없는 비활성 잎만 index.tsx 가 `aria-disabled` 를 붙이므로
127
+ (속성 선택자라 위 규칙보다 특이도가 높다) 그 행만 DS 비활성 색과 반투명 아이콘으로 그린다 */
128
+ .t3q-file-tree-treenode-disabled .t3q-file-tree-title {
129
+ color: var(--color-sys-text-subtler);
130
+ }
131
+
132
+ .t3q-file-tree-treenode-disabled[aria-disabled='true'] .t3q-file-tree-title {
133
+ color: var(--color-sys-text-disabled);
134
+ }
135
+
136
+ .t3q-file-tree-treenode-disabled[aria-disabled='true'] .t3q-file-tree-iconEle {
137
+ opacity: 0.5;
138
+ }
139
+
140
+ /* ==================== 드래그 드롭 표시선 ==================== */
141
+ /* 위치(top/bottom/left)는 index.tsx 가 인라인으로 준다 */
142
+
143
+ .t3q-file-tree-drop-indicator {
144
+ position: absolute;
145
+ right: 0;
146
+ height: 2px;
147
+ background-color: var(--color-primary30);
148
+ pointer-events: none;
149
+ }
1
150
  .ag-grid-container {
2
151
  width: 100%;
3
152
  height: 100%;
package/dist/index.cjs CHANGED
@@ -22,9 +22,10 @@ const datePresets = require("./components/datePresets.cjs");
22
22
  const dialog = require("./components/dialog.cjs");
23
23
  const drawer = require("./components/drawer.cjs");
24
24
  const dropdownMenu = require("./components/dropdownMenu.cjs");
25
+ const index = require("./components/fileTree/index.cjs");
25
26
  const form = require("./components/form.cjs");
26
27
  const iconButton = require("./components/iconButton.cjs");
27
- const index = require("./components/iconSelect/index.cjs");
28
+ const index$1 = require("./components/iconSelect/index.cjs");
28
29
  const textField = require("./components/textField.cjs");
29
30
  const label = require("./components/label.cjs");
30
31
  const metaItem = require("./components/metaItem.cjs");
@@ -41,10 +42,10 @@ const radio = require("./components/radio.cjs");
41
42
  const radioGroup = require("./components/radioGroup.cjs");
42
43
  const radioSection = require("./components/radioSection.cjs");
43
44
  const separator = require("./components/separator.cjs");
44
- const index$1 = require("./components/sidebar/index.cjs");
45
- const index$2 = require("./components/skeleton/index.cjs");
46
- const index$3 = require("./components/spinner/index.cjs");
47
- const index$4 = require("./components/stack/index.cjs");
45
+ const index$2 = require("./components/sidebar/index.cjs");
46
+ const index$3 = require("./components/skeleton/index.cjs");
47
+ const index$4 = require("./components/spinner/index.cjs");
48
+ const index$5 = require("./components/stack/index.cjs");
48
49
  const _switch = require("./components/switch.cjs");
49
50
  const switchSection = require("./components/switchSection.cjs");
50
51
  const table$1 = require("./components/table.cjs");
@@ -56,7 +57,7 @@ const timePicker = require("./components/timePicker.cjs");
56
57
  const toast = require("./components/toast.cjs");
57
58
  const themeProvider = require("./components/themeProvider.cjs");
58
59
  const tooltip = require("./components/tooltip.cjs");
59
- const index$5 = require("./components/agGridTable/index.cjs");
60
+ const index$6 = require("./components/agGridTable/index.cjs");
60
61
  const cn = require("./utils/cn.cjs");
61
62
  const sanitizeUserText = require("./utils/sanitizeUserText.cjs");
62
63
  const table = require("./components/skeleton/table.cjs");
@@ -189,6 +190,7 @@ exports.DropdownMenuSub = dropdownMenu.DropdownMenuSub;
189
190
  exports.DropdownMenuSubContent = dropdownMenu.DropdownMenuSubContent;
190
191
  exports.DropdownMenuSubTrigger = dropdownMenu.DropdownMenuSubTrigger;
191
192
  exports.DropdownMenuTrigger = dropdownMenu.DropdownMenuTrigger;
193
+ exports.FileTree = index.FileTree;
192
194
  exports.Form = form.Form;
193
195
  exports.FormControl = form.FormControl;
194
196
  exports.FormDescription = form.FormDescription;
@@ -204,7 +206,7 @@ exports.FormValidMessage = form.FormValidMessage;
204
206
  exports.useFormControlContext = form.useFormControlContext;
205
207
  exports.useFormField = form.useFormField;
206
208
  exports.IconButton = iconButton.IconButton;
207
- exports.IconSelect = index.IconSelect;
209
+ exports.IconSelect = index$1.IconSelect;
208
210
  exports.TextField = textField.TextField;
209
211
  exports.Label = label.Label;
210
212
  exports.MetaGroup = metaItem.MetaGroup;
@@ -240,18 +242,18 @@ exports.RadioGroupItem = radioGroup.RadioGroupItem;
240
242
  exports.RadioSection = radioSection.RadioSection;
241
243
  exports.RadioSectionGroup = radioSection.RadioSectionGroup;
242
244
  exports.Separator = separator.Separator;
243
- exports.Sidebar = index$1.Sidebar;
244
- exports.SidebarContent = index$1.SidebarContent;
245
- exports.SidebarFooter = index$1.SidebarFooter;
246
- exports.SidebarHeader = index$1.SidebarHeader;
247
- exports.SidebarMenuItem = index$1.SidebarMenuItem;
248
- exports.SidebarProvider = index$1.SidebarProvider;
249
- exports.SidebarSection = index$1.SidebarSection;
250
- exports.SidebarToggle = index$1.SidebarToggle;
251
- exports.useSidebar = index$1.useSidebar;
252
- exports.Skeleton = index$2.Skeleton;
253
- exports.Spinner = index$3.Spinner;
254
- exports.Stack = index$4.Stack;
245
+ exports.Sidebar = index$2.Sidebar;
246
+ exports.SidebarContent = index$2.SidebarContent;
247
+ exports.SidebarFooter = index$2.SidebarFooter;
248
+ exports.SidebarHeader = index$2.SidebarHeader;
249
+ exports.SidebarMenuItem = index$2.SidebarMenuItem;
250
+ exports.SidebarProvider = index$2.SidebarProvider;
251
+ exports.SidebarSection = index$2.SidebarSection;
252
+ exports.SidebarToggle = index$2.SidebarToggle;
253
+ exports.useSidebar = index$2.useSidebar;
254
+ exports.Skeleton = index$3.Skeleton;
255
+ exports.Spinner = index$4.Spinner;
256
+ exports.Stack = index$5.Stack;
255
257
  exports.Switch = _switch.Switch;
256
258
  exports.SwitchSection = switchSection.SwitchSection;
257
259
  exports.NUMBER_COLUMN_CLASS = table$1.NUMBER_COLUMN_CLASS;
@@ -289,24 +291,24 @@ exports.Tooltip = tooltip.Tooltip;
289
291
  exports.TooltipContent = tooltip.TooltipContent;
290
292
  exports.TooltipProvider = tooltip.TooltipProvider;
291
293
  exports.TooltipTrigger = tooltip.TooltipTrigger;
292
- exports.AgGridTable = index$5.AgGridTable;
293
- exports.BALANCED_FILL_MIN_WIDTH = index$5.BALANCED_FILL_MIN_WIDTH;
294
- exports.HeaderCheckboxRenderer = index$5.HeaderCheckboxRenderer;
295
- exports.NUMBER_COLUMN_WIDTH = index$5.NUMBER_COLUMN_WIDTH;
296
- exports.RowCheckboxRenderer = index$5.RowCheckboxRenderer;
297
- exports.SORT_ICON_OFFSET_CLASS = index$5.SORT_ICON_OFFSET_CLASS;
298
- exports.TwoLineCellRenderer = index$5.TwoLineCellRenderer;
299
- exports.estimateHeaderTextWidth = index$5.estimateHeaderTextWidth;
300
- exports.fitColumnsToContent = index$5.fitColumnsToContent;
301
- exports.growColumnIds = index$5.growColumnIds;
302
- exports.withBalancedFill = index$5.withBalancedFill;
303
- exports.withExplicitSortIcons = index$5.withExplicitSortIcons;
304
- exports.withFlexFill = index$5.withFlexFill;
305
- exports.withHeaderMinWidth = index$5.withHeaderMinWidth;
306
- exports.withNumberColumnWidth = index$5.withNumberColumnWidth;
307
- exports.withSortIconOffset = index$5.withSortIconOffset;
308
- exports.withTypeClasses = index$5.withTypeClasses;
309
- exports.withWidthFloor = index$5.withWidthFloor;
294
+ exports.AgGridTable = index$6.AgGridTable;
295
+ exports.BALANCED_FILL_MIN_WIDTH = index$6.BALANCED_FILL_MIN_WIDTH;
296
+ exports.HeaderCheckboxRenderer = index$6.HeaderCheckboxRenderer;
297
+ exports.NUMBER_COLUMN_WIDTH = index$6.NUMBER_COLUMN_WIDTH;
298
+ exports.RowCheckboxRenderer = index$6.RowCheckboxRenderer;
299
+ exports.SORT_ICON_OFFSET_CLASS = index$6.SORT_ICON_OFFSET_CLASS;
300
+ exports.TwoLineCellRenderer = index$6.TwoLineCellRenderer;
301
+ exports.estimateHeaderTextWidth = index$6.estimateHeaderTextWidth;
302
+ exports.fitColumnsToContent = index$6.fitColumnsToContent;
303
+ exports.growColumnIds = index$6.growColumnIds;
304
+ exports.withBalancedFill = index$6.withBalancedFill;
305
+ exports.withExplicitSortIcons = index$6.withExplicitSortIcons;
306
+ exports.withFlexFill = index$6.withFlexFill;
307
+ exports.withHeaderMinWidth = index$6.withHeaderMinWidth;
308
+ exports.withNumberColumnWidth = index$6.withNumberColumnWidth;
309
+ exports.withSortIconOffset = index$6.withSortIconOffset;
310
+ exports.withTypeClasses = index$6.withTypeClasses;
311
+ exports.withWidthFloor = index$6.withWidthFloor;
310
312
  exports.cn = cn.cn;
311
313
  exports.sanitizeUserText = sanitizeUserText.sanitizeUserText;
312
314
  exports.TableSkeleton = table.default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}