@techsio/ui-kit 0.56.1 → 0.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/README.md +128 -133
  2. package/dist/atoms/action-icon.js +9 -8
  3. package/dist/atoms/button.js +78 -18
  4. package/dist/atoms/checkbox.js +77 -17
  5. package/dist/atoms/hotkeys.js +26 -7
  6. package/dist/atoms/icon.js +5 -5
  7. package/dist/atoms/image.js +107 -2
  8. package/dist/atoms/input.js +57 -9
  9. package/dist/atoms/label.js +13 -4
  10. package/dist/atoms/link-button.js +14 -12
  11. package/dist/atoms/link.js +18 -4
  12. package/dist/atoms/numeric-input.js +293 -76
  13. package/dist/atoms/rating.js +306 -73
  14. package/dist/atoms/skeleton.js +18 -14
  15. package/dist/atoms/status-text.js +31 -18
  16. package/dist/atoms/textarea.js +59 -12
  17. package/dist/atoms/tooltip.js +64 -43
  18. package/dist/hotkeys.js +1 -0
  19. package/dist/internal/choice-control.js +173 -0
  20. package/dist/internal/combobox-query-sync.js +11 -0
  21. package/dist/internal/date-picker-coordinator.js +56 -40
  22. package/dist/internal/date-picker-dom.js +44 -0
  23. package/dist/internal/date-picker-input.js +30 -0
  24. package/dist/internal/described-by.js +23 -18
  25. package/dist/internal/form-control-lifecycle.js +122 -0
  26. package/dist/internal/molecules/command.context.js +1 -0
  27. package/dist/internal/molecules/drawer.context.js +1 -0
  28. package/dist/internal/molecules/vertical-navigation.context.js +1 -0
  29. package/dist/internal/molecules/vertical-navigation.styles.js +9 -2
  30. package/dist/internal/numeric-input-editing.js +87 -0
  31. package/dist/internal/organisms/sidebar.context.js +1 -0
  32. package/dist/internal/organisms/sidebar.focus.js +1 -0
  33. package/dist/internal/overlay-portal.js +72 -0
  34. package/dist/internal/reduced-motion.js +1 -0
  35. package/dist/internal/use-effective-disabled.js +8 -0
  36. package/dist/molecules/accordion.js +44 -30
  37. package/dist/molecules/availability-status.js +1 -0
  38. package/dist/molecules/breadcrumb.js +11 -11
  39. package/dist/molecules/carousel.js +279 -97
  40. package/dist/molecules/cascade-select.js +327 -81
  41. package/dist/molecules/chart.js +276 -38
  42. package/dist/molecules/color-select.js +181 -62
  43. package/dist/molecules/combobox.js +535 -182
  44. package/dist/molecules/command.js +2 -1
  45. package/dist/molecules/date-picker.js +571 -119
  46. package/dist/molecules/dialog.js +81 -47
  47. package/dist/molecules/drawer.js +54 -5
  48. package/dist/molecules/file-upload.js +373 -37
  49. package/dist/molecules/form-checkbox.js +65 -22
  50. package/dist/molecules/form-error-summary.js +29 -5
  51. package/dist/molecules/form-input.js +26 -30
  52. package/dist/molecules/form-numeric-input.js +11 -9
  53. package/dist/molecules/form-textarea.js +26 -23
  54. package/dist/molecules/menu.js +170 -47
  55. package/dist/molecules/pagination.js +100 -28
  56. package/dist/molecules/phone-input.js +172 -37
  57. package/dist/molecules/popover.js +53 -26
  58. package/dist/molecules/price-block.js +1 -0
  59. package/dist/molecules/product-card.js +23 -18
  60. package/dist/molecules/quantity-field.js +4 -2
  61. package/dist/molecules/radio-card.js +102 -30
  62. package/dist/molecules/radio-group.js +108 -31
  63. package/dist/molecules/search-form.js +116 -13
  64. package/dist/molecules/select.js +226 -81
  65. package/dist/molecules/slider.js +141 -30
  66. package/dist/molecules/steps.js +181 -50
  67. package/dist/molecules/switch.js +85 -20
  68. package/dist/molecules/tabs.js +227 -31
  69. package/dist/molecules/toast.js +146 -51
  70. package/dist/molecules/totals-summary.js +2 -1
  71. package/dist/molecules/tour.js +9 -5
  72. package/dist/molecules/tree-view.js +255 -109
  73. package/dist/molecules/vertical-navigation.js +8 -4
  74. package/dist/organisms/data-table.fields.js +25 -5
  75. package/dist/organisms/data-table.helpers.js +6 -2
  76. package/dist/organisms/data-table.js +580 -151
  77. package/dist/organisms/footer.js +18 -11
  78. package/dist/organisms/gallery.js +61 -24
  79. package/dist/organisms/header.js +106 -32
  80. package/dist/organisms/line-item.js +1 -0
  81. package/dist/organisms/sidebar.js +1 -0
  82. package/dist/organisms/table.js +22 -7
  83. package/dist/src/atoms/action-icon.d.ts +10 -10
  84. package/dist/src/atoms/action-icon.d.ts.map +1 -1
  85. package/dist/src/atoms/badge.d.ts +3 -3
  86. package/dist/src/atoms/badge.d.ts.map +1 -1
  87. package/dist/src/atoms/button.d.ts +35 -24
  88. package/dist/src/atoms/button.d.ts.map +1 -1
  89. package/dist/src/atoms/checkbox.d.ts +6 -5
  90. package/dist/src/atoms/checkbox.d.ts.map +1 -1
  91. package/dist/src/atoms/hotkeys.d.ts +3 -2
  92. package/dist/src/atoms/hotkeys.d.ts.map +1 -1
  93. package/dist/src/atoms/icon.d.ts +18 -17
  94. package/dist/src/atoms/icon.d.ts.map +1 -1
  95. package/dist/src/atoms/image.d.ts +14 -6
  96. package/dist/src/atoms/image.d.ts.map +1 -1
  97. package/dist/src/atoms/input.d.ts +23 -14
  98. package/dist/src/atoms/input.d.ts.map +1 -1
  99. package/dist/src/atoms/label.d.ts +4 -4
  100. package/dist/src/atoms/label.d.ts.map +1 -1
  101. package/dist/src/atoms/link-button.d.ts +54 -31
  102. package/dist/src/atoms/link-button.d.ts.map +1 -1
  103. package/dist/src/atoms/link.d.ts +30 -9
  104. package/dist/src/atoms/link.d.ts.map +1 -1
  105. package/dist/src/atoms/numeric-input.d.ts +23 -19
  106. package/dist/src/atoms/numeric-input.d.ts.map +1 -1
  107. package/dist/src/atoms/rating.d.ts +54 -26
  108. package/dist/src/atoms/rating.d.ts.map +1 -1
  109. package/dist/src/atoms/skeleton.d.ts +9 -9
  110. package/dist/src/atoms/skeleton.d.ts.map +1 -1
  111. package/dist/src/atoms/status-text.d.ts +21 -13
  112. package/dist/src/atoms/status-text.d.ts.map +1 -1
  113. package/dist/src/atoms/textarea.d.ts +22 -20
  114. package/dist/src/atoms/textarea.d.ts.map +1 -1
  115. package/dist/src/atoms/tooltip.d.ts +5 -5
  116. package/dist/src/atoms/tooltip.d.ts.map +1 -1
  117. package/dist/src/hotkeys.d.ts +1 -1
  118. package/dist/src/hotkeys.d.ts.map +1 -1
  119. package/dist/src/internal/choice-control.d.ts +18 -0
  120. package/dist/src/internal/choice-control.d.ts.map +1 -0
  121. package/dist/src/internal/combobox-query-sync.d.ts +4 -0
  122. package/dist/src/internal/combobox-query-sync.d.ts.map +1 -0
  123. package/dist/src/internal/date-picker-coordinator.d.ts +7 -1
  124. package/dist/src/internal/date-picker-coordinator.d.ts.map +1 -1
  125. package/dist/src/internal/date-picker-dom.d.ts +10 -0
  126. package/dist/src/internal/date-picker-dom.d.ts.map +1 -0
  127. package/dist/src/internal/date-picker-input.d.ts +7 -0
  128. package/dist/src/internal/date-picker-input.d.ts.map +1 -0
  129. package/dist/src/internal/described-by.d.ts +7 -1
  130. package/dist/src/internal/described-by.d.ts.map +1 -1
  131. package/dist/src/internal/form-control-lifecycle.d.ts +22 -0
  132. package/dist/src/internal/form-control-lifecycle.d.ts.map +1 -0
  133. package/dist/src/internal/molecules/vertical-navigation.context.d.ts +1 -1
  134. package/dist/src/internal/molecules/vertical-navigation.context.d.ts.map +1 -1
  135. package/dist/src/internal/molecules/vertical-navigation.styles.d.ts +21 -0
  136. package/dist/src/internal/molecules/vertical-navigation.styles.d.ts.map +1 -1
  137. package/dist/src/internal/numeric-input-editing.d.ts +13 -0
  138. package/dist/src/internal/numeric-input-editing.d.ts.map +1 -0
  139. package/dist/src/internal/overlay-portal.d.ts +18 -0
  140. package/dist/src/internal/overlay-portal.d.ts.map +1 -0
  141. package/dist/src/internal/use-effective-disabled.d.ts +4 -0
  142. package/dist/src/internal/use-effective-disabled.d.ts.map +1 -0
  143. package/dist/src/molecules/accordion.d.ts +25 -19
  144. package/dist/src/molecules/accordion.d.ts.map +1 -1
  145. package/dist/src/molecules/availability-status.d.ts +4 -1
  146. package/dist/src/molecules/availability-status.d.ts.map +1 -1
  147. package/dist/src/molecules/breadcrumb.d.ts +2 -2
  148. package/dist/src/molecules/breadcrumb.d.ts.map +1 -1
  149. package/dist/src/molecules/carousel.d.ts +51 -52
  150. package/dist/src/molecules/carousel.d.ts.map +1 -1
  151. package/dist/src/molecules/cascade-select.d.ts +23 -8
  152. package/dist/src/molecules/cascade-select.d.ts.map +1 -1
  153. package/dist/src/molecules/chart.d.ts +7 -1
  154. package/dist/src/molecules/chart.d.ts.map +1 -1
  155. package/dist/src/molecules/color-select.d.ts +19 -3
  156. package/dist/src/molecules/color-select.d.ts.map +1 -1
  157. package/dist/src/molecules/combobox.d.ts +23 -5
  158. package/dist/src/molecules/combobox.d.ts.map +1 -1
  159. package/dist/src/molecules/command.d.ts +1 -1
  160. package/dist/src/molecules/date-picker.d.ts +7 -3
  161. package/dist/src/molecules/date-picker.d.ts.map +1 -1
  162. package/dist/src/molecules/dialog.d.ts +7 -3
  163. package/dist/src/molecules/dialog.d.ts.map +1 -1
  164. package/dist/src/molecules/drawer.d.ts +4 -4
  165. package/dist/src/molecules/drawer.d.ts.map +1 -1
  166. package/dist/src/molecules/file-upload.d.ts +11 -6
  167. package/dist/src/molecules/file-upload.d.ts.map +1 -1
  168. package/dist/src/molecules/form-checkbox.d.ts +7 -2
  169. package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
  170. package/dist/src/molecules/form-error-summary.d.ts +4 -3
  171. package/dist/src/molecules/form-error-summary.d.ts.map +1 -1
  172. package/dist/src/molecules/form-input.d.ts +5 -6
  173. package/dist/src/molecules/form-input.d.ts.map +1 -1
  174. package/dist/src/molecules/form-numeric-input.d.ts +5 -5
  175. package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
  176. package/dist/src/molecules/form-textarea.d.ts +5 -6
  177. package/dist/src/molecules/form-textarea.d.ts.map +1 -1
  178. package/dist/src/molecules/menu.d.ts +17 -3
  179. package/dist/src/molecules/menu.d.ts.map +1 -1
  180. package/dist/src/molecules/pagination.d.ts +1 -1
  181. package/dist/src/molecules/pagination.d.ts.map +1 -1
  182. package/dist/src/molecules/phone-input.d.ts +4 -1
  183. package/dist/src/molecules/phone-input.d.ts.map +1 -1
  184. package/dist/src/molecules/popover.d.ts +7 -1
  185. package/dist/src/molecules/popover.d.ts.map +1 -1
  186. package/dist/src/molecules/price-block.d.ts +1 -1
  187. package/dist/src/molecules/price-block.d.ts.map +1 -1
  188. package/dist/src/molecules/product-card.d.ts +20 -25
  189. package/dist/src/molecules/product-card.d.ts.map +1 -1
  190. package/dist/src/molecules/quantity-field.d.ts +1 -1
  191. package/dist/src/molecules/quantity-field.d.ts.map +1 -1
  192. package/dist/src/molecules/radio-card.d.ts +10 -3
  193. package/dist/src/molecules/radio-card.d.ts.map +1 -1
  194. package/dist/src/molecules/radio-group.d.ts +15 -6
  195. package/dist/src/molecules/radio-group.d.ts.map +1 -1
  196. package/dist/src/molecules/search-form.d.ts +37 -12
  197. package/dist/src/molecules/search-form.d.ts.map +1 -1
  198. package/dist/src/molecules/select.d.ts +34 -29
  199. package/dist/src/molecules/select.d.ts.map +1 -1
  200. package/dist/src/molecules/slider.d.ts +23 -2
  201. package/dist/src/molecules/slider.d.ts.map +1 -1
  202. package/dist/src/molecules/steps.d.ts +30 -10
  203. package/dist/src/molecules/steps.d.ts.map +1 -1
  204. package/dist/src/molecules/switch.d.ts +54 -33
  205. package/dist/src/molecules/switch.d.ts.map +1 -1
  206. package/dist/src/molecules/tabs.d.ts +11 -11
  207. package/dist/src/molecules/tabs.d.ts.map +1 -1
  208. package/dist/src/molecules/toast.d.ts +25 -13
  209. package/dist/src/molecules/toast.d.ts.map +1 -1
  210. package/dist/src/molecules/totals-summary.d.ts +1 -1
  211. package/dist/src/molecules/totals-summary.d.ts.map +1 -1
  212. package/dist/src/molecules/tour.d.ts +1 -1
  213. package/dist/src/molecules/tour.d.ts.map +1 -1
  214. package/dist/src/molecules/tree-view.d.ts +16 -20
  215. package/dist/src/molecules/tree-view.d.ts.map +1 -1
  216. package/dist/src/molecules/vertical-navigation.d.ts +2 -2
  217. package/dist/src/molecules/vertical-navigation.d.ts.map +1 -1
  218. package/dist/src/organisms/data-table.d.ts +24 -3
  219. package/dist/src/organisms/data-table.d.ts.map +1 -1
  220. package/dist/src/organisms/data-table.fields.d.ts +4 -1
  221. package/dist/src/organisms/data-table.fields.d.ts.map +1 -1
  222. package/dist/src/organisms/data-table.helpers.d.ts +5 -12
  223. package/dist/src/organisms/data-table.helpers.d.ts.map +1 -1
  224. package/dist/src/organisms/footer.d.ts +5 -5
  225. package/dist/src/organisms/footer.d.ts.map +1 -1
  226. package/dist/src/organisms/gallery.d.ts +11 -9
  227. package/dist/src/organisms/gallery.d.ts.map +1 -1
  228. package/dist/src/organisms/header.d.ts +24 -22
  229. package/dist/src/organisms/header.d.ts.map +1 -1
  230. package/dist/src/organisms/table.d.ts +14 -14
  231. package/dist/src/organisms/table.d.ts.map +1 -1
  232. package/dist/src/templates/accordion.d.ts +8 -6
  233. package/dist/src/templates/accordion.d.ts.map +1 -1
  234. package/dist/src/templates/breadcrumb.d.ts +1 -1
  235. package/dist/src/templates/breadcrumb.d.ts.map +1 -1
  236. package/dist/src/templates/carousel.d.ts +3 -3
  237. package/dist/src/templates/carousel.d.ts.map +1 -1
  238. package/dist/src/templates/facet-filter-panel.d.ts +9 -3
  239. package/dist/src/templates/facet-filter-panel.d.ts.map +1 -1
  240. package/dist/src/templates/gallery.d.ts +2 -2
  241. package/dist/src/templates/gallery.d.ts.map +1 -1
  242. package/dist/src/templates/numeric-input.d.ts +1 -1
  243. package/dist/src/templates/numeric-input.d.ts.map +1 -1
  244. package/dist/src/templates/popover.d.ts +4 -2
  245. package/dist/src/templates/popover.d.ts.map +1 -1
  246. package/dist/src/templates/product-card.d.ts +12 -4
  247. package/dist/src/templates/product-card.d.ts.map +1 -1
  248. package/dist/src/templates/search-suggestions.d.ts +1 -1
  249. package/dist/src/templates/select.d.ts +7 -2
  250. package/dist/src/templates/select.d.ts.map +1 -1
  251. package/dist/src/templates/tabs.d.ts +8 -7
  252. package/dist/src/templates/tabs.d.ts.map +1 -1
  253. package/dist/src/theme/theme-config.d.ts +9 -16
  254. package/dist/src/theme/theme-config.d.ts.map +1 -1
  255. package/dist/src/theme/theme-provider.d.ts +16 -21
  256. package/dist/src/theme/theme-provider.d.ts.map +1 -1
  257. package/dist/src/theme/theme-toggle.d.ts.map +1 -1
  258. package/dist/src/utils.d.ts.map +1 -1
  259. package/dist/templates/accordion.js +3 -1
  260. package/dist/templates/breadcrumb.js +11 -4
  261. package/dist/templates/carousel.js +3 -6
  262. package/dist/templates/facet-filter-panel.js +121 -52
  263. package/dist/templates/gallery.js +6 -2
  264. package/dist/templates/numeric-input.js +6 -1
  265. package/dist/templates/popover.js +6 -1
  266. package/dist/templates/product-card.js +52 -26
  267. package/dist/templates/select.js +6 -1
  268. package/dist/templates/tabs.js +4 -2
  269. package/dist/theme/theme-config.js +8 -16
  270. package/dist/theme/theme-provider.js +89 -63
  271. package/dist/theme/theme-toggle.js +17 -9
  272. package/dist/utils.js +11 -1
  273. package/package.json +9 -5
  274. package/src/tokens/_base.css +4 -3
  275. package/src/tokens/_business-atoms.css +103 -0
  276. package/src/tokens/_foundation-overrides.css +251 -0
  277. package/src/tokens/_reset.css +10 -10
  278. package/src/tokens/_scheme-scopes.css +4144 -0
  279. package/src/tokens/_semantic.css +1 -23
  280. package/src/tokens/_tokens-base.css +36 -32
  281. package/src/tokens/_typography.css +2 -1
  282. package/src/tokens/components/_form-control.css +149 -6
  283. package/src/tokens/components/_popup-surface.css +15 -29
  284. package/src/tokens/components/atoms/_action-icon.css +49 -0
  285. package/src/tokens/components/atoms/_button.css +67 -0
  286. package/src/tokens/components/atoms/_checkbox.css +47 -4
  287. package/src/tokens/components/atoms/_hotkeys.css +2 -0
  288. package/src/tokens/components/atoms/_icon.css +60 -7
  289. package/src/tokens/components/atoms/_image.css +18 -0
  290. package/src/tokens/components/atoms/_input.css +20 -0
  291. package/src/tokens/components/atoms/_label.css +3 -7
  292. package/src/tokens/components/atoms/_link.css +47 -5
  293. package/src/tokens/components/atoms/_numeric-input.css +111 -2
  294. package/src/tokens/components/atoms/_rating.css +55 -6
  295. package/src/tokens/components/atoms/_skeleton.css +12 -2
  296. package/src/tokens/components/atoms/_status-text.css +35 -5
  297. package/src/tokens/components/atoms/_textarea.css +32 -3
  298. package/src/tokens/components/atoms/_tooltip.css +25 -0
  299. package/src/tokens/components/molecules/_accordion.css +46 -5
  300. package/src/tokens/components/molecules/_breadcrumb.css +15 -4
  301. package/src/tokens/components/molecules/_carousel.css +67 -0
  302. package/src/tokens/components/molecules/_cascade-select.css +104 -0
  303. package/src/tokens/components/molecules/_chart.css +12 -14
  304. package/src/tokens/components/molecules/_color-select.css +21 -0
  305. package/src/tokens/components/molecules/_combobox.css +81 -0
  306. package/src/tokens/components/molecules/_command.css +1 -0
  307. package/src/tokens/components/molecules/_date-picker.css +66 -10
  308. package/src/tokens/components/molecules/_dialog.css +36 -4
  309. package/src/tokens/components/molecules/_drawer.css +39 -3
  310. package/src/tokens/components/molecules/_file-upload.css +16 -1
  311. package/src/tokens/components/molecules/_menu.css +17 -0
  312. package/src/tokens/components/molecules/_pagination.css +19 -0
  313. package/src/tokens/components/molecules/_phone-input.css +20 -5
  314. package/src/tokens/components/molecules/_popover.css +34 -0
  315. package/src/tokens/components/molecules/_product-card.css +49 -0
  316. package/src/tokens/components/molecules/_radio-card.css +35 -0
  317. package/src/tokens/components/molecules/_radio-group.css +8 -0
  318. package/src/tokens/components/molecules/_select.css +33 -0
  319. package/src/tokens/components/molecules/_slider.css +5 -0
  320. package/src/tokens/components/molecules/_steps.css +52 -0
  321. package/src/tokens/components/molecules/_switch.css +59 -10
  322. package/src/tokens/components/molecules/_tabs.css +61 -3
  323. package/src/tokens/components/molecules/_toast.css +60 -0
  324. package/src/tokens/components/molecules/_totals-summary.css +22 -22
  325. package/src/tokens/components/molecules/_tour.css +16 -1
  326. package/src/tokens/components/molecules/_tree-view.css +27 -3
  327. package/src/tokens/components/molecules/_vertical-navigation.css +21 -3
  328. package/src/tokens/components/organisms/_data-table.css +97 -0
  329. package/src/tokens/components/organisms/_footer.css +9 -0
  330. package/src/tokens/components/organisms/_gallery.css +11 -0
  331. package/src/tokens/components/organisms/_header.css +22 -0
  332. package/src/tokens/components/organisms/_sidebar.css +1 -1
  333. package/src/tokens/components/organisms/_table.css +31 -0
  334. package/src/tokens/components/templates/_facet-filter-panel.css +11 -1
  335. package/src/tokens/figma/akros/variables.css +6 -6
  336. package/src/tokens/figma/brand-overrides.css +162 -57
  337. package/src/tokens/figma/business/variables.css +6 -6
  338. package/src/tokens/figma/cyber/variables.css +115 -38
  339. package/src/tokens/figma/cyber-dark/variables.css +115 -38
  340. package/src/tokens/figma/dark/variables.css +4 -4
  341. package/src/tokens/figma/light/variables.css +43 -40
  342. package/src/tokens/figma/{neo → n1}/variables.css +114 -114
  343. package/src/tokens/figma/variables.css +639 -240
  344. package/src/tokens/theme.css +24 -4
  345. package/src/tokens/_colors.css +0 -5
  346. package/src/tokens/figma/neo-dark/variables.css +0 -457
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import { Portal, mergeProps, normalizeProps, useMachine } from "@zag-js/react";
3
4
  import { connect, machine } from "@zag-js/tour";
@@ -13,10 +14,10 @@ const tourStyles = tv({
13
14
  content: "tour-layer tour-content tour-border relative flex flex-col gap-tour-content rounded-tour bg-tour-bg p-tour text-tour-fg shadow-tour outline-hidden",
14
15
  arrow: "tour-arrow",
15
16
  arrowTip: "bg-tour-arrow-bg",
16
- title: "pe-tour-title font-tour-title text-tour-title-size",
17
- description: "text-tour-body-size text-tour-description-fg",
18
- progressText: "text-tour-progress-fg text-tour-progress-size",
19
- actions: "flex flex-wrap items-center justify-end gap-tour-actions pt-tour-actions",
17
+ title: "shrink-0 pe-tour-title font-tour-title text-tour-title-size",
18
+ description: "focus-visible:tour-scroll-focus min-h-0 overflow-y-auto overscroll-contain text-tour-body-size text-tour-description-fg",
19
+ progressText: "shrink-0 text-tour-progress-fg text-tour-progress-size",
20
+ actions: "flex shrink-0 flex-wrap items-center justify-end gap-tour-actions pt-tour-actions",
20
21
  closeTrigger: "absolute end-tour-close top-tour-close"
21
22
  }
22
23
  });
@@ -249,10 +250,13 @@ Tour.Description = function({ children, className, ref, ...props }) {
249
250
  const api = useTourContext();
250
251
  return /*#__PURE__*/ jsx("div", {
251
252
  ...mergeProps(props, api.getDescriptionProps()),
253
+ "aria-label": props["aria-label"] ?? "Tour guidance",
252
254
  className: tourStyles().description({
253
255
  className
254
256
  }),
255
257
  ref: ref,
258
+ role: props.role ?? "group",
259
+ tabIndex: props.tabIndex ?? 0,
256
260
  children: children ?? api.step?.description
257
261
  });
258
262
  };
@@ -287,7 +291,7 @@ Tour.ActionTrigger = function({ action, children, disabled, onClick, type = "but
287
291
  });
288
292
  return /*#__PURE__*/ jsx(Button, {
289
293
  ...mergeProps(props, machineProps),
290
- "aria-label": props["aria-label"] ?? (null != children ? void 0 : machineLabel),
294
+ "aria-label": props["aria-label"] ?? (null == children ? machineLabel : void 0),
291
295
  disabled: disabled || machineDisabled,
292
296
  onClick: (event)=>{
293
297
  onClick?.(event);
@@ -1,12 +1,42 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { normalizeProps, useMachine } from "@zag-js/react";
3
- import { createContext, useContext, useId } from "react";
3
+ import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
4
+ import { collection as tree_view_collection, connect, machine, splitProps } from "@zag-js/tree-view";
5
+ import { createContext, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
4
6
  import { Icon } from "../atoms/icon.js";
5
7
  import { tv } from "../utils.js";
6
- import * as __rspack_external__zag_js_tree_view_6365b65d from "@zag-js/tree-view";
8
+ function inheritDisabledState(nodes, parentDisabled = false) {
9
+ return nodes.map((node)=>{
10
+ const disabled = parentDisabled || Boolean(node.disabled);
11
+ return {
12
+ ...node,
13
+ ...disabled ? {
14
+ disabled: true
15
+ } : {},
16
+ ...node.children ? {
17
+ children: inheritDisabledState(node.children, disabled)
18
+ } : {}
19
+ };
20
+ });
21
+ }
22
+ function canSelectNode(node, behavior) {
23
+ if (node.disabled) return false;
24
+ if ("leaf-only" === behavior && node.children?.length) return false;
25
+ return "custom" !== behavior || false !== node.selectable;
26
+ }
27
+ function recoverTreeFocus(root, previous, api, target) {
28
+ if (!previous) return false;
29
+ const unavailable = !previous.isConnected || Boolean(previous.closest('[hidden], [data-disabled], [data-part="branch-content"][data-state="closed"]'));
30
+ if (!unavailable) return false;
31
+ const active = root.ownerDocument.activeElement;
32
+ if (active !== root.ownerDocument.body && !root.contains(active)) return true;
33
+ if (target) api.focus(target);
34
+ else root.querySelector('[data-part="tree"]')?.focus();
35
+ return true;
36
+ }
7
37
  const treeViewVariants = tv({
8
38
  slots: {
9
- root: "relative rounded-tree-view bg-tree-view-root-bg",
39
+ root: "relative min-w-0 rounded-tree-view bg-tree-view-root-bg text-tree-view-fg-base",
10
40
  label: [
11
41
  "font-tree-view-label text-tree-view-label-fg"
12
42
  ],
@@ -31,16 +61,18 @@ const treeViewVariants = tv({
31
61
  "transition-colors duration-200 motion-reduce:transition-none"
32
62
  ],
33
63
  branchControl: [
34
- "flex-1"
64
+ "min-w-0 flex-1"
35
65
  ],
36
66
  branchText: [
37
- "flex-1"
67
+ "wrap-anywhere min-w-0 flex-1"
38
68
  ],
39
69
  branchIndicator: [
40
- "group-hover:text-tree-view-fg-hover",
41
- "data-[state=open]:token-icon-tree-indicator-open cursor-pointer hover:scale-125",
70
+ "flex min-h-tree-view-target min-w-tree-view-target shrink-0 cursor-pointer items-center justify-center self-stretch text-tree-view-fg-base",
71
+ "focus-visible:outline focus-visible:outline-tree-view-ring",
72
+ "data-disabled:cursor-not-allowed",
42
73
  "transition duration-200 motion-reduce:transition-none"
43
74
  ],
75
+ indicatorIcon: "data-[state=open]:token-icon-tree-indicator-open",
44
76
  branchContent: [
45
77
  "relative",
46
78
  "data-[state=closed]:hidden"
@@ -52,15 +84,13 @@ const treeViewVariants = tv({
52
84
  ],
53
85
  item: [
54
86
  "hover:bg-tree-view-node-bg-hover hover:text-tree-view-fg-hover",
55
- "data-selected:hover:bg-tree-view-node-bg-hover",
56
- "data-selected:hover:text-tree-view-fg-hover",
57
87
  "focus-visible:outline-(style:--default-ring-style) focus-visible:outline-(length:--default-ring-width)",
58
88
  "focus-visible:outline-tree-view-ring",
59
89
  "focus-visible:outline-offset-(length:--default-ring-offset)",
60
90
  "transition-colors duration-200 motion-reduce:transition-none"
61
91
  ],
62
92
  itemText: [
63
- "flex-1"
93
+ "wrap-anywhere min-w-0 flex-1"
64
94
  ],
65
95
  nodeIcon: [
66
96
  "hover:text-tree-view-icon-hover",
@@ -75,7 +105,7 @@ const treeViewVariants = tv({
75
105
  ],
76
106
  class: [
77
107
  "relative",
78
- "ms-[calc(var(--depth)*var(--tree-indent-per-level))]",
108
+ "ms-tree-view-level",
79
109
  "data-[depth=1]:ms-0"
80
110
  ]
81
111
  },
@@ -87,9 +117,9 @@ const treeViewVariants = tv({
87
117
  class: [
88
118
  "flex items-center gap-tree-view-icon p-tree-view-node-padding",
89
119
  "cursor-pointer",
90
- "data-selected:text-tree-view-fg-selected",
91
- "group-hover:text-tree-view-fg-hover",
92
- "data-selected:group-hover:text-tree-view-fg-hover"
120
+ "tree-view-selection data-selected:bg-tree-view-node-bg-selected data-selected:text-tree-view-node-fg-selected",
121
+ "data-selected:group-hover:text-tree-view-node-fg-selected data-selected:hover:bg-tree-view-node-bg-selected data-selected:hover:text-tree-view-node-fg-selected",
122
+ "group-hover:text-tree-view-fg-hover"
93
123
  ]
94
124
  }
95
125
  ],
@@ -134,38 +164,133 @@ function useTreeViewNodeContext() {
134
164
  if (!context) throw new Error("TreeView node components must be used within a node provider");
135
165
  return context;
136
166
  }
137
- function TreeView({ id, data, size, selectionBehavior = "all", dir = "ltr", selectionMode = "single", expandedValue, selectedValue, focusedValue, defaultExpandedValue, defaultSelectedValue, expandOnClick = true, typeahead = true, onExpandedChange, onSelectionChange, onFocusChange, children, className, ...props }) {
167
+ function TreeView({ data, size, selectionBehavior = "all", children, className, ...props }) {
138
168
  const generatedId = useId();
139
- const uniqueId = id || generatedId;
140
- const collection = __rspack_external__zag_js_tree_view_6365b65d.collection({
141
- nodeToValue: (node)=>node.id,
142
- nodeToString: (node)=>node.name,
143
- rootNode: {
144
- id: "ROOT",
145
- name: "",
146
- children: data
169
+ const [machineProps, rootProps] = splitProps(props);
170
+ const collection = useMemo(()=>tree_view_collection({
171
+ nodeToValue: (node)=>node.id,
172
+ nodeToString: (node)=>node.name,
173
+ rootNode: {
174
+ id: "ROOT",
175
+ name: "",
176
+ children: inheritDisabledState(data)
177
+ }
178
+ }), [
179
+ data
180
+ ]);
181
+ const nodes = new Map();
182
+ const visit = (items, parents = [])=>{
183
+ for (const node of items){
184
+ nodes.set(node.id, {
185
+ node,
186
+ parents
187
+ });
188
+ if (node.children) visit(node.children, [
189
+ ...parents,
190
+ node.id
191
+ ]);
147
192
  }
148
- });
149
- const service = useMachine(__rspack_external__zag_js_tree_view_6365b65d.machine, {
150
- id: uniqueId,
193
+ };
194
+ visit(collection.rootNode.children ?? []);
195
+ const allowed = (value)=>{
196
+ const node = nodes.get(value)?.node;
197
+ return Boolean(node && canSelectNode(node, selectionBehavior));
198
+ };
199
+ const filterSelection = (values)=>[
200
+ ...new Set(values)
201
+ ].filter(allowed);
202
+ const [selection, setSelection] = useState(()=>machineProps.defaultSelectedValue ?? []);
203
+ const [focus, setFocus] = useState(()=>machineProps.defaultFocusedValue ?? null);
204
+ const rootElement = useRef(null);
205
+ const lastFocused = useRef(null);
206
+ const previousNodes = useRef(nodes);
207
+ const recovery = useRef(null);
208
+ const selectionRecovery = useRef(null);
209
+ const expanded = machineProps.expandedValue;
210
+ const [localExpanded, setLocalExpanded] = useState(()=>machineProps.defaultExpandedValue ?? []);
211
+ const expandedValues = expanded ?? localExpanded;
212
+ const visible = [
213
+ ...nodes.entries()
214
+ ].filter(([, entry])=>!entry.node.disabled && entry.parents.every((parent)=>expandedValues.includes(parent)));
215
+ const requestedFocus = void 0 === machineProps.focusedValue ? focus : machineProps.focusedValue;
216
+ const previousParents = requestedFocus ? previousNodes.current.get(requestedFocus)?.parents ?? [] : [];
217
+ const visibleIds = visible.map(([value])=>value);
218
+ const previousIds = [
219
+ ...previousNodes.current.keys()
220
+ ];
221
+ const previousIndex = requestedFocus ? previousIds.indexOf(requestedFocus) : -1;
222
+ const neighbors = [
223
+ ...previousIds.slice(previousIndex + 1),
224
+ ...previousIds.slice(0, Math.max(0, previousIndex)).reverse()
225
+ ];
226
+ const focusTarget = requestedFocus && visibleIds.includes(requestedFocus) ? requestedFocus : [
227
+ ...previousParents
228
+ ].reverse().find((value)=>visibleIds.includes(value)) ?? neighbors.find((value)=>visibleIds.includes(value)) ?? visibleIds[0] ?? null;
229
+ const selectedValue = filterSelection(machineProps.selectedValue ?? selection);
230
+ const service = useMachine(machine, {
231
+ expandOnClick: true,
232
+ typeahead: true,
233
+ ...machineProps,
234
+ id: machineProps.id ?? generatedId,
151
235
  collection,
152
- dir,
153
- selectionMode,
154
- expandedValue,
155
236
  selectedValue,
156
- focusedValue,
157
- defaultExpandedValue,
158
- defaultSelectedValue,
159
- expandOnClick,
160
- typeahead,
161
- onExpandedChange,
162
- onSelectionChange,
163
- onFocusChange
237
+ focusedValue: focusTarget,
238
+ onSelectionChange: (details)=>{
239
+ const selected = filterSelection(details.selectedValue);
240
+ if (void 0 === machineProps.selectedValue) setSelection(selected);
241
+ machineProps.onSelectionChange?.({
242
+ ...details,
243
+ selectedValue: selected,
244
+ selectedNodes: selected.map((value)=>nodes.get(value)?.node).filter((node)=>Boolean(node))
245
+ });
246
+ },
247
+ onExpandedChange: (details)=>{
248
+ if (void 0 === expanded) setLocalExpanded(details.expandedValue);
249
+ machineProps.onExpandedChange?.(details);
250
+ },
251
+ onFocusChange: (details)=>{
252
+ if (void 0 === machineProps.focusedValue) setFocus(details.focusedValue);
253
+ machineProps.onFocusChange?.(details);
254
+ }
164
255
  });
165
- const api = __rspack_external__zag_js_tree_view_6365b65d.connect(service, normalizeProps);
256
+ const api = connect(service, normalizeProps);
166
257
  const styles = treeViewVariants({
167
258
  size
168
259
  });
260
+ useEffect(()=>{
261
+ const requestedSelection = machineProps.selectedValue ?? selection;
262
+ const selectionKey = JSON.stringify([
263
+ requestedSelection,
264
+ selectedValue
265
+ ]);
266
+ if (requestedSelection.join("\0") === selectedValue.join("\0")) selectionRecovery.current = null;
267
+ else {
268
+ if (void 0 === machineProps.selectedValue) setSelection(selectedValue);
269
+ if (selectionRecovery.current !== selectionKey) {
270
+ selectionRecovery.current = selectionKey;
271
+ machineProps.onSelectionChange?.({
272
+ focusedValue: focusTarget,
273
+ selectedValue,
274
+ selectedNodes: selectedValue.map((value)=>nodes.get(value)?.node).filter((node)=>Boolean(node))
275
+ });
276
+ }
277
+ }
278
+ });
279
+ useEffect(()=>{
280
+ const root = rootElement.current;
281
+ if (!root) return;
282
+ const key = `${requestedFocus}:${focusTarget}`;
283
+ if (requestedFocus !== focusTarget && recovery.current !== key) {
284
+ recovery.current = key;
285
+ if (void 0 === machineProps.focusedValue) setFocus(focusTarget);
286
+ machineProps.onFocusChange?.({
287
+ focusedValue: focusTarget,
288
+ focusedNode: focusTarget ? nodes.get(focusTarget)?.node ?? null : null
289
+ });
290
+ } else if (requestedFocus === focusTarget) recovery.current = null;
291
+ if (recoverTreeFocus(root, lastFocused.current, api, focusTarget)) lastFocused.current = null;
292
+ if (requestedFocus === focusTarget || null == requestedFocus) previousNodes.current = nodes;
293
+ });
169
294
  return /*#__PURE__*/ jsx(TreeViewContext.Provider, {
170
295
  value: {
171
296
  api,
@@ -177,8 +302,16 @@ function TreeView({ id, data, size, selectionBehavior = "all", dir = "ltr", sele
177
302
  className: styles.root({
178
303
  className
179
304
  }),
180
- ...api.getRootProps(),
181
- ...props,
305
+ ...mergeProps(rootProps, api.getRootProps()),
306
+ onBlurCapture: (event)=>{
307
+ rootProps.onBlurCapture?.(event);
308
+ if (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) lastFocused.current = null;
309
+ },
310
+ onFocusCapture: (event)=>{
311
+ rootProps.onFocusCapture?.(event);
312
+ lastFocused.current = event.target;
313
+ },
314
+ ref: rootElement,
182
315
  children: children
183
316
  })
184
317
  });
@@ -195,26 +328,49 @@ TreeView.Label = function({ children, className, ...props }) {
195
328
  });
196
329
  };
197
330
  TreeView.Tree = function({ children, className, ...props }) {
198
- const { api, styles } = useTreeViewContext();
331
+ const { api, styles, selectionBehavior } = useTreeViewContext();
199
332
  return /*#__PURE__*/ jsx("div", {
200
333
  className: styles.tree({
201
334
  className
202
335
  }),
203
- ...api.getTreeProps(),
204
- ...props,
336
+ ...mergeProps(props, api.getTreeProps()),
337
+ onKeyDown: (event)=>{
338
+ props.onKeyDown?.(event);
339
+ if (event.defaultPrevented) return;
340
+ if ((event.metaKey || event.ctrlKey) && "a" === event.key.toLowerCase()) {
341
+ event.preventDefault();
342
+ if (api.getTreeProps()["aria-multiselectable"]) api.select();
343
+ return;
344
+ }
345
+ const target = event.target.closest('[data-part="branch-control"]');
346
+ const branch = target?.dataset.value ? api.collection.findNode(target.dataset.value) : void 0;
347
+ if (branch && !branch.disabled && !canSelectNode(branch, selectionBehavior ?? "all") && ("Enter" === event.key || " " === event.key)) {
348
+ event.preventDefault();
349
+ if (api.expandedValue.includes(branch.id)) api.collapse([
350
+ branch.id
351
+ ]);
352
+ else api.expand([
353
+ branch.id
354
+ ]);
355
+ return;
356
+ }
357
+ api.getTreeProps().onKeyDown?.(event);
358
+ },
359
+ role: "tree",
205
360
  children: children
206
361
  });
207
362
  };
208
363
  TreeView.NodeProvider = function({ node, indexPath, children }) {
209
364
  const { api } = useTreeViewContext();
365
+ const collectionNode = api.collection.findNode(node.id) ?? node;
210
366
  const nodeProps = {
211
- node,
367
+ node: collectionNode,
212
368
  indexPath
213
369
  };
214
370
  const nodeState = api.getNodeState(nodeProps);
215
371
  return /*#__PURE__*/ jsx(TreeViewNodeContext.Provider, {
216
372
  value: {
217
- node,
373
+ node: collectionNode,
218
374
  indexPath,
219
375
  nodeProps,
220
376
  nodeState
@@ -247,40 +403,31 @@ TreeView.BranchTrigger = function({ children, className, ...props }) {
247
403
  TreeView.BranchControl = function({ children, className, ...props }) {
248
404
  const { api, styles, selectionBehavior } = useTreeViewContext();
249
405
  const { node, nodeProps, nodeState } = useTreeViewNodeContext();
250
- const isSelectable = (()=>{
251
- switch(selectionBehavior){
252
- case "all":
253
- return true;
254
- case "leaf-only":
255
- return false;
256
- case "custom":
257
- return false !== node.selectable;
258
- default:
259
- return true;
260
- }
261
- })();
262
406
  const controlProps = api.getBranchControlProps(nodeProps);
263
- const finalProps = isSelectable ? controlProps : {
264
- ...controlProps,
265
- onClick: (e)=>{
266
- e.preventDefault();
267
- e.stopPropagation();
268
- if (!nodeState.disabled) if (nodeState.expanded) api.collapse([
269
- node.id
270
- ]);
271
- else api.expand([
272
- node.id
273
- ]);
274
- },
275
- "aria-selected": void 0,
276
- "data-disabled": !isSelectable || nodeState.disabled || void 0
407
+ const isSelectable = "leaf-only" !== selectionBehavior && ("custom" !== selectionBehavior || false !== node.selectable);
408
+ const finalProps = {
409
+ ...mergeProps(props, controlProps),
410
+ onClick: (event)=>{
411
+ props.onClick?.(event);
412
+ if (event.defaultPrevented || nodeState.disabled) return;
413
+ if (isSelectable) controlProps.onClick?.(event);
414
+ else {
415
+ event.stopPropagation();
416
+ if (nodeState.expanded) api.collapse([
417
+ node.id
418
+ ]);
419
+ else api.expand([
420
+ node.id
421
+ ]);
422
+ }
423
+ }
277
424
  };
278
425
  return /*#__PURE__*/ jsx("div", {
279
426
  className: styles.branchControl({
280
427
  className
281
428
  }),
282
429
  ...finalProps,
283
- ...props,
430
+ tabIndex: nodeState.disabled ? -1 : controlProps.tabIndex,
284
431
  children: children
285
432
  });
286
433
  };
@@ -298,25 +445,34 @@ TreeView.BranchText = function({ children, className }) {
298
445
  TreeView.BranchIndicator = function({ icon = "token-icon-tree-indicator", className }) {
299
446
  const { api, styles } = useTreeViewContext();
300
447
  const { node, nodeProps, nodeState } = useTreeViewNodeContext();
301
- const handleToggle = (id)=>{
302
- if (nodeState.expanded) api.collapse([
303
- id
304
- ]);
305
- else api.expand([
306
- id
307
- ]);
308
- };
309
- return /*#__PURE__*/ jsx(Icon, {
448
+ return /*#__PURE__*/ jsx("button", {
449
+ ...api.getBranchIndicatorProps(nodeProps),
450
+ "aria-expanded": nodeState.expanded,
451
+ "aria-hidden": void 0,
452
+ "aria-label": `${nodeState.expanded ? "Collapse" : "Expand"} ${node.name}`,
310
453
  className: styles.branchIndicator({
311
454
  className
312
455
  }),
313
- icon: icon,
314
- ...api.getBranchIndicatorProps(nodeProps),
315
- onClick: (e)=>{
316
- e.preventDefault();
317
- e.stopPropagation();
318
- handleToggle(node.id);
319
- }
456
+ disabled: nodeState.disabled,
457
+ onClick: (event)=>{
458
+ event.stopPropagation();
459
+ if (nodeState.disabled) return;
460
+ if (nodeState.expanded) api.collapse([
461
+ node.id
462
+ ]);
463
+ else api.expand([
464
+ node.id
465
+ ]);
466
+ },
467
+ onMouseDown: (event)=>event.preventDefault(),
468
+ tabIndex: -1,
469
+ type: "button",
470
+ children: /*#__PURE__*/ jsx(Icon, {
471
+ className: styles.indicatorIcon(),
472
+ "data-state": nodeState.expanded ? "open" : "closed",
473
+ icon: icon,
474
+ size: "current"
475
+ })
320
476
  });
321
477
  };
322
478
  TreeView.BranchContent = function({ children, className, ...props }) {
@@ -344,34 +500,24 @@ TreeView.IndentGuide = function({ className }) {
344
500
  TreeView.Item = function({ children, className, ...props }) {
345
501
  const { api, styles, selectionBehavior } = useTreeViewContext();
346
502
  const { node, nodeProps, nodeState } = useTreeViewNodeContext();
347
- const isSelectable = (()=>{
348
- switch(selectionBehavior){
349
- case "all":
350
- case "leaf-only":
351
- return true;
352
- case "custom":
353
- return false !== node.selectable;
354
- default:
355
- return true;
356
- }
357
- })();
503
+ const isSelectable = "custom" !== selectionBehavior || false !== node.selectable;
358
504
  const itemProps = api.getItemProps(nodeProps);
359
- const finalProps = isSelectable ? itemProps : {
360
- ...itemProps,
361
- onClick: (e)=>{
362
- e.preventDefault();
363
- e.stopPropagation();
364
- },
365
- "aria-selected": void 0,
366
- "data-disabled": !isSelectable || nodeState.disabled || void 0
505
+ const finalProps = {
506
+ ...mergeProps(props, itemProps),
507
+ onClick: (event)=>{
508
+ props.onClick?.(event);
509
+ if (!event.defaultPrevented && isSelectable) itemProps.onClick?.(event);
510
+ }
367
511
  };
368
512
  return /*#__PURE__*/ jsx("div", {
369
513
  className: styles.item({
370
514
  className
371
515
  }),
372
516
  ...finalProps,
517
+ "aria-selected": isSelectable && !nodeState.disabled ? nodeState.selected : void 0,
373
518
  "data-selected": nodeState.selected || void 0,
374
- ...props,
519
+ role: "treeitem",
520
+ tabIndex: nodeState.disabled ? -1 : itemProps.tabIndex,
375
521
  children: children
376
522
  });
377
523
  };
@@ -1,5 +1,7 @@
1
1
  "use client";
2
+ "use client";
2
3
  import { jsx } from "react/jsx-runtime";
4
+ import { connect, machine } from "@zag-js/collapsible";
3
5
  import { mergeProps, normalizeProps, useMachine } from "@zag-js/react";
4
6
  import { useContext, useId } from "react";
5
7
  import { Button } from "../atoms/button.js";
@@ -7,7 +9,6 @@ import { Icon } from "../atoms/icon.js";
7
9
  import { LinkButton } from "../atoms/link-button.js";
8
10
  import { VerticalNavigationBranchContext, VerticalNavigationContext, VerticalNavigationDepthContext, useVerticalNavigationBranchContext, useVerticalNavigationContext } from "../internal/molecules/vertical-navigation.context.js";
9
11
  import { verticalNavigationStyles } from "../internal/molecules/vertical-navigation.styles.js";
10
- import * as __rspack_external__zag_js_collapsible_508ff486 from "@zag-js/collapsible";
11
12
  function VerticalNavigation({ size = "md", maxIndentDepth = 3, dir, className, children, ...props }) {
12
13
  return /*#__PURE__*/ jsx(VerticalNavigationContext.Provider, {
13
14
  value: {
@@ -91,6 +92,7 @@ VerticalNavigation.Link = function({ current = false, className, ...props }) {
91
92
  }).link({
92
93
  className
93
94
  }),
95
+ composition: true,
94
96
  "data-current": current || void 0,
95
97
  "data-current-path": branch?.containsCurrent || void 0,
96
98
  "data-part": "link",
@@ -102,7 +104,7 @@ VerticalNavigation.Link = function({ current = false, className, ...props }) {
102
104
  VerticalNavigation.Branch = function({ id, open, defaultOpen, onOpenChange, disabled, getRootNode, containsCurrent = false, children, className, ...props }) {
103
105
  const { dir } = useVerticalNavigationContext();
104
106
  const generatedId = useId();
105
- const service = useMachine(__rspack_external__zag_js_collapsible_508ff486.machine, {
107
+ const service = useMachine(machine, {
106
108
  id: id ?? generatedId,
107
109
  dir,
108
110
  open,
@@ -111,7 +113,7 @@ VerticalNavigation.Branch = function({ id, open, defaultOpen, onOpenChange, disa
111
113
  disabled,
112
114
  getRootNode
113
115
  });
114
- const api = __rspack_external__zag_js_collapsible_508ff486.connect(service, normalizeProps);
116
+ const api = connect(service, normalizeProps);
115
117
  return /*#__PURE__*/ jsx(VerticalNavigationBranchContext.Provider, {
116
118
  value: {
117
119
  api,
@@ -131,7 +133,7 @@ VerticalNavigation.Branch = function({ id, open, defaultOpen, onOpenChange, disa
131
133
  };
132
134
  VerticalNavigation.BranchTrigger = function({ className, disabled, ...props }) {
133
135
  const { size } = useVerticalNavigationContext();
134
- const { api } = useVerticalNavigationBranchContext();
136
+ const { api, containsCurrent } = useVerticalNavigationBranchContext();
135
137
  return /*#__PURE__*/ jsx(Button, {
136
138
  ...mergeProps(props, api.getTriggerProps()),
137
139
  className: verticalNavigationStyles({
@@ -139,6 +141,8 @@ VerticalNavigation.BranchTrigger = function({ className, disabled, ...props }) {
139
141
  }).trigger({
140
142
  className
141
143
  }),
144
+ composition: true,
145
+ "data-current-path": containsCurrent || void 0,
142
146
  "data-part": "branch-trigger",
143
147
  "data-scope": "vertical-navigation",
144
148
  disabled: disabled || api.disabled,