@accelint/design-toolkit 9.9.0 → 9.9.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.
Files changed (223) hide show
  1. package/catalog-info.yaml +7 -4
  2. package/dist/components/accordion/context.d.ts +2 -2
  3. package/dist/components/accordion/group.d.ts +2 -2
  4. package/dist/components/accordion/header.d.ts +2 -2
  5. package/dist/components/accordion/index.d.ts +2 -2
  6. package/dist/components/accordion/panel.d.ts +2 -2
  7. package/dist/components/accordion/trigger.d.ts +2 -2
  8. package/dist/components/action-bar/index.d.ts +2 -2
  9. package/dist/components/audio/index.d.ts +2 -2
  10. package/dist/components/avatar/context.d.ts +4 -4
  11. package/dist/components/avatar/index.d.ts +2 -2
  12. package/dist/components/badge/context.d.ts +4 -4
  13. package/dist/components/badge/index.d.ts +2 -2
  14. package/dist/components/breadcrumbs/index.d.ts +2 -2
  15. package/dist/components/breadcrumbs/item.d.ts +2 -2
  16. package/dist/components/button/context.d.ts +8 -8
  17. package/dist/components/button/index.d.ts +2 -2
  18. package/dist/components/button/link.d.ts +2 -2
  19. package/dist/components/button/toggle.d.ts +2 -2
  20. package/dist/components/checkbox/context.d.ts +3 -3
  21. package/dist/components/checkbox/group.d.ts +2 -2
  22. package/dist/components/checkbox/index.d.ts +2 -2
  23. package/dist/components/chip/context.d.ts +4 -4
  24. package/dist/components/chip/deletable.d.ts +2 -2
  25. package/dist/components/chip/index.d.ts +2 -2
  26. package/dist/components/chip/list.d.ts +4 -4
  27. package/dist/components/chip/selectable.d.ts +2 -2
  28. package/dist/components/classification-badge/context.d.ts +4 -4
  29. package/dist/components/classification-badge/index.d.ts +2 -2
  30. package/dist/components/classification-banner/context.d.ts +4 -4
  31. package/dist/components/classification-banner/index.d.ts +2 -2
  32. package/dist/components/clock/index.d.ts +2 -2
  33. package/dist/components/color-picker/index.d.ts +2 -2
  34. package/dist/components/combobox-field/context.d.ts +4 -4
  35. package/dist/components/combobox-field/index.d.ts +2 -2
  36. package/dist/components/coordinate-field/context.d.ts +6 -6
  37. package/dist/components/coordinate-field/index.d.ts +2 -2
  38. package/dist/components/coordinate-field/segment.d.ts +2 -2
  39. package/dist/components/date-field/index.d.ts +2 -2
  40. package/dist/components/deferred-collection/index.d.ts +2 -2
  41. package/dist/components/details-list/context.d.ts +4 -4
  42. package/dist/components/details-list/index.d.ts +2 -2
  43. package/dist/components/details-list/label.d.ts +2 -2
  44. package/dist/components/details-list/value.d.ts +2 -2
  45. package/dist/components/dialog/content.d.ts +2 -2
  46. package/dist/components/dialog/context.d.ts +2 -2
  47. package/dist/components/dialog/footer.d.ts +2 -2
  48. package/dist/components/dialog/index.d.ts +2 -2
  49. package/dist/components/dialog/title.d.ts +2 -2
  50. package/dist/components/divider/context.d.ts +4 -4
  51. package/dist/components/divider/index.d.ts +2 -2
  52. package/dist/components/drawer/back.d.ts +2 -2
  53. package/dist/components/drawer/close.d.ts +2 -2
  54. package/dist/components/drawer/content.d.ts +2 -2
  55. package/dist/components/drawer/context.d.ts +2 -2
  56. package/dist/components/drawer/footer.d.ts +2 -2
  57. package/dist/components/drawer/header-title.d.ts +2 -2
  58. package/dist/components/drawer/header.d.ts +2 -2
  59. package/dist/components/drawer/index.d.ts +2 -2
  60. package/dist/components/drawer/layout-main.d.ts +2 -2
  61. package/dist/components/drawer/layout.d.ts +2 -2
  62. package/dist/components/drawer/menu-item.d.ts +2 -2
  63. package/dist/components/drawer/menu.d.ts +2 -2
  64. package/dist/components/drawer/panel.d.ts +2 -2
  65. package/dist/components/drawer/trigger.d.ts +2 -2
  66. package/dist/components/drawer/view.d.ts +2 -2
  67. package/dist/components/flashcard/index.d.ts +7 -7
  68. package/dist/components/floating-card/context.d.ts +2 -2
  69. package/dist/components/floating-card/index.d.ts +2 -2
  70. package/dist/components/floating-card/provider.d.ts +2 -2
  71. package/dist/components/hero/context.d.ts +2 -2
  72. package/dist/components/hero/index.d.ts +2 -2
  73. package/dist/components/hero/subtitle.d.ts +3 -3
  74. package/dist/components/hero/title.d.ts +2 -2
  75. package/dist/components/hotkey/context.d.ts +4 -4
  76. package/dist/components/hotkey/index.d.ts +2 -2
  77. package/dist/components/hotkey/set.d.ts +2 -2
  78. package/dist/components/icon/context.d.ts +4 -4
  79. package/dist/components/icon/index.d.ts +2 -2
  80. package/dist/components/input/context.d.ts +2 -2
  81. package/dist/components/input/index.d.ts +2 -2
  82. package/dist/components/kanban/card-body.d.ts +2 -2
  83. package/dist/components/kanban/card-header-actions.d.ts +2 -2
  84. package/dist/components/kanban/card-header-title.d.ts +2 -2
  85. package/dist/components/kanban/card-header.d.ts +2 -2
  86. package/dist/components/kanban/card.d.ts +2 -2
  87. package/dist/components/kanban/column-actions.d.ts +2 -2
  88. package/dist/components/kanban/column-container.d.ts +2 -2
  89. package/dist/components/kanban/column-content.d.ts +2 -2
  90. package/dist/components/kanban/column-header-actions.d.ts +2 -2
  91. package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
  92. package/dist/components/kanban/column-header-title.d.ts +2 -2
  93. package/dist/components/kanban/column-header.d.ts +2 -2
  94. package/dist/components/kanban/column.d.ts +2 -2
  95. package/dist/components/kanban/context.d.ts +2 -2
  96. package/dist/components/kanban/header-actions.d.ts +2 -2
  97. package/dist/components/kanban/header-search.d.ts +2 -2
  98. package/dist/components/kanban/header-title.d.ts +2 -2
  99. package/dist/components/kanban/header.d.ts +2 -2
  100. package/dist/components/kanban/kanban.d.ts +4 -4
  101. package/dist/components/label/context.d.ts +4 -4
  102. package/dist/components/label/index.d.ts +2 -2
  103. package/dist/components/lines/index.d.ts +2 -2
  104. package/dist/components/link/context.d.ts +2 -2
  105. package/dist/components/link/index.d.ts +2 -2
  106. package/dist/components/list/context.d.ts +2 -2
  107. package/dist/components/list/index.d.ts +2 -2
  108. package/dist/components/list/item-content.d.ts +2 -2
  109. package/dist/components/list/item-description.d.ts +2 -2
  110. package/dist/components/list/item-title.d.ts +2 -2
  111. package/dist/components/list/item.d.ts +2 -2
  112. package/dist/components/media-controls/context.d.ts +2 -2
  113. package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
  114. package/dist/components/media-controls/mute-button.d.ts +2 -2
  115. package/dist/components/media-controls/play-button.d.ts +2 -2
  116. package/dist/components/media-controls/playback-rate.d.ts +2 -2
  117. package/dist/components/media-controls/time-display.d.ts +2 -2
  118. package/dist/components/media-controls/time-range.d.ts +2 -2
  119. package/dist/components/media-controls/volume-slider.d.ts +2 -2
  120. package/dist/components/menu/context.d.ts +2 -2
  121. package/dist/components/menu/index.d.ts +2 -2
  122. package/dist/components/menu/item-description.d.ts +2 -2
  123. package/dist/components/menu/item-label.d.ts +2 -2
  124. package/dist/components/menu/item.d.ts +2 -2
  125. package/dist/components/menu/section.d.ts +2 -2
  126. package/dist/components/menu/separator.d.ts +2 -2
  127. package/dist/components/menu/submenu.d.ts +3 -3
  128. package/dist/components/notice/index.d.ts +2 -2
  129. package/dist/components/notice/list.d.ts +2 -2
  130. package/dist/components/notice/notice-icon.d.ts +2 -2
  131. package/dist/components/options/context.d.ts +2 -2
  132. package/dist/components/options/index.d.ts +2 -2
  133. package/dist/components/options/item-content.d.ts +2 -2
  134. package/dist/components/options/item-description.d.ts +2 -2
  135. package/dist/components/options/item-label.d.ts +2 -2
  136. package/dist/components/options/item.d.ts +2 -2
  137. package/dist/components/options/section.d.ts +2 -2
  138. package/dist/components/pagination/context.d.ts +2 -2
  139. package/dist/components/pagination/index.d.ts +2 -2
  140. package/dist/components/pagination/next.d.ts +2 -2
  141. package/dist/components/pagination/pages.d.ts +2 -2
  142. package/dist/components/pagination/prev.d.ts +2 -2
  143. package/dist/components/popover/content.d.ts +2 -2
  144. package/dist/components/popover/footer.d.ts +2 -2
  145. package/dist/components/popover/index.d.ts +2 -2
  146. package/dist/components/popover/title.d.ts +2 -2
  147. package/dist/components/popover/trigger.d.ts +2 -2
  148. package/dist/components/query-builder/action-element.d.ts +2 -2
  149. package/dist/components/query-builder/actions.d.ts +4 -4
  150. package/dist/components/query-builder/combinator-selector.d.ts +2 -2
  151. package/dist/components/query-builder/index.d.ts +2 -2
  152. package/dist/components/query-builder/rule-group.d.ts +4 -4
  153. package/dist/components/query-builder/rule.d.ts +2 -2
  154. package/dist/components/query-builder/value-editor.d.ts +2 -2
  155. package/dist/components/query-builder/value-selector.d.ts +2 -2
  156. package/dist/components/radio/context.d.ts +3 -3
  157. package/dist/components/radio/group.d.ts +2 -2
  158. package/dist/components/radio/index.d.ts +2 -2
  159. package/dist/components/search-field/context.d.ts +4 -4
  160. package/dist/components/search-field/index.d.ts +2 -2
  161. package/dist/components/select-field/context.d.ts +4 -4
  162. package/dist/components/select-field/index.d.ts +2 -2
  163. package/dist/components/sidenav/avatar.d.ts +2 -2
  164. package/dist/components/sidenav/content.d.ts +2 -2
  165. package/dist/components/sidenav/context.d.ts +2 -2
  166. package/dist/components/sidenav/footer.d.ts +2 -2
  167. package/dist/components/sidenav/header.d.ts +2 -2
  168. package/dist/components/sidenav/index.d.ts +2 -2
  169. package/dist/components/sidenav/item.d.ts +2 -2
  170. package/dist/components/sidenav/link.d.ts +2 -2
  171. package/dist/components/sidenav/menu-item.d.ts +2 -2
  172. package/dist/components/sidenav/menu.d.ts +2 -2
  173. package/dist/components/sidenav/trigger.d.ts +2 -2
  174. package/dist/components/skeleton/index.d.ts +2 -2
  175. package/dist/components/slider/index.d.ts +2 -2
  176. package/dist/components/status-indicator/index.d.ts +2 -2
  177. package/dist/components/switch/context.d.ts +4 -4
  178. package/dist/components/switch/index.d.ts +2 -2
  179. package/dist/components/table/body.d.ts +2 -2
  180. package/dist/components/table/cell.d.ts +2 -2
  181. package/dist/components/table/context.d.ts +2 -2
  182. package/dist/components/table/header-cell.d.ts +2 -2
  183. package/dist/components/table/header.d.ts +2 -2
  184. package/dist/components/table/index.d.ts +2 -2
  185. package/dist/components/table/row.d.ts +2 -2
  186. package/dist/components/tabs/context.d.ts +6 -6
  187. package/dist/components/tabs/index.d.ts +2 -2
  188. package/dist/components/tabs/list.d.ts +2 -2
  189. package/dist/components/tabs/panel.d.ts +2 -2
  190. package/dist/components/tabs/tab.d.ts +2 -2
  191. package/dist/components/text-area-field/context.d.ts +4 -4
  192. package/dist/components/text-area-field/index.d.ts +2 -2
  193. package/dist/components/text-field/context.d.ts +4 -4
  194. package/dist/components/text-field/index.d.ts +2 -2
  195. package/dist/components/time-field/index.d.ts +2 -2
  196. package/dist/components/tooltip/index.d.ts +2 -2
  197. package/dist/components/tooltip/trigger.d.ts +2 -2
  198. package/dist/components/tree/context.d.ts +3 -3
  199. package/dist/components/tree/index.d.ts +2 -2
  200. package/dist/components/tree/index.js +6 -4
  201. package/dist/components/tree/index.js.map +1 -1
  202. package/dist/components/tree/item-actions.d.ts +2 -2
  203. package/dist/components/tree/item-content.d.ts +2 -2
  204. package/dist/components/tree/item-content.js +9 -5
  205. package/dist/components/tree/item-content.js.map +1 -1
  206. package/dist/components/tree/item-description.d.ts +2 -2
  207. package/dist/components/tree/item-label.d.ts +2 -2
  208. package/dist/components/tree/item-prefix-icon.d.ts +2 -2
  209. package/dist/components/tree/item.d.ts +2 -2
  210. package/dist/components/tree/lines.d.ts +4 -2
  211. package/dist/components/tree/lines.js +8 -4
  212. package/dist/components/tree/lines.js.map +1 -1
  213. package/dist/components/tree/styles.module.css +23 -3
  214. package/dist/components/video/index.d.ts +2 -2
  215. package/dist/components/view-stack/context.d.ts +2 -2
  216. package/dist/components/view-stack/index.d.ts +2 -2
  217. package/dist/components/view-stack/trigger.d.ts +2 -2
  218. package/dist/components/view-stack/view.d.ts +2 -2
  219. package/dist/hooks/use-tree/state/index.js +7 -14
  220. package/dist/hooks/use-tree/state/index.js.map +1 -1
  221. package/dist/providers/portal.d.ts +2 -2
  222. package/dist/providers/theme-provider.d.ts +2 -2
  223. package/package.json +6 -6
@@ -13,13 +13,13 @@
13
13
  import { ProviderProps } from "../../lib/types.js";
14
14
  import { TextAreaFieldProps } from "./types.js";
15
15
  import "client-only";
16
- import * as react52 from "react";
16
+ import * as react47 from "react";
17
17
  import { ContextValue } from "react-aria-components";
18
- import * as react_jsx_runtime202 from "react/jsx-runtime";
18
+ import * as react_jsx_runtime192 from "react/jsx-runtime";
19
19
 
20
20
  //#region src/components/text-area-field/context.d.ts
21
21
  /** Context for sharing props across TextAreaField components */
22
- declare const TextAreaFieldContext: react52.Context<ContextValue<TextAreaFieldProps, HTMLDivElement>>;
22
+ declare const TextAreaFieldContext: react47.Context<ContextValue<TextAreaFieldProps, HTMLDivElement>>;
23
23
  /**
24
24
  * Sets default props for all TextAreaField components within.
25
25
  *
@@ -42,7 +42,7 @@ declare const TextAreaFieldContext: react52.Context<ContextValue<TextAreaFieldPr
42
42
  declare function TextAreaFieldProvider({
43
43
  children,
44
44
  ...props
45
- }: ProviderProps<TextAreaFieldProps>): react_jsx_runtime202.JSX.Element;
45
+ }: ProviderProps<TextAreaFieldProps>): react_jsx_runtime192.JSX.Element;
46
46
  //#endregion
47
47
  export { TextAreaFieldContext, TextAreaFieldProvider };
48
48
  //# sourceMappingURL=context.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TextAreaFieldProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime186 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime204 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/text-area-field/index.d.ts
18
18
 
@@ -44,7 +44,7 @@ import * as react_jsx_runtime186 from "react/jsx-runtime";
44
44
  declare function TextAreaField({
45
45
  ref,
46
46
  ...props
47
- }: TextAreaFieldProps): react_jsx_runtime186.JSX.Element;
47
+ }: TextAreaFieldProps): react_jsx_runtime204.JSX.Element;
48
48
  //#endregion
49
49
  export { TextAreaField };
50
50
  //# sourceMappingURL=index.d.ts.map
@@ -13,13 +13,13 @@
13
13
  import { ProviderProps } from "../../lib/types.js";
14
14
  import { TextFieldProps as TextFieldProps$1 } from "./types.js";
15
15
  import "client-only";
16
- import * as react49 from "react";
16
+ import * as react18 from "react";
17
17
  import { ContextValue } from "react-aria-components";
18
- import * as react_jsx_runtime196 from "react/jsx-runtime";
18
+ import * as react_jsx_runtime66 from "react/jsx-runtime";
19
19
 
20
20
  //#region src/components/text-field/context.d.ts
21
21
  /** Context for sharing props across TextField components */
22
- declare const TextFieldContext: react49.Context<ContextValue<TextFieldProps$1, HTMLDivElement>>;
22
+ declare const TextFieldContext: react18.Context<ContextValue<TextFieldProps$1, HTMLDivElement>>;
23
23
  /**
24
24
  * Sets default props for all TextField components within.
25
25
  *
@@ -42,7 +42,7 @@ declare const TextFieldContext: react49.Context<ContextValue<TextFieldProps$1, H
42
42
  declare function TextFieldProvider({
43
43
  children,
44
44
  ...props
45
- }: ProviderProps<TextFieldProps$1>): react_jsx_runtime196.JSX.Element;
45
+ }: ProviderProps<TextFieldProps$1>): react_jsx_runtime66.JSX.Element;
46
46
  //#endregion
47
47
  export { TextFieldContext, TextFieldProvider };
48
48
  //# sourceMappingURL=context.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TextFieldProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime195 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime193 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/text-field/index.d.ts
18
18
 
@@ -40,7 +40,7 @@ import * as react_jsx_runtime195 from "react/jsx-runtime";
40
40
  declare function TextField({
41
41
  ref,
42
42
  ...props
43
- }: TextFieldProps): react_jsx_runtime195.JSX.Element;
43
+ }: TextFieldProps): react_jsx_runtime193.JSX.Element;
44
44
  //#endregion
45
45
  export { TextField };
46
46
  //# sourceMappingURL=index.d.ts.map
@@ -13,7 +13,7 @@
13
13
  import { TimeFieldProps as TimeFieldProps$1 } from "./types.js";
14
14
  import "client-only";
15
15
  import { TimeValue } from "react-aria-components";
16
- import * as react_jsx_runtime197 from "react/jsx-runtime";
16
+ import * as react_jsx_runtime191 from "react/jsx-runtime";
17
17
 
18
18
  //#region src/components/time-field/index.d.ts
19
19
 
@@ -58,7 +58,7 @@ declare function TimeField<T extends TimeValue>({
58
58
  isRequired,
59
59
  isReadOnly,
60
60
  ...rest
61
- }: TimeFieldProps$1<T>): react_jsx_runtime197.JSX.Element;
61
+ }: TimeFieldProps$1<T>): react_jsx_runtime191.JSX.Element;
62
62
  //#endregion
63
63
  export { TimeField };
64
64
  //# sourceMappingURL=index.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TooltipProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime200 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime194 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/tooltip/index.d.ts
18
18
 
@@ -44,7 +44,7 @@ declare function Tooltip({
44
44
  offset,
45
45
  placement,
46
46
  ...props
47
- }: TooltipProps): react_jsx_runtime200.JSX.Element;
47
+ }: TooltipProps): react_jsx_runtime194.JSX.Element;
48
48
  //#endregion
49
49
  export { Tooltip };
50
50
  //# sourceMappingURL=index.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TooltipTriggerProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime198 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime202 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/tooltip/trigger.d.ts
18
18
 
@@ -38,7 +38,7 @@ import * as react_jsx_runtime198 from "react/jsx-runtime";
38
38
  declare function TooltipTrigger({
39
39
  ref,
40
40
  ...props
41
- }: TooltipTriggerProps): react_jsx_runtime198.JSX.Element;
41
+ }: TooltipTriggerProps): react_jsx_runtime202.JSX.Element;
42
42
  //#endregion
43
43
  export { TooltipTrigger };
44
44
  //# sourceMappingURL=trigger.d.ts.map
@@ -12,13 +12,13 @@
12
12
 
13
13
  import { TreeContextValue, TreeItemContextValue } from "./types.js";
14
14
  import "client-only";
15
- import * as react50 from "react";
15
+ import * as react49 from "react";
16
16
 
17
17
  //#region src/components/tree/context.d.ts
18
18
  /** Context for sharing state across Tree components */
19
- declare const TreeContext: react50.Context<TreeContextValue>;
19
+ declare const TreeContext: react49.Context<TreeContextValue>;
20
20
  /** Context for sharing state within a TreeItem */
21
- declare const TreeItemContext: react50.Context<TreeItemContextValue>;
21
+ declare const TreeItemContext: react49.Context<TreeItemContextValue>;
22
22
  //#endregion
23
23
  export { TreeContext, TreeItemContext };
24
24
  //# sourceMappingURL=context.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TreeProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime199 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime196 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/tree/index.d.ts
18
18
 
@@ -75,7 +75,7 @@ declare function Tree<T>({
75
75
  onVisibilityChange,
76
76
  onSelectionChange,
77
77
  ...rest
78
- }: TreeProps<T>): react_jsx_runtime199.JSX.Element;
78
+ }: TreeProps<T>): react_jsx_runtime196.JSX.Element;
79
79
  //#endregion
80
80
  export { Tree };
81
81
  //# sourceMappingURL=index.d.ts.map
@@ -23,10 +23,12 @@ import { jsx } from "react/jsx-runtime";
23
23
  import styles from "./styles.module.css";
24
24
 
25
25
  //#region src/components/tree/index.tsx
26
- const defaultRenderDropIndicator = (target) => /* @__PURE__ */ jsx(DropIndicator, {
27
- target,
28
- className: styles.dropIndicator
29
- });
26
+ const defaultRenderDropIndicator = (target) => {
27
+ return /* @__PURE__ */ jsx(DropIndicator, {
28
+ target,
29
+ className: target.type === "item" && (target.dropPosition === "before" || target.dropPosition === "after") ? styles.dropIndicatorBetween : styles.dropIndicator
30
+ });
31
+ };
30
32
  /**
31
33
  * Tree - Hierarchical tree view with selection, visibility, and drag-and-drop
32
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["acc","AriaTree","className"],"sources":["../../../src/components/tree/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport { Cache } from '@/hooks/use-tree/actions/cache';\nimport type { Key, Selection } from '@react-types/shared';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { useMemo } from 'react';\nimport {\n Tree as AriaTree,\n composeRenderProps,\n DropIndicator,\n type DropTarget,\n useDragAndDrop,\n} from 'react-aria-components';\nimport { TreeContext } from './context';\nimport styles from './styles.module.css';\nimport type { TreeProps } from './types';\n\nconst defaultRenderDropIndicator = (target: DropTarget) => (\n <DropIndicator target={target} className={styles.dropIndicator} />\n);\n\n/**\n * Tree - Hierarchical tree view with selection, visibility, and drag-and-drop\n *\n * Supports static or dynamic collections with keyboard navigation and accessibility.\n *\n * @param props - {@link TreeProps}\n * @param props.children - Tree items or render function for dynamic collections.\n * @param props.className - CSS class for the tree container.\n * @param props.disabledKeys - Set of disabled item keys.\n * @param props.dragAndDropConfig - Configuration for drag and drop behavior.\n * @param props.expandedKeys - Set of expanded item keys.\n * @param props.items - Data source for dynamic collections.\n * @param props.selectedKeys - Set of selected item keys.\n * @param props.showRuleLines - Whether to show connecting lines between items.\n * @param props.showVisibility - Whether to show visibility toggle buttons.\n * @param props.selectionMode - Selection mode for the tree.\n * @param props.variant - Visual density variant.\n * @param props.visibleKeys - Set of visible item keys.\n * @param props.onVisibilityChange - Callback when item visibility changes.\n * @param props.onSelectionChange - Callback when selection changes.\n * @returns The rendered Tree component.\n *\n * @example\n * // Dynamic collection\n * ```tsx\n * <Tree items={items} expandedKeys={expandedKeys}>\n * {(node) => <TreeItem key={node.key}>{node.label}</TreeItem>}\n * </Tree>\n * ```\n *\n * @example\n * ```tsx\n * // Static collection\n * <Tree>\n * <TreeItem id=\"one\" textValue=\"one\">\n * <TreeItemContent>One</TreeItemContent>\n * <TreeItem id=\"two\" textValue=\"two\">\n * <TreeItemContent>Two</TreeItemContent>\n * </TreeItem>\n * </TreeItem>\n * </Tree>\n * ```\n */\nexport function Tree<T>({\n children,\n className,\n disabledKeys: disabledKeysProp,\n dragAndDropConfig,\n expandedKeys: expandedKeysProp,\n items,\n selectedKeys: selectedKeysProp,\n showRuleLines = true,\n showVisibility = true,\n selectionMode = 'multiple',\n variant = 'cozy',\n visibleKeys: visibleKeysProp,\n onVisibilityChange,\n onSelectionChange,\n ...rest\n}: TreeProps<T>) {\n /**\n * A static collection is hard-coded. Dynamic is data-driven from an external source.\n * https://react-spectrum.adobe.com/react-aria/Tree.html#content\n *\n * Controlled state should only be used on a static tree.\n */\n if (\n items &&\n (disabledKeysProp ||\n expandedKeysProp ||\n selectedKeysProp ||\n visibleKeysProp)\n ) {\n throw new Error(\n 'Tree should only be controlled with state from either `items` or keys props, not both',\n );\n }\n\n /**\n * A static tree won't support the node iterator pattern.\n */\n if (!!items !== (typeof children === 'function')) {\n throw new Error(\n 'Tree `items` and node iterator `children` must be used together',\n );\n }\n\n const { dragAndDropHooks } = useDragAndDrop({\n renderDropIndicator: defaultRenderDropIndicator,\n getAllowedDropOperations: () => ['move'],\n getDropOperation: () => 'move',\n ...dragAndDropConfig,\n });\n const cache = useMemo(() => (items ? new Cache([...items]) : null), [items]);\n const nodes = useMemo(() => cache?.getAllNodes(), [cache]);\n const {\n disabledKeys,\n expandedKeys,\n selectedKeys,\n visibleKeys,\n visibilityComputedKeys,\n } = useMemo(() => {\n const acc = {\n disabledKeys: nodes ? new Set<Key>() : disabledKeysProp,\n expandedKeys: nodes ? new Set<Key>() : expandedKeysProp,\n selectedKeys: nodes ? new Set<Key>() : selectedKeysProp,\n visibleKeys: nodes ? new Set<Key>() : visibleKeysProp,\n visibilityComputedKeys: new Set<Key>(),\n };\n\n if (!nodes) {\n return acc;\n }\n\n return nodes.reduce(\n (\n acc,\n {\n key,\n isDisabled,\n isExpanded,\n isSelected,\n isVisible,\n isVisibleComputed,\n },\n ) => {\n if (isDisabled) {\n acc.disabledKeys?.add(key);\n }\n if (isExpanded) {\n acc.expandedKeys?.add(key);\n }\n if (isSelected) {\n acc.selectedKeys?.add(key);\n }\n if (isVisible) {\n acc.visibleKeys?.add(key);\n }\n if (isVisibleComputed) {\n acc.visibilityComputedKeys.add(key);\n }\n return acc;\n },\n acc,\n );\n }, [\n nodes,\n disabledKeysProp,\n expandedKeysProp,\n selectedKeysProp,\n visibleKeysProp,\n ]);\n\n const handleSelectionChange = selectedKeys\n ? (selection: Selection) => {\n if (selection !== 'all') {\n onSelectionChange?.(selection);\n }\n }\n : undefined;\n\n return (\n <TreeContext.Provider\n value={{\n disabledKeys,\n expandedKeys,\n selectedKeys,\n showRuleLines,\n showVisibility,\n variant,\n visibleKeys,\n visibilityComputedKeys,\n isStatic: typeof children !== 'function',\n onVisibilityChange: onVisibilityChange ?? (() => undefined), // TODO: improve\n }}\n >\n <AriaTree\n {...rest}\n className={composeRenderProps(className, (className) =>\n clsx(styles.tree, className),\n )}\n disabledKeys={disabledKeys}\n dragAndDropHooks={dragAndDropHooks}\n expandedKeys={expandedKeys}\n items={items}\n selectedKeys={selectedKeys}\n onSelectionChange={handleSelectionChange}\n selectionMode={selectionMode}\n >\n {children}\n </AriaTree>\n </TreeContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,8BAA8B,WAClC,oBAAC;CAAsB;CAAQ,WAAW,OAAO;EAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CpE,SAAgB,KAAQ,EACtB,UACA,WACA,cAAc,kBACd,mBACA,cAAc,kBACd,OACA,cAAc,kBACd,gBAAgB,MAChB,iBAAiB,MACjB,gBAAgB,YAChB,UAAU,QACV,aAAa,iBACb,oBACA,mBACA,GAAG,QACY;;;;;;;AAOf,KACE,UACC,oBACC,oBACA,oBACA,iBAEF,OAAM,IAAI,MACR,wFACD;;;;AAMH,KAAI,CAAC,CAAC,WAAW,OAAO,aAAa,YACnC,OAAM,IAAI,MACR,kEACD;CAGH,MAAM,EAAE,qBAAqB,eAAe;EAC1C,qBAAqB;EACrB,gCAAgC,CAAC,OAAO;EACxC,wBAAwB;EACxB,GAAG;EACJ,CAAC;CACF,MAAM,QAAQ,cAAe,QAAQ,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAO,CAAC,MAAM,CAAC;CAC5E,MAAM,QAAQ,cAAc,OAAO,aAAa,EAAE,CAAC,MAAM,CAAC;CAC1D,MAAM,EACJ,cACA,cACA,cACA,aACA,2BACE,cAAc;EAChB,MAAM,MAAM;GACV,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,aAAa,wBAAQ,IAAI,KAAU,GAAG;GACtC,wCAAwB,IAAI,KAAU;GACvC;AAED,MAAI,CAAC,MACH,QAAO;AAGT,SAAO,MAAM,QAET,OACA,EACE,KACA,YACA,YACA,YACA,WACA,wBAEC;AACH,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,UACF,OAAI,aAAa,IAAI,IAAI;AAE3B,OAAI,kBACF,OAAI,uBAAuB,IAAI,IAAI;AAErC,UAAOA;KAET,IACD;IACA;EACD;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,wBAAwB,gBACzB,cAAyB;AACxB,MAAI,cAAc,MAChB,qBAAoB,UAAU;KAGlC;AAEJ,QACE,oBAAC,YAAY;EACX,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,UAAU,OAAO,aAAa;GAC9B,oBAAoB,6BAA6B;GAClD;YAED,oBAACC;GACC,GAAI;GACJ,WAAW,mBAAmB,YAAY,gBACxC,KAAK,OAAO,MAAMC,YAAU,CAC7B;GACa;GACI;GACJ;GACP;GACO;GACd,mBAAmB;GACJ;GAEd;IACQ;GACU"}
1
+ {"version":3,"file":"index.js","names":["acc","AriaTree","className"],"sources":["../../../src/components/tree/index.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport { Cache } from '@/hooks/use-tree/actions/cache';\nimport type { Key, Selection } from '@react-types/shared';\nimport 'client-only';\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { useMemo } from 'react';\nimport {\n Tree as AriaTree,\n composeRenderProps,\n DropIndicator,\n type DropTarget,\n useDragAndDrop,\n} from 'react-aria-components';\nimport { TreeContext } from './context';\nimport styles from './styles.module.css';\nimport type { TreeProps } from './types';\n\nconst defaultRenderDropIndicator = (target: DropTarget) => {\n const isBetweenItems =\n target.type === 'item' &&\n (target.dropPosition === 'before' || target.dropPosition === 'after');\n return (\n <DropIndicator\n target={target}\n className={\n isBetweenItems ? styles.dropIndicatorBetween : styles.dropIndicator\n }\n />\n );\n};\n\n/**\n * Tree - Hierarchical tree view with selection, visibility, and drag-and-drop\n *\n * Supports static or dynamic collections with keyboard navigation and accessibility.\n *\n * @param props - {@link TreeProps}\n * @param props.children - Tree items or render function for dynamic collections.\n * @param props.className - CSS class for the tree container.\n * @param props.disabledKeys - Set of disabled item keys.\n * @param props.dragAndDropConfig - Configuration for drag and drop behavior.\n * @param props.expandedKeys - Set of expanded item keys.\n * @param props.items - Data source for dynamic collections.\n * @param props.selectedKeys - Set of selected item keys.\n * @param props.showRuleLines - Whether to show connecting lines between items.\n * @param props.showVisibility - Whether to show visibility toggle buttons.\n * @param props.selectionMode - Selection mode for the tree.\n * @param props.variant - Visual density variant.\n * @param props.visibleKeys - Set of visible item keys.\n * @param props.onVisibilityChange - Callback when item visibility changes.\n * @param props.onSelectionChange - Callback when selection changes.\n * @returns The rendered Tree component.\n *\n * @example\n * // Dynamic collection\n * ```tsx\n * <Tree items={items} expandedKeys={expandedKeys}>\n * {(node) => <TreeItem key={node.key}>{node.label}</TreeItem>}\n * </Tree>\n * ```\n *\n * @example\n * ```tsx\n * // Static collection\n * <Tree>\n * <TreeItem id=\"one\" textValue=\"one\">\n * <TreeItemContent>One</TreeItemContent>\n * <TreeItem id=\"two\" textValue=\"two\">\n * <TreeItemContent>Two</TreeItemContent>\n * </TreeItem>\n * </TreeItem>\n * </Tree>\n * ```\n */\nexport function Tree<T>({\n children,\n className,\n disabledKeys: disabledKeysProp,\n dragAndDropConfig,\n expandedKeys: expandedKeysProp,\n items,\n selectedKeys: selectedKeysProp,\n showRuleLines = true,\n showVisibility = true,\n selectionMode = 'multiple',\n variant = 'cozy',\n visibleKeys: visibleKeysProp,\n onVisibilityChange,\n onSelectionChange,\n ...rest\n}: TreeProps<T>) {\n /**\n * A static collection is hard-coded. Dynamic is data-driven from an external source.\n * https://react-spectrum.adobe.com/react-aria/Tree.html#content\n *\n * Controlled state should only be used on a static tree.\n */\n if (\n items &&\n (disabledKeysProp ||\n expandedKeysProp ||\n selectedKeysProp ||\n visibleKeysProp)\n ) {\n throw new Error(\n 'Tree should only be controlled with state from either `items` or keys props, not both',\n );\n }\n\n /**\n * A static tree won't support the node iterator pattern.\n */\n if (!!items !== (typeof children === 'function')) {\n throw new Error(\n 'Tree `items` and node iterator `children` must be used together',\n );\n }\n\n const { dragAndDropHooks } = useDragAndDrop({\n renderDropIndicator: defaultRenderDropIndicator,\n getAllowedDropOperations: () => ['move'],\n getDropOperation: () => 'move',\n ...dragAndDropConfig,\n });\n const cache = useMemo(() => (items ? new Cache([...items]) : null), [items]);\n const nodes = useMemo(() => cache?.getAllNodes(), [cache]);\n const {\n disabledKeys,\n expandedKeys,\n selectedKeys,\n visibleKeys,\n visibilityComputedKeys,\n } = useMemo(() => {\n const acc = {\n disabledKeys: nodes ? new Set<Key>() : disabledKeysProp,\n expandedKeys: nodes ? new Set<Key>() : expandedKeysProp,\n selectedKeys: nodes ? new Set<Key>() : selectedKeysProp,\n visibleKeys: nodes ? new Set<Key>() : visibleKeysProp,\n visibilityComputedKeys: new Set<Key>(),\n };\n\n if (!nodes) {\n return acc;\n }\n\n return nodes.reduce(\n (\n acc,\n {\n key,\n isDisabled,\n isExpanded,\n isSelected,\n isVisible,\n isVisibleComputed,\n },\n ) => {\n if (isDisabled) {\n acc.disabledKeys?.add(key);\n }\n if (isExpanded) {\n acc.expandedKeys?.add(key);\n }\n if (isSelected) {\n acc.selectedKeys?.add(key);\n }\n if (isVisible) {\n acc.visibleKeys?.add(key);\n }\n if (isVisibleComputed) {\n acc.visibilityComputedKeys.add(key);\n }\n return acc;\n },\n acc,\n );\n }, [\n nodes,\n disabledKeysProp,\n expandedKeysProp,\n selectedKeysProp,\n visibleKeysProp,\n ]);\n\n const handleSelectionChange = selectedKeys\n ? (selection: Selection) => {\n if (selection !== 'all') {\n onSelectionChange?.(selection);\n }\n }\n : undefined;\n\n return (\n <TreeContext.Provider\n value={{\n disabledKeys,\n expandedKeys,\n selectedKeys,\n showRuleLines,\n showVisibility,\n variant,\n visibleKeys,\n visibilityComputedKeys,\n isStatic: typeof children !== 'function',\n onVisibilityChange: onVisibilityChange ?? (() => undefined), // TODO: improve\n }}\n >\n <AriaTree\n {...rest}\n className={composeRenderProps(className, (className) =>\n clsx(styles.tree, className),\n )}\n disabledKeys={disabledKeys}\n dragAndDropHooks={dragAndDropHooks}\n expandedKeys={expandedKeys}\n items={items}\n selectedKeys={selectedKeys}\n onSelectionChange={handleSelectionChange}\n selectionMode={selectionMode}\n >\n {children}\n </AriaTree>\n </TreeContext.Provider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,8BAA8B,WAAuB;AAIzD,QACE,oBAAC;EACS;EACR,WALF,OAAO,SAAS,WACf,OAAO,iBAAiB,YAAY,OAAO,iBAAiB,WAKxC,OAAO,uBAAuB,OAAO;GAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CN,SAAgB,KAAQ,EACtB,UACA,WACA,cAAc,kBACd,mBACA,cAAc,kBACd,OACA,cAAc,kBACd,gBAAgB,MAChB,iBAAiB,MACjB,gBAAgB,YAChB,UAAU,QACV,aAAa,iBACb,oBACA,mBACA,GAAG,QACY;;;;;;;AAOf,KACE,UACC,oBACC,oBACA,oBACA,iBAEF,OAAM,IAAI,MACR,wFACD;;;;AAMH,KAAI,CAAC,CAAC,WAAW,OAAO,aAAa,YACnC,OAAM,IAAI,MACR,kEACD;CAGH,MAAM,EAAE,qBAAqB,eAAe;EAC1C,qBAAqB;EACrB,gCAAgC,CAAC,OAAO;EACxC,wBAAwB;EACxB,GAAG;EACJ,CAAC;CACF,MAAM,QAAQ,cAAe,QAAQ,IAAI,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,MAAO,CAAC,MAAM,CAAC;CAC5E,MAAM,QAAQ,cAAc,OAAO,aAAa,EAAE,CAAC,MAAM,CAAC;CAC1D,MAAM,EACJ,cACA,cACA,cACA,aACA,2BACE,cAAc;EAChB,MAAM,MAAM;GACV,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,cAAc,wBAAQ,IAAI,KAAU,GAAG;GACvC,aAAa,wBAAQ,IAAI,KAAU,GAAG;GACtC,wCAAwB,IAAI,KAAU;GACvC;AAED,MAAI,CAAC,MACH,QAAO;AAGT,SAAO,MAAM,QAET,OACA,EACE,KACA,YACA,YACA,YACA,WACA,wBAEC;AACH,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,WACF,OAAI,cAAc,IAAI,IAAI;AAE5B,OAAI,UACF,OAAI,aAAa,IAAI,IAAI;AAE3B,OAAI,kBACF,OAAI,uBAAuB,IAAI,IAAI;AAErC,UAAOA;KAET,IACD;IACA;EACD;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,wBAAwB,gBACzB,cAAyB;AACxB,MAAI,cAAc,MAChB,qBAAoB,UAAU;KAGlC;AAEJ,QACE,oBAAC,YAAY;EACX,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,UAAU,OAAO,aAAa;GAC9B,oBAAoB,6BAA6B;GAClD;YAED,oBAACC;GACC,GAAI;GACJ,WAAW,mBAAmB,YAAY,gBACxC,KAAK,OAAO,MAAMC,YAAU,CAC7B;GACa;GACI;GACJ;GACP;GACO;GACd,mBAAmB;GACJ;GAEd;IACQ;GACU"}
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { PropsWithChildren } from "react";
14
- import * as react_jsx_runtime201 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime199 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/tree/item-actions.d.ts
17
17
 
@@ -39,7 +39,7 @@ declare function TreeItemActions({
39
39
  className
40
40
  }: PropsWithChildren & {
41
41
  className?: string;
42
- }): react_jsx_runtime201.JSX.Element;
42
+ }): react_jsx_runtime199.JSX.Element;
43
43
  //#endregion
44
44
  export { TreeItemActions };
45
45
  //# sourceMappingURL=item-actions.d.ts.map
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { TreeItemContentProps } from "./types.js";
14
- import * as react_jsx_runtime99 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime198 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/tree/item-content.d.ts
17
17
 
@@ -35,7 +35,7 @@ import * as react_jsx_runtime99 from "react/jsx-runtime";
35
35
  */
36
36
  declare function TreeItemContent({
37
37
  children
38
- }: TreeItemContentProps): react_jsx_runtime99.JSX.Element;
38
+ }: TreeItemContentProps): react_jsx_runtime198.JSX.Element;
39
39
  //#endregion
40
40
  export { TreeItemContent };
41
41
  //# sourceMappingURL=item-content.d.ts.map
@@ -49,11 +49,14 @@ import Show from "@accelint/icons/show";
49
49
  */
50
50
  function TreeItemContent({ children }) {
51
51
  const { showVisibility, variant, visibleKeys, onVisibilityChange } = useContext(TreeContext);
52
- const { isVisible, isViewable } = useContext(TreeItemContext);
52
+ const { isVisible, isViewable, ancestors } = useContext(TreeItemContext);
53
53
  const size = variant === "cozy" ? "medium" : "small";
54
54
  return /* @__PURE__ */ jsx(TreeItemContent$1, { children: (renderProps) => {
55
55
  const { id, allowsDragging, hasChildItems, level, selectionBehavior, selectionMode, state, isDisabled, isExpanded, isSelected } = renderProps;
56
- const isLastOfSet = !(state.collection.getItem(id)?.nextKey || hasChildItems);
56
+ const isLastOfSet = !state.collection.getItem(id)?.nextKey;
57
+ const ancestorLastOfSet = ancestors.slice(0, -1).map((ancestorKey) => {
58
+ return !state.collection.getItem(ancestorKey)?.nextKey;
59
+ });
57
60
  const shouldShowSelection = selectionBehavior === "toggle" && selectionMode !== "none";
58
61
  const handlePress = () => {
59
62
  const keys = new Set(visibleKeys);
@@ -77,15 +80,16 @@ function TreeItemContent({ children }) {
77
80
  }),
78
81
  level > 1 && /* @__PURE__ */ jsx(TreeLines, {
79
82
  level,
80
- isLastOfSet
83
+ isLastOfSet,
84
+ ancestorLastOfSet
81
85
  }),
82
- hasChildItems ? /* @__PURE__ */ jsx(Button$1, {
86
+ hasChildItems && /* @__PURE__ */ jsx(Button$1, {
83
87
  slot: "chevron",
84
88
  variant: "icon",
85
89
  size,
86
90
  className: styles.expansion,
87
91
  children: /* @__PURE__ */ jsx(Icon, { children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, {}) : /* @__PURE__ */ jsx(ChevronUp, {}) })
88
- }) : /* @__PURE__ */ jsx("div", { className: clsx(styles.spacing, styles[variant]) }),
92
+ }),
89
93
  /* @__PURE__ */ jsx("div", {
90
94
  className: clsx(styles.display, styles[variant]),
91
95
  children: typeof children === "function" ? children({
@@ -1 +1 @@
1
- {"version":3,"file":"item-content.js","names":["AriaTreeItemContent","Button","Checkbox"],"sources":["../../../src/components/tree/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ChevronDown from '@accelint/icons/chevron-down';\nimport ChevronUp from '@accelint/icons/chevron-up';\nimport DragVert from '@accelint/icons/drag-vert';\nimport Hide from '@accelint/icons/hide';\nimport Show from '@accelint/icons/show';\nimport { useContext } from 'react';\nimport { TreeItemContent as AriaTreeItemContent } from 'react-aria-components';\nimport { Button } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { Icon } from '../icon';\nimport { IconProvider } from '../icon/context';\nimport { TreeContext, TreeItemContext } from './context';\nimport { TreeLines } from './lines';\nimport styles from './styles.module.css';\nimport type { Key } from '@react-types/shared';\nimport type { TreeItemContentProps } from './types';\n\n/**\n * TreeItemContent - Renders the display content of a tree node\n *\n * @example\n * ```tsx\n * <TreeItem id=\"node\" textValue=\"Node\">\n * <TreeItemContent>\n * <TreeItemPrefixIcon><Folder /></TreeItemPrefixIcon>\n * <TreeItemLabel>Folder Name</TreeItemLabel>\n * <TreeItemDescription>Contains 5 items</TreeItemDescription>\n * </TreeItemContent>\n * </TreeItem>\n * ```\n *\n * @param props - {@link TreeItemContentProps}\n * @param props.children - Content to render, or a render function receiving TreeItemContentRenderProps.\n * @returns The rendered TreeItemContent component.\n */\nexport function TreeItemContent({ children }: TreeItemContentProps) {\n const { showVisibility, variant, visibleKeys, onVisibilityChange } =\n useContext(TreeContext);\n const { isVisible, isViewable } = useContext(TreeItemContext);\n const size = variant === 'cozy' ? 'medium' : 'small';\n\n return (\n <AriaTreeItemContent>\n {(renderProps) => {\n const {\n id,\n allowsDragging,\n hasChildItems,\n level,\n selectionBehavior,\n selectionMode,\n state,\n isDisabled,\n isExpanded,\n isSelected,\n } = renderProps;\n\n const isLastOfSet = !(\n state.collection.getItem(id)?.nextKey || hasChildItems\n );\n const shouldShowSelection =\n selectionBehavior === 'toggle' && selectionMode !== 'none';\n\n const handlePress = () => {\n const keys = new Set<Key>(visibleKeys);\n visibleKeys?.has(id) ? keys.delete(id) : keys.add(id);\n onVisibilityChange?.(keys);\n };\n\n return (\n <IconProvider size={size}>\n <div\n className={clsx('group', styles.content, styles[variant])}\n data-last-of-set={isLastOfSet}\n >\n {showVisibility && (\n <Button\n variant='icon'\n color='mono-bold'\n size={size}\n onPress={handlePress}\n isDisabled={isDisabled}\n className={styles.visibility}\n >\n <Icon>{isVisible ? <Show /> : <Hide />}</Icon>\n </Button>\n )}\n {level > 1 && (\n <TreeLines level={level} isLastOfSet={isLastOfSet} />\n )}\n {hasChildItems ? (\n <Button\n slot='chevron'\n variant='icon'\n size={size}\n className={styles.expansion}\n >\n <Icon>{isExpanded ? <ChevronDown /> : <ChevronUp />}</Icon>\n </Button>\n ) : (\n <div className={clsx(styles.spacing, styles[variant])} />\n )}\n <div className={clsx(styles.display, styles[variant])}>\n {typeof children === 'function'\n ? children({\n ...renderProps,\n variant,\n isVisible,\n isViewable: isViewable,\n defaultChildren: null,\n })\n : children}\n </div>\n {shouldShowSelection && (\n <Checkbox\n slot='selection'\n isSelected={isSelected}\n isDisabled={isDisabled}\n />\n )}\n {allowsDragging && (\n <Button\n slot='drag'\n variant='icon'\n size={size}\n isDisabled={isDisabled}\n className={styles.drag}\n >\n <Icon>\n <DragVert />\n </Icon>\n </Button>\n )}\n </div>\n </IconProvider>\n );\n }}\n </AriaTreeItemContent>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,gBAAgB,EAAE,YAAkC;CAClE,MAAM,EAAE,gBAAgB,SAAS,aAAa,uBAC5C,WAAW,YAAY;CACzB,MAAM,EAAE,WAAW,eAAe,WAAW,gBAAgB;CAC7D,MAAM,OAAO,YAAY,SAAS,WAAW;AAE7C,QACE,oBAACA,gCACG,gBAAgB;EAChB,MAAM,EACJ,IACA,gBACA,eACA,OACA,mBACA,eACA,OACA,YACA,YACA,eACE;EAEJ,MAAM,cAAc,EAClB,MAAM,WAAW,QAAQ,GAAG,EAAE,WAAW;EAE3C,MAAM,sBACJ,sBAAsB,YAAY,kBAAkB;EAEtD,MAAM,oBAAoB;GACxB,MAAM,OAAO,IAAI,IAAS,YAAY;AACtC,gBAAa,IAAI,GAAG,GAAG,KAAK,OAAO,GAAG,GAAG,KAAK,IAAI,GAAG;AACrD,wBAAqB,KAAK;;AAG5B,SACE,oBAAC;GAAmB;aAClB,qBAAC;IACC,WAAW,KAAK,SAAS,OAAO,SAAS,OAAO,SAAS;IACzD,oBAAkB;;KAEjB,kBACC,oBAACC;MACC,SAAQ;MACR,OAAM;MACA;MACN,SAAS;MACG;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBAAM,YAAY,oBAAC,SAAO,GAAG,oBAAC,SAAO,GAAQ;OACvC;KAEV,QAAQ,KACP,oBAAC;MAAiB;MAAoB;OAAe;KAEtD,gBACC,oBAACA;MACC,MAAK;MACL,SAAQ;MACF;MACN,WAAW,OAAO;gBAElB,oBAAC,kBAAM,aAAa,oBAAC,gBAAc,GAAG,oBAAC,cAAY,GAAQ;OACpD,GAET,oBAAC,SAAI,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS,GAAI;KAE3D,oBAAC;MAAI,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS;gBAClD,OAAO,aAAa,aACjB,SAAS;OACP,GAAG;OACH;OACA;OACY;OACZ,iBAAiB;OAClB,CAAC,GACF;OACA;KACL,uBACC,oBAACC;MACC,MAAK;MACO;MACA;OACZ;KAEH,kBACC,oBAACD;MACC,MAAK;MACL,SAAQ;MACF;MACM;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBACC,oBAAC,aAAW,GACP;OACA;;KAEP;IACO;KAGC"}
1
+ {"version":3,"file":"item-content.js","names":["AriaTreeItemContent","Button","Checkbox"],"sources":["../../../src/components/tree/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ChevronDown from '@accelint/icons/chevron-down';\nimport ChevronUp from '@accelint/icons/chevron-up';\nimport DragVert from '@accelint/icons/drag-vert';\nimport Hide from '@accelint/icons/hide';\nimport Show from '@accelint/icons/show';\nimport { useContext } from 'react';\nimport { TreeItemContent as AriaTreeItemContent } from 'react-aria-components';\nimport { Button } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { Icon } from '../icon';\nimport { IconProvider } from '../icon/context';\nimport { TreeContext, TreeItemContext } from './context';\nimport { TreeLines } from './lines';\nimport styles from './styles.module.css';\nimport type { Key } from '@react-types/shared';\nimport type { TreeItemContentProps } from './types';\n\n/**\n * TreeItemContent - Renders the display content of a tree node\n *\n * @example\n * ```tsx\n * <TreeItem id=\"node\" textValue=\"Node\">\n * <TreeItemContent>\n * <TreeItemPrefixIcon><Folder /></TreeItemPrefixIcon>\n * <TreeItemLabel>Folder Name</TreeItemLabel>\n * <TreeItemDescription>Contains 5 items</TreeItemDescription>\n * </TreeItemContent>\n * </TreeItem>\n * ```\n *\n * @param props - {@link TreeItemContentProps}\n * @param props.children - Content to render, or a render function receiving TreeItemContentRenderProps.\n * @returns The rendered TreeItemContent component.\n */\nexport function TreeItemContent({ children }: TreeItemContentProps) {\n const { showVisibility, variant, visibleKeys, onVisibilityChange } =\n useContext(TreeContext);\n const { isVisible, isViewable, ancestors } = useContext(TreeItemContext);\n const size = variant === 'cozy' ? 'medium' : 'small';\n\n return (\n <AriaTreeItemContent>\n {(renderProps) => {\n const {\n id,\n allowsDragging,\n hasChildItems,\n level,\n selectionBehavior,\n selectionMode,\n state,\n isDisabled,\n isExpanded,\n isSelected,\n } = renderProps;\n\n const item = state.collection.getItem(id);\n const isLastOfSet = !item?.nextKey;\n\n // Determine if ancestors are last of set (excludes current item)\n const ancestorLastOfSet = ancestors.slice(0, -1).map((ancestorKey) => {\n const ancestorItem = state.collection.getItem(ancestorKey);\n return !ancestorItem?.nextKey;\n });\n\n const shouldShowSelection =\n selectionBehavior === 'toggle' && selectionMode !== 'none';\n\n const handlePress = () => {\n const keys = new Set<Key>(visibleKeys);\n visibleKeys?.has(id) ? keys.delete(id) : keys.add(id);\n onVisibilityChange?.(keys);\n };\n\n return (\n <IconProvider size={size}>\n <div\n className={clsx('group', styles.content, styles[variant])}\n data-last-of-set={isLastOfSet}\n >\n {showVisibility && (\n <Button\n variant='icon'\n color='mono-bold'\n size={size}\n onPress={handlePress}\n isDisabled={isDisabled}\n className={styles.visibility}\n >\n <Icon>{isVisible ? <Show /> : <Hide />}</Icon>\n </Button>\n )}\n {level > 1 && (\n <TreeLines\n level={level}\n isLastOfSet={isLastOfSet}\n ancestorLastOfSet={ancestorLastOfSet}\n />\n )}\n {hasChildItems && (\n <Button\n slot='chevron'\n variant='icon'\n size={size}\n className={styles.expansion}\n >\n <Icon>{isExpanded ? <ChevronDown /> : <ChevronUp />}</Icon>\n </Button>\n )}\n <div className={clsx(styles.display, styles[variant])}>\n {typeof children === 'function'\n ? children({\n ...renderProps,\n variant,\n isVisible,\n isViewable: isViewable,\n defaultChildren: null,\n })\n : children}\n </div>\n {shouldShowSelection && (\n <Checkbox\n slot='selection'\n isSelected={isSelected}\n isDisabled={isDisabled}\n />\n )}\n {allowsDragging && (\n <Button\n slot='drag'\n variant='icon'\n size={size}\n isDisabled={isDisabled}\n className={styles.drag}\n >\n <Icon>\n <DragVert />\n </Icon>\n </Button>\n )}\n </div>\n </IconProvider>\n );\n }}\n </AriaTreeItemContent>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,gBAAgB,EAAE,YAAkC;CAClE,MAAM,EAAE,gBAAgB,SAAS,aAAa,uBAC5C,WAAW,YAAY;CACzB,MAAM,EAAE,WAAW,YAAY,cAAc,WAAW,gBAAgB;CACxE,MAAM,OAAO,YAAY,SAAS,WAAW;AAE7C,QACE,oBAACA,gCACG,gBAAgB;EAChB,MAAM,EACJ,IACA,gBACA,eACA,OACA,mBACA,eACA,OACA,YACA,YACA,eACE;EAGJ,MAAM,cAAc,CADP,MAAM,WAAW,QAAQ,GAAG,EACd;EAG3B,MAAM,oBAAoB,UAAU,MAAM,GAAG,GAAG,CAAC,KAAK,gBAAgB;AAEpE,UAAO,CADc,MAAM,WAAW,QAAQ,YAAY,EACpC;IACtB;EAEF,MAAM,sBACJ,sBAAsB,YAAY,kBAAkB;EAEtD,MAAM,oBAAoB;GACxB,MAAM,OAAO,IAAI,IAAS,YAAY;AACtC,gBAAa,IAAI,GAAG,GAAG,KAAK,OAAO,GAAG,GAAG,KAAK,IAAI,GAAG;AACrD,wBAAqB,KAAK;;AAG5B,SACE,oBAAC;GAAmB;aAClB,qBAAC;IACC,WAAW,KAAK,SAAS,OAAO,SAAS,OAAO,SAAS;IACzD,oBAAkB;;KAEjB,kBACC,oBAACC;MACC,SAAQ;MACR,OAAM;MACA;MACN,SAAS;MACG;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBAAM,YAAY,oBAAC,SAAO,GAAG,oBAAC,SAAO,GAAQ;OACvC;KAEV,QAAQ,KACP,oBAAC;MACQ;MACM;MACM;OACnB;KAEH,iBACC,oBAACA;MACC,MAAK;MACL,SAAQ;MACF;MACN,WAAW,OAAO;gBAElB,oBAAC,kBAAM,aAAa,oBAAC,gBAAc,GAAG,oBAAC,cAAY,GAAQ;OACpD;KAEX,oBAAC;MAAI,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS;gBAClD,OAAO,aAAa,aACjB,SAAS;OACP,GAAG;OACH;OACA;OACY;OACZ,iBAAiB;OAClB,CAAC,GACF;OACA;KACL,uBACC,oBAACC;MACC,MAAK;MACO;MACA;OACZ;KAEH,kBACC,oBAACD;MACC,MAAK;MACL,SAAQ;MACF;MACM;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBACC,oBAAC,aAAW,GACP;OACA;;KAEP;IACO;KAGC"}
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { TextProps } from "react-aria-components";
14
- import * as react_jsx_runtime204 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime200 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/tree/item-description.d.ts
17
17
  /**
@@ -33,7 +33,7 @@ import * as react_jsx_runtime204 from "react/jsx-runtime";
33
33
  declare function TreeItemDescription({
34
34
  children,
35
35
  className
36
- }: TextProps): react_jsx_runtime204.JSX.Element | null;
36
+ }: TextProps): react_jsx_runtime200.JSX.Element | null;
37
37
  //#endregion
38
38
  export { TreeItemDescription };
39
39
  //# sourceMappingURL=item-description.d.ts.map
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { TextProps } from "react-aria-components";
14
- import * as react_jsx_runtime179 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime197 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/tree/item-label.d.ts
17
17
  /**
@@ -33,7 +33,7 @@ import * as react_jsx_runtime179 from "react/jsx-runtime";
33
33
  declare function TreeItemLabel({
34
34
  children,
35
35
  className
36
- }: TextProps): react_jsx_runtime179.JSX.Element;
36
+ }: TextProps): react_jsx_runtime197.JSX.Element;
37
37
  //#endregion
38
38
  export { TreeItemLabel };
39
39
  //# sourceMappingURL=item-label.d.ts.map
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { IconProps } from "../icon/types.js";
14
- import * as react_jsx_runtime180 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime195 from "react/jsx-runtime";
15
15
 
16
16
  //#region src/components/tree/item-prefix-icon.d.ts
17
17
  /**
@@ -33,7 +33,7 @@ import * as react_jsx_runtime180 from "react/jsx-runtime";
33
33
  declare function TreeItemPrefixIcon({
34
34
  children,
35
35
  className
36
- }: IconProps): react_jsx_runtime180.JSX.Element;
36
+ }: IconProps): react_jsx_runtime195.JSX.Element;
37
37
  //#endregion
38
38
  export { TreeItemPrefixIcon };
39
39
  //# sourceMappingURL=item-prefix-icon.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { TreeItemProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime181 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime201 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/tree/item.d.ts
18
18
 
@@ -44,7 +44,7 @@ declare function TreeItem({
44
44
  className,
45
45
  id,
46
46
  ...rest
47
- }: TreeItemProps): react_jsx_runtime181.JSX.Element;
47
+ }: TreeItemProps): react_jsx_runtime201.JSX.Element;
48
48
  //#endregion
49
49
  export { TreeItem };
50
50
  //# sourceMappingURL=item.d.ts.map
@@ -10,7 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import * as react44 from "react";
13
+ import * as react52 from "react";
14
14
 
15
15
  //#region src/components/tree/lines.d.ts
16
16
  /**
@@ -19,11 +19,13 @@ import * as react44 from "react";
19
19
  * @param props - Component props.
20
20
  * @param props.level - The nesting level of the tree item.
21
21
  * @param props.isLastOfSet - Whether this item is the last in its sibling group.
22
+ * @param props.ancestorLastOfSet - Array tracking which ancestors are last of set at each level.
22
23
  * @returns An array of Line components representing the tree structure.
23
24
  */
24
- declare const TreeLines: react44.NamedExoticComponent<{
25
+ declare const TreeLines: react52.NamedExoticComponent<{
25
26
  level: number;
26
27
  isLastOfSet: boolean;
28
+ ancestorLastOfSet: boolean[];
27
29
  }>;
28
30
  //#endregion
29
31
  export { TreeLines };
@@ -25,16 +25,20 @@ import styles from "./styles.module.css";
25
25
  * @param props - Component props.
26
26
  * @param props.level - The nesting level of the tree item.
27
27
  * @param props.isLastOfSet - Whether this item is the last in its sibling group.
28
+ * @param props.ancestorLastOfSet - Array tracking which ancestors are last of set at each level.
28
29
  * @returns An array of Line components representing the tree structure.
29
30
  */
30
- const TreeLines = memo(function TreeLines$1({ level, isLastOfSet }) {
31
+ const TreeLines = memo(function TreeLines$1({ level, isLastOfSet, ancestorLastOfSet }) {
31
32
  const { showRuleLines, variant } = useContext(TreeContext);
32
33
  return Array.from({ length: level }).map((_, i) => {
33
34
  const type = i === level - 1 ? "branch" : "vert";
35
+ const line = isLastOfSet && i === level - 1 ? "last" : type;
36
+ const size = variant === "crammed" ? "medium" : "large";
37
+ const shouldHideLine = ancestorLastOfSet[i] ?? false;
34
38
  return /* @__PURE__ */ jsx(Lines, {
35
- variant: isLastOfSet && i > 0 ? "last" : type,
36
- size: variant === "crammed" ? "medium" : "large",
37
- isVisible: showRuleLines,
39
+ variant: line,
40
+ size,
41
+ isVisible: showRuleLines && !shouldHideLine,
38
42
  className: clsx(styles.spacing, styles[variant])
39
43
  }, i);
40
44
  });
@@ -1 +1 @@
1
- {"version":3,"file":"lines.js","names":["TreeLines"],"sources":["../../../src/components/tree/lines.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { memo, useContext } from 'react';\nimport { Lines } from '../lines';\nimport { TreeContext } from './context';\nimport styles from './styles.module.css';\n\n/**\n * TreeLines - Renders connecting lines for tree hierarchy visualization.\n *\n * @param props - Component props.\n * @param props.level - The nesting level of the tree item.\n * @param props.isLastOfSet - Whether this item is the last in its sibling group.\n * @returns An array of Line components representing the tree structure.\n */\nexport const TreeLines = memo(function TreeLines({\n level,\n isLastOfSet,\n}: {\n level: number;\n isLastOfSet: boolean;\n}) {\n const { showRuleLines, variant } = useContext(TreeContext);\n\n return Array.from({ length: level }).map((_, i) => {\n const type = i === level - 1 ? 'branch' : 'vert';\n const line = isLastOfSet && i > 0 ? 'last' : type;\n const size = variant === 'crammed' ? 'medium' : 'large';\n\n return (\n <Lines\n // biome-ignore lint/suspicious/noArrayIndexKey: index should be the key, only count matters\n key={i}\n variant={line}\n size={size}\n isVisible={showRuleLines}\n className={clsx(styles.spacing, styles[variant])}\n />\n );\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,YAAY,KAAK,SAASA,YAAU,EAC/C,OACA,eAIC;CACD,MAAM,EAAE,eAAe,YAAY,WAAW,YAAY;AAE1D,QAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,CAAC,KAAK,GAAG,MAAM;EACjD,MAAM,OAAO,MAAM,QAAQ,IAAI,WAAW;AAI1C,SACE,oBAAC;GAGC,SAPS,eAAe,IAAI,IAAI,SAAS;GAQzC,MAPS,YAAY,YAAY,WAAW;GAQ5C,WAAW;GACX,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS;KAJ3C,EAKL;GAEJ;EACF"}
1
+ {"version":3,"file":"lines.js","names":["TreeLines"],"sources":["../../../src/components/tree/lines.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport { memo, useContext } from 'react';\nimport { Lines } from '../lines';\nimport { TreeContext } from './context';\nimport styles from './styles.module.css';\n\n/**\n * TreeLines - Renders connecting lines for tree hierarchy visualization.\n *\n * @param props - Component props.\n * @param props.level - The nesting level of the tree item.\n * @param props.isLastOfSet - Whether this item is the last in its sibling group.\n * @param props.ancestorLastOfSet - Array tracking which ancestors are last of set at each level.\n * @returns An array of Line components representing the tree structure.\n */\nexport const TreeLines = memo(function TreeLines({\n level,\n isLastOfSet,\n ancestorLastOfSet,\n}: {\n level: number;\n isLastOfSet: boolean;\n ancestorLastOfSet: boolean[];\n}) {\n const { showRuleLines, variant } = useContext(TreeContext);\n\n return Array.from({ length: level }).map((_, i) => {\n const type = i === level - 1 ? 'branch' : 'vert';\n const line = isLastOfSet && i === level - 1 ? 'last' : type;\n const size = variant === 'crammed' ? 'medium' : 'large';\n\n // Hide line at position i if the ancestor at that level is last of set\n const shouldHideLine = ancestorLastOfSet[i] ?? false;\n\n return (\n <Lines\n // biome-ignore lint/suspicious/noArrayIndexKey: index should be the key, only count matters\n key={i}\n variant={line}\n size={size}\n isVisible={showRuleLines && !shouldHideLine}\n className={clsx(styles.spacing, styles[variant])}\n />\n );\n });\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,YAAY,KAAK,SAASA,YAAU,EAC/C,OACA,aACA,qBAKC;CACD,MAAM,EAAE,eAAe,YAAY,WAAW,YAAY;AAE1D,QAAO,MAAM,KAAK,EAAE,QAAQ,OAAO,CAAC,CAAC,KAAK,GAAG,MAAM;EACjD,MAAM,OAAO,MAAM,QAAQ,IAAI,WAAW;EAC1C,MAAM,OAAO,eAAe,MAAM,QAAQ,IAAI,SAAS;EACvD,MAAM,OAAO,YAAY,YAAY,WAAW;EAGhD,MAAM,iBAAiB,kBAAkB,MAAM;AAE/C,SACE,oBAAC;GAGC,SAAS;GACH;GACN,WAAW,iBAAiB,CAAC;GAC7B,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS;KAJ3C,EAKL;GAEJ;EACF"}
@@ -29,7 +29,7 @@
29
29
  }
30
30
 
31
31
  @variant hover {
32
- @apply bg-interactive-muted-hover;
32
+ @apply bg-interactive-muted-hover/50;
33
33
  }
34
34
 
35
35
  @variant focus-visible {
@@ -41,12 +41,12 @@
41
41
  }
42
42
 
43
43
  @variant drop-target {
44
- @apply outline-accent-primary-bold border;
44
+ @apply outline-accent-primary-bold outline;
45
45
  background-color: --alpha(var(--bg-accent-primary-muted) / 20%);
46
46
  }
47
47
 
48
48
  @variant disabled {
49
- @apply cursor-not-allowed border-none;
49
+ @apply fg-disabled cursor-not-allowed border-none;
50
50
 
51
51
  @variant hover {
52
52
  @apply bg-transparent;
@@ -55,6 +55,10 @@
55
55
  @variant data-[drop-target=true] {
56
56
  @apply bg-transparent;
57
57
  }
58
+
59
+ .description {
60
+ @apply fg-disabled;
61
+ }
58
62
  }
59
63
 
60
64
  &.cozy {
@@ -184,4 +188,20 @@
184
188
  .dropIndicator {
185
189
  @apply h-xxs bg-(--outline-accent-primary-hover);
186
190
  }
191
+
192
+ .dropIndicatorBetween {
193
+ @apply h-xs my-xs rounded-full bg-(--outline-accent-primary-hover);
194
+ }
195
+ }
196
+
197
+ @layer components.l2 {
198
+ .visibility {
199
+ @variant group-not-viewable/tree-item {
200
+ @apply fg-primary-muted;
201
+
202
+ @variant disabled {
203
+ @apply fg-disabled;
204
+ }
205
+ }
206
+ }
187
207
  }
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { VideoProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime182 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime203 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/video/index.d.ts
18
18
 
@@ -91,7 +91,7 @@ declare function Video({
91
91
  noMutedPref,
92
92
  lang,
93
93
  ...rest
94
- }: VideoProps): react_jsx_runtime182.JSX.Element;
94
+ }: VideoProps): react_jsx_runtime203.JSX.Element;
95
95
  //#endregion
96
96
  export { Video };
97
97
  //# sourceMappingURL=index.d.ts.map
@@ -12,12 +12,12 @@
12
12
 
13
13
  import { ViewStackContextValue } from "./types.js";
14
14
  import "client-only";
15
- import * as react45 from "react";
15
+ import * as react44 from "react";
16
16
  import { UniqueId } from "@accelint/core";
17
17
 
18
18
  //#region src/components/view-stack/context.d.ts
19
19
  /** Context for sharing state across ViewStack components */
20
- declare const ViewStackContext: react45.Context<ViewStackContextValue>;
20
+ declare const ViewStackContext: react44.Context<ViewStackContextValue>;
21
21
  /** Event handlers for ViewStack events */
22
22
  declare const ViewStackEventHandlers: {
23
23
  readonly back: (stack: UniqueId) => void;
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ViewStackProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime183 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime186 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/view-stack/index.d.ts
18
18
 
@@ -47,7 +47,7 @@ declare function ViewStack({
47
47
  children,
48
48
  defaultView,
49
49
  onChange
50
- }: ViewStackProps): react_jsx_runtime183.JSX.Element;
50
+ }: ViewStackProps): react_jsx_runtime186.JSX.Element;
51
51
  //#endregion
52
52
  export { ViewStack };
53
53
  //# sourceMappingURL=index.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ViewStackTriggerProps } from "./types.js";
14
14
  import "client-only";
15
- import * as react_jsx_runtime184 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime187 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/components/view-stack/trigger.d.ts
18
18
 
@@ -45,7 +45,7 @@ import * as react_jsx_runtime184 from "react/jsx-runtime";
45
45
  declare function ViewStackTrigger({
46
46
  children,
47
47
  for: types
48
- }: ViewStackTriggerProps): react_jsx_runtime184.JSX.Element;
48
+ }: ViewStackTriggerProps): react_jsx_runtime187.JSX.Element;
49
49
  //#endregion
50
50
  export { ViewStackTrigger };
51
51
  //# sourceMappingURL=trigger.d.ts.map