@bysages/react 0.3.1 → 0.4.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 (272) hide show
  1. package/dist/{ai-response-BfKTmtCt.mjs → ai-response-B4DX7nmJ.mjs} +3 -1
  2. package/dist/chevron-a2nIZKN4.mjs +6 -0
  3. package/dist/components/accordion/index.d.mts +22 -4
  4. package/dist/components/accordion/index.mjs +31 -1
  5. package/dist/components/affix/index.d.mts +4 -1
  6. package/dist/components/affix/index.mjs +5 -3
  7. package/dist/components/ai/index.d.mts +1 -1
  8. package/dist/components/ai/index.mjs +5 -3
  9. package/dist/components/ai-action/index.d.mts +4 -1
  10. package/dist/components/ai-action/index.mjs +3 -1
  11. package/dist/components/ai-attachments/index.d.mts +10 -4
  12. package/dist/components/ai-attachments/index.mjs +16 -44
  13. package/dist/components/ai-message/index.d.mts +4 -1
  14. package/dist/components/ai-message/index.mjs +3 -1
  15. package/dist/components/ai-prompt-input/index.d.mts +5 -2
  16. package/dist/components/ai-prompt-input/index.mjs +10 -14
  17. package/dist/components/ai-reasoning/index.d.mts +4 -1
  18. package/dist/components/ai-reasoning/index.mjs +4 -2
  19. package/dist/components/ai-response/index.d.mts +4 -1
  20. package/dist/components/ai-response/index.mjs +1 -1
  21. package/dist/components/ai-source/index.d.mts +8 -2
  22. package/dist/components/ai-source/index.mjs +5 -2
  23. package/dist/components/ai-suggestion/index.d.mts +4 -1
  24. package/dist/components/ai-suggestion/index.mjs +3 -1
  25. package/dist/components/ai-tool/index.d.mts +4 -1
  26. package/dist/components/ai-tool/index.mjs +4 -2
  27. package/dist/components/alert/index.d.mts +2 -0
  28. package/dist/components/alert/index.mjs +11 -18
  29. package/dist/components/angle-slider/index.d.mts +19 -2
  30. package/dist/components/angle-slider/index.mjs +31 -8
  31. package/dist/components/aspect-ratio/index.d.mts +4 -1
  32. package/dist/components/aspect-ratio/index.mjs +3 -1
  33. package/dist/components/autocomplete/index.d.mts +3 -1
  34. package/dist/components/autocomplete/index.mjs +6 -1
  35. package/dist/components/avatar/index.d.mts +2 -2
  36. package/dist/components/avatar/index.mjs +9 -2
  37. package/dist/components/avatar-group/index.d.mts +4 -1
  38. package/dist/components/avatar-group/index.mjs +3 -1
  39. package/dist/components/back-top/index.d.mts +7 -1
  40. package/dist/components/back-top/index.mjs +12 -17
  41. package/dist/components/badge/index.d.mts +4 -1
  42. package/dist/components/badge/index.mjs +3 -1
  43. package/dist/components/banner/index.mjs +2 -11
  44. package/dist/components/block-ui/index.d.mts +4 -1
  45. package/dist/components/block-ui/index.mjs +3 -1
  46. package/dist/components/button/index.d.mts +4 -1
  47. package/dist/components/button/index.mjs +3 -1
  48. package/dist/components/calendar/index.d.mts +3 -1
  49. package/dist/components/calendar/index.mjs +9 -10
  50. package/dist/components/carousel/index.d.mts +21 -1
  51. package/dist/components/carousel/index.mjs +43 -2
  52. package/dist/components/cascade-select/index.d.mts +6 -1
  53. package/dist/components/cascade-select/index.mjs +12 -35
  54. package/dist/components/checkbox/index.d.mts +20 -2
  55. package/dist/components/checkbox/index.mjs +28 -8
  56. package/dist/components/checkbox-group/index.d.mts +8 -6
  57. package/dist/components/checkbox-group/index.mjs +44 -48
  58. package/dist/components/chip/index.d.mts +4 -1
  59. package/dist/components/chip/index.mjs +3 -1
  60. package/dist/components/client-only/index.d.mts +7 -2
  61. package/dist/components/client-only/index.mjs +5 -1
  62. package/dist/components/clipboard/index.d.mts +17 -4
  63. package/dist/components/clipboard/index.mjs +33 -5
  64. package/dist/components/collapsible/index.d.mts +16 -4
  65. package/dist/components/collapsible/index.mjs +25 -1
  66. package/dist/components/color-picker/index.d.mts +20 -4
  67. package/dist/components/color-picker/index.mjs +56 -14
  68. package/dist/components/combobox/index.d.mts +27 -1
  69. package/dist/components/combobox/index.mjs +62 -5
  70. package/dist/components/command/index.d.mts +4 -1
  71. package/dist/components/command/index.mjs +7 -1
  72. package/dist/components/comment/index.d.mts +4 -1
  73. package/dist/components/comment/index.mjs +3 -1
  74. package/dist/components/config-provider/index.d.mts +4 -1
  75. package/dist/components/config-provider/index.mjs +3 -1
  76. package/dist/components/container/index.d.mts +4 -1
  77. package/dist/components/container/index.mjs +3 -1
  78. package/dist/components/data-view/index.d.mts +4 -1
  79. package/dist/components/data-view/index.mjs +3 -1
  80. package/dist/components/date-input/index.d.mts +19 -4
  81. package/dist/components/date-input/index.mjs +33 -9
  82. package/dist/components/date-picker/index.d.mts +21 -4
  83. package/dist/components/date-picker/index.mjs +58 -11
  84. package/dist/components/deferred-content/index.d.mts +4 -1
  85. package/dist/components/deferred-content/index.mjs +3 -1
  86. package/dist/components/descriptions/index.d.mts +10 -2
  87. package/dist/components/descriptions/index.mjs +13 -8
  88. package/dist/components/dialog/index.d.mts +18 -5
  89. package/dist/components/dialog/index.mjs +43 -1
  90. package/dist/components/download-trigger/index.d.mts +7 -2
  91. package/dist/components/download-trigger/index.mjs +5 -1
  92. package/dist/components/drawer/index.d.mts +18 -6
  93. package/dist/components/drawer/index.mjs +40 -1
  94. package/dist/components/dynamic-input/index.d.mts +4 -1
  95. package/dist/components/dynamic-input/index.mjs +10 -18
  96. package/dist/components/editable/index.d.mts +28 -7
  97. package/dist/components/editable/index.mjs +43 -4
  98. package/dist/components/ellipsis/index.d.mts +4 -1
  99. package/dist/components/ellipsis/index.mjs +3 -1
  100. package/dist/components/field/index.d.mts +30 -5
  101. package/dist/components/field/index.mjs +36 -3
  102. package/dist/components/fieldset/index.d.mts +19 -4
  103. package/dist/components/fieldset/index.mjs +28 -3
  104. package/dist/components/file-upload/index.d.mts +29 -9
  105. package/dist/components/file-upload/index.mjs +46 -10
  106. package/dist/components/floating-panel/index.d.mts +18 -6
  107. package/dist/components/floating-panel/index.mjs +55 -1
  108. package/dist/components/focus-trap/index.d.mts +7 -2
  109. package/dist/components/focus-trap/index.mjs +5 -1
  110. package/dist/components/form/index.d.mts +1 -1
  111. package/dist/components/form/index.mjs +5 -2
  112. package/dist/components/frame/index.d.mts +4 -8
  113. package/dist/components/frame/index.mjs +13 -1
  114. package/dist/components/grid/index.d.mts +4 -1
  115. package/dist/components/grid/index.mjs +3 -1
  116. package/dist/components/highlight/index.d.mts +3 -5
  117. package/dist/components/highlight/index.mjs +6 -1
  118. package/dist/components/hover-card/index.d.mts +20 -4
  119. package/dist/components/hover-card/index.mjs +32 -1
  120. package/dist/components/icon/index.d.mts +10 -8
  121. package/dist/components/icon/index.mjs +5 -3
  122. package/dist/components/image/index.d.mts +5 -2
  123. package/dist/components/image/index.mjs +14 -29
  124. package/dist/components/image-cropper/index.d.mts +13 -2
  125. package/dist/components/image-cropper/index.mjs +34 -2
  126. package/dist/components/image-viewer/index.d.mts +2 -24
  127. package/dist/components/image-viewer/index.mjs +3 -113
  128. package/dist/components/input/index.d.mts +3 -1
  129. package/dist/components/input/index.mjs +1 -1
  130. package/dist/components/json-tree-view/index.d.mts +17 -1
  131. package/dist/components/json-tree-view/index.mjs +26 -5
  132. package/dist/components/kbd/index.d.mts +4 -1
  133. package/dist/components/kbd/index.mjs +3 -1
  134. package/dist/components/layout/index.d.mts +25 -7
  135. package/dist/components/layout/index.mjs +157 -63
  136. package/dist/components/link/index.d.mts +4 -1
  137. package/dist/components/link/index.mjs +3 -1
  138. package/dist/components/listbox/index.d.mts +22 -1
  139. package/dist/components/listbox/index.mjs +36 -4
  140. package/dist/components/marquee/index.d.mts +18 -1
  141. package/dist/components/marquee/index.mjs +34 -2
  142. package/dist/components/masonry/index.d.mts +4 -1
  143. package/dist/components/masonry/index.mjs +3 -1
  144. package/dist/components/media-player/index.d.mts +2 -0
  145. package/dist/components/media-player/index.mjs +2 -0
  146. package/dist/components/mentions/index.d.mts +1 -1
  147. package/dist/components/mentions/index.mjs +1 -1
  148. package/dist/components/menu/index.d.mts +29 -11
  149. package/dist/components/menu/index.mjs +34 -12
  150. package/dist/components/menubar/index.d.mts +3 -1
  151. package/dist/components/menubar/index.mjs +6 -1
  152. package/dist/components/navigation-menu/index.d.mts +25 -1
  153. package/dist/components/navigation-menu/index.mjs +36 -1
  154. package/dist/components/number-input/index.d.mts +28 -6
  155. package/dist/components/number-input/index.mjs +33 -8
  156. package/dist/components/order-list/index.d.mts +4 -1
  157. package/dist/components/order-list/index.mjs +26 -24
  158. package/dist/components/pagination/index.d.mts +23 -3
  159. package/dist/components/pagination/index.mjs +57 -12
  160. package/dist/components/password-input/index.d.mts +24 -6
  161. package/dist/components/password-input/index.mjs +31 -8
  162. package/dist/components/pin-input/index.d.mts +23 -5
  163. package/dist/components/pin-input/index.mjs +29 -7
  164. package/dist/components/popconfirm/index.d.mts +9 -5
  165. package/dist/components/popconfirm/index.mjs +23 -18
  166. package/dist/components/popover/index.d.mts +2 -8
  167. package/dist/components/popover/index.mjs +44 -4
  168. package/dist/components/presence/index.d.mts +10 -2
  169. package/dist/components/presence/index.mjs +6 -1
  170. package/dist/components/progress/index.d.mts +18 -3
  171. package/dist/components/progress/index.mjs +34 -9
  172. package/dist/components/progress-group/index.d.mts +4 -1
  173. package/dist/components/progress-group/index.mjs +4 -2
  174. package/dist/components/qr-code/index.d.mts +14 -1
  175. package/dist/components/qr-code/index.mjs +26 -2
  176. package/dist/components/radio-group/index.d.mts +27 -2
  177. package/dist/components/radio-group/index.mjs +32 -8
  178. package/dist/components/rating-group/index.d.mts +20 -3
  179. package/dist/components/rating-group/index.mjs +26 -8
  180. package/dist/components/result/index.d.mts +1 -1
  181. package/dist/components/result/index.mjs +2 -2
  182. package/dist/components/scroll-area/index.d.mts +14 -1
  183. package/dist/components/scroll-area/index.mjs +32 -2
  184. package/dist/components/segment-group/index.d.mts +28 -2
  185. package/dist/components/segment-group/index.mjs +34 -7
  186. package/dist/components/select/index.d.mts +2 -2
  187. package/dist/components/select/index.mjs +1 -1
  188. package/dist/components/separator/index.d.mts +4 -1
  189. package/dist/components/separator/index.mjs +3 -1
  190. package/dist/components/signature-pad/index.d.mts +25 -5
  191. package/dist/components/signature-pad/index.mjs +37 -3
  192. package/dist/components/skeleton/index.d.mts +4 -1
  193. package/dist/components/skeleton/index.mjs +3 -1
  194. package/dist/components/slider/index.d.mts +21 -2
  195. package/dist/components/slider/index.mjs +31 -8
  196. package/dist/components/spinner/index.d.mts +4 -1
  197. package/dist/components/spinner/index.mjs +3 -1
  198. package/dist/components/split-button/index.d.mts +3 -1
  199. package/dist/components/split-button/index.mjs +12 -17
  200. package/dist/components/splitter/index.d.mts +17 -4
  201. package/dist/components/splitter/index.mjs +35 -1
  202. package/dist/components/spotlight/index.d.mts +4 -1
  203. package/dist/components/spotlight/index.mjs +3 -1
  204. package/dist/components/stack/index.d.mts +4 -1
  205. package/dist/components/stack/index.mjs +6 -4
  206. package/dist/components/steps/index.d.mts +26 -6
  207. package/dist/components/steps/index.mjs +26 -11
  208. package/dist/components/swap/index.d.mts +11 -5
  209. package/dist/components/swap/index.mjs +30 -3
  210. package/dist/components/switch/index.d.mts +20 -2
  211. package/dist/components/switch/index.mjs +27 -8
  212. package/dist/components/table/index.d.mts +4 -1
  213. package/dist/components/table/index.mjs +26 -56
  214. package/dist/components/tabs/index.d.mts +24 -2
  215. package/dist/components/tabs/index.mjs +25 -9
  216. package/dist/components/tags-input/index.d.mts +33 -8
  217. package/dist/components/tags-input/index.mjs +41 -9
  218. package/dist/components/terminal/index.d.mts +4 -1
  219. package/dist/components/terminal/index.mjs +3 -1
  220. package/dist/components/textarea/index.d.mts +4 -1
  221. package/dist/components/textarea/index.mjs +3 -1
  222. package/dist/components/timer/index.d.mts +18 -1
  223. package/dist/components/timer/index.mjs +51 -2
  224. package/dist/components/toast/index.d.mts +3 -6
  225. package/dist/components/toast/index.mjs +22 -2
  226. package/dist/components/toc/index.d.mts +19 -5
  227. package/dist/components/toc/index.mjs +31 -5
  228. package/dist/components/toggle/index.d.mts +11 -4
  229. package/dist/components/toggle/index.mjs +21 -1
  230. package/dist/components/toggle-group/index.d.mts +26 -2
  231. package/dist/components/toggle-group/index.mjs +31 -6
  232. package/dist/components/toolbar/index.d.mts +4 -1
  233. package/dist/components/toolbar/index.mjs +3 -1
  234. package/dist/components/tooltip/index.d.mts +17 -4
  235. package/dist/components/tooltip/index.mjs +28 -1
  236. package/dist/components/tour/index.d.mts +18 -9
  237. package/dist/components/tour/index.mjs +44 -2
  238. package/dist/components/transfer/index.d.mts +3 -1
  239. package/dist/components/transfer/index.mjs +14 -26
  240. package/dist/components/tree-select/index.d.mts +3 -1
  241. package/dist/components/tree-select/index.mjs +11 -22
  242. package/dist/components/tree-view/index.d.mts +22 -2
  243. package/dist/components/tree-view/index.mjs +50 -8
  244. package/dist/components/typography/index.d.mts +4 -0
  245. package/dist/components/typography/index.mjs +1 -0
  246. package/dist/components/user/index.d.mts +4 -1
  247. package/dist/components/user/index.mjs +3 -1
  248. package/dist/components/virtual-list/index.d.mts +4 -1
  249. package/dist/components/virtual-list/index.mjs +10 -12
  250. package/dist/components/watermark/index.d.mts +4 -1
  251. package/dist/components/watermark/index.mjs +4 -2
  252. package/dist/family-DE_GQeeM.mjs +9 -0
  253. package/dist/icon-BALgGtNK.mjs +18 -0
  254. package/dist/id-C37UYLwJ.mjs +13 -0
  255. package/dist/image-viewer-Cf6thHax.mjs +141 -0
  256. package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
  257. package/dist/index-BcRdWGY-.d.mts +115 -0
  258. package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
  259. package/dist/{index-Dn5mHf1g.d.mts → index-DdNKngUQ.d.mts} +56 -17
  260. package/dist/index-Dj8S4eyJ.d.mts +41 -0
  261. package/dist/index-Eu-Bttta.d.mts +24 -0
  262. package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
  263. package/dist/index.d.mts +36 -35
  264. package/dist/index.mjs +11 -10
  265. package/dist/{input-2oezH-dY.mjs → input-C21Zzuy6.mjs} +3 -1
  266. package/dist/media-player-gQrnxU52.mjs +554 -0
  267. package/dist/{mentions-DMIBCBOd.mjs → mentions-BuWibdci.mjs} +74 -42
  268. package/dist/select-ozUFq0zd.mjs +121 -0
  269. package/package.json +3 -3
  270. package/dist/chevron-BeHvt46K.mjs +0 -17
  271. package/dist/glyph-VI989p8H.mjs +0 -14
  272. package/dist/select-eAHutw56.mjs +0 -70
@@ -1,10 +1,18 @@
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { Toc as Toc$1 } from "@ark-ui/react/toc";
4
5
  //#region src/components/toc/index.tsx
5
- /** Ark's Toc, dressed in the paper-and-ink system: a quiet rail of links
6
+ /** Toc, dressed in the paper-and-ink system: a quiet rail of links
6
7
  * beside the scroll, one stroke of primary ink marking where the reader
7
- * stands. The API is Ark's own — Root, Title, List, Item, Link, Indicator. */
8
+ * stands. The parts — Root, Title, List, Item, Link, Indicator. */
9
+ function TocRoot(props) {
10
+ const id = useElementId("toc", props);
11
+ return /* @__PURE__ */ jsx(Toc$1.Root, {
12
+ ...props,
13
+ id
14
+ });
15
+ }
8
16
  /** The active stroke is decoration; hidden so the list reads as links
9
17
  * alone. */
10
18
  function TocIndicator(props) {
@@ -13,10 +21,28 @@ function TocIndicator(props) {
13
21
  "aria-hidden": "true"
14
22
  });
15
23
  }
16
- const Toc = {
24
+ /** The complete rail behind one page: items become anchor rows, the
25
+ * title names the list, and the active stroke follows the scroller. */
26
+ function TocFacade({ items, scrollEl, title = "On this page", className, style }) {
27
+ return /* @__PURE__ */ jsx(TocRoot, {
28
+ className,
29
+ style,
30
+ items,
31
+ scrollEl,
32
+ children: /* @__PURE__ */ jsxs(Toc$1.Nav, { children: [title ? /* @__PURE__ */ jsx(Toc$1.Title, { children: title }) : null, /* @__PURE__ */ jsxs(Toc$1.List, { children: [/* @__PURE__ */ jsx(TocIndicator, {}), items.map((item) => /* @__PURE__ */ jsx(Toc$1.Item, {
33
+ item,
34
+ children: /* @__PURE__ */ jsx(Toc$1.Link, {
35
+ href: `#${item.value}`,
36
+ children: item.label
37
+ })
38
+ }, item.value))] })] })
39
+ });
40
+ }
41
+ const Toc = Object.assign(TocFacade, {
17
42
  ...Toc$1,
43
+ Root: TocRoot,
18
44
  Indicator: TocIndicator
19
- };
45
+ });
20
46
  injectComponentStyle("toc");
21
47
  //#endregion
22
48
  export { Toc };
@@ -1,7 +1,14 @@
1
+ import { ComponentProps } from "react";
1
2
  import { Toggle as Toggle$1 } from "@ark-ui/react/toggle";
2
3
  //#region src/components/toggle/index.d.ts
3
- /** Ark's Toggle, dressed in the paper-and-ink system: a standalone seal that
4
- * settles into the flat ink fill while pressed on. The API is Ark's own —
5
- * Root, Indicator. */
6
- export declare const Toggle: typeof Toggle$1;
4
+ export interface ToggleFacadeProps extends ComponentProps<typeof Toggle$1.Root> {
5
+ /** The accessible name when the content is only an icon. */
6
+ label?: string;
7
+ }
8
+ declare function ToggleFacade({ label, children, ...rest }: ToggleFacadeProps): import("react").JSX.Element;
9
+ declare namespace ToggleFacade {
10
+ var displayName: string;
11
+ }
12
+ type ToggleParts = typeof Toggle$1;
13
+ export declare const Toggle: typeof ToggleFacade & ToggleParts;
7
14
  //#endregion
@@ -1,10 +1,30 @@
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
3
+ import { jsx } from "react/jsx-runtime";
2
4
  import { Toggle as Toggle$1 } from "@ark-ui/react/toggle";
3
5
  //#region src/components/toggle/index.tsx
4
6
  /** Ark's Toggle, dressed in the paper-and-ink system: a standalone seal that
5
7
  * settles into the flat ink fill while pressed on. The API is Ark's own —
6
8
  * Root, Indicator. */
7
- const Toggle = Toggle$1;
9
+ function ToggleRoot(props) {
10
+ const id = useElementId("toggle", props);
11
+ return /* @__PURE__ */ jsx(Toggle$1.Root, {
12
+ ...props,
13
+ id
14
+ });
15
+ }
16
+ function ToggleFacade({ label, children, ...rest }) {
17
+ return /* @__PURE__ */ jsx(ToggleRoot, {
18
+ ...rest,
19
+ "aria-label": label ?? rest["aria-label"],
20
+ children: /* @__PURE__ */ jsx(Toggle$1.Indicator, { children })
21
+ });
22
+ }
23
+ ToggleFacade.displayName = "SToggle";
24
+ const Toggle = Object.assign(ToggleFacade, {
25
+ ...Toggle$1,
26
+ Root: ToggleRoot
27
+ });
8
28
  injectComponentStyle("toggle");
9
29
  //#endregion
10
30
  export { Toggle };
@@ -5,11 +5,35 @@ type ToggleGroupRootProps = ComponentProps<typeof ToggleGroup$1.Root> & {
5
5
  /** One rung of the control-height ladder for the items. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function ToggleGroupRoot({ size, ...rest }: ToggleGroupRootProps): import("react").JSX.Element;
8
+ declare function ToggleGroupRoot(props: ToggleGroupRootProps): import("react").JSX.Element;
9
+ export type ToggleGroupItem = {
10
+ value: string;
11
+ label: string;
12
+ /** A built-in core-registry icon; omit it to render the label as text. */
13
+ icon?: string;
14
+ disabled?: boolean;
15
+ };
16
+ export interface ToggleGroupFacadeProps {
17
+ value?: string | string[];
18
+ defaultValue?: string | string[];
19
+ items: ToggleGroupItem[];
20
+ label?: string;
21
+ multiple?: boolean;
22
+ disabled?: boolean;
23
+ /** One rung of the control-height ladder for the items. */
24
+ size?: "sm" | "md" | "lg";
25
+ className?: string;
26
+ onValueChange?: (value: string | string[]) => void;
27
+ }
28
+ declare function ToggleGroupFacade({ value, defaultValue, items, label, multiple, disabled, size, className, onValueChange }: ToggleGroupFacadeProps): import("react").JSX.Element;
29
+ declare namespace ToggleGroupFacade {
30
+ var displayName: string;
31
+ }
9
32
  /** Ark's ToggleGroup, dressed in the paper-and-ink system: a hairline tray
10
33
  * of quiet seals where the pressed item takes the flat ink fill. The API is
11
34
  * Ark's own — Root, Item. */
12
- export declare const ToggleGroup: Omit<typeof ToggleGroup$1, "Root"> & {
35
+ type ToggleGroupParts = Omit<typeof ToggleGroup$1, "Root"> & {
13
36
  Root: typeof ToggleGroupRoot;
14
37
  };
38
+ export declare const ToggleGroup: typeof ToggleGroupFacade & ToggleGroupParts;
15
39
  //#endregion
@@ -1,20 +1,45 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
3
  import { injectComponentStyle } from "@bysages/core";
2
4
  import { jsx } from "react/jsx-runtime";
3
5
  import { ToggleGroup as ToggleGroup$1 } from "@ark-ui/react/toggle-group";
4
6
  //#region src/components/toggle-group/index.tsx
5
- function ToggleGroupRoot({ size = "md", ...rest }) {
7
+ function ToggleGroupRoot(props) {
8
+ const id = useElementId("toggle-group", props);
9
+ const { size = "md", ...rest } = props;
6
10
  return /* @__PURE__ */ jsx(ToggleGroup$1.Root, {
7
11
  ...rest,
12
+ id,
8
13
  "data-size": size
9
14
  });
10
15
  }
11
- /** Ark's ToggleGroup, dressed in the paper-and-ink system: a hairline tray
12
- * of quiet seals where the pressed item takes the flat ink fill. The API is
13
- * Ark's own — Root, Item. */
14
- const ToggleGroup = {
16
+ function toArkValue(value) {
17
+ return value === void 0 ? [] : Array.isArray(value) ? value : [value];
18
+ }
19
+ function ToggleGroupFacade({ value, defaultValue, items, label, multiple = false, disabled = false, size = "md", className, onValueChange }) {
20
+ return /* @__PURE__ */ jsx(ToggleGroupRoot, {
21
+ className,
22
+ size,
23
+ "aria-label": label,
24
+ disabled,
25
+ multiple,
26
+ defaultValue: toArkValue(defaultValue),
27
+ ...value === void 0 ? {} : { value: toArkValue(value) },
28
+ onValueChange: (details) => onValueChange?.(multiple ? details.value : details.value.at(0) ?? ""),
29
+ children: items.map((item) => /* @__PURE__ */ jsx(ToggleGroup$1.Item, {
30
+ value: item.value,
31
+ disabled: item.disabled,
32
+ "aria-label": item.label,
33
+ "data-variant": item.icon ? "icon" : "text",
34
+ children: item.icon ? iconNode(item.icon) : item.label
35
+ }, item.value))
36
+ });
37
+ }
38
+ ToggleGroupFacade.displayName = "SToggleGroup";
39
+ const ToggleGroup = Object.assign(ToggleGroupFacade, {
15
40
  ...ToggleGroup$1,
16
41
  Root: ToggleGroupRoot
17
- };
42
+ });
18
43
  injectComponentStyle("toggle-group");
19
44
  //#endregion
20
45
  export { ToggleGroup };
@@ -13,5 +13,8 @@ export interface ToolbarProps extends HTMLAttributes<HTMLDivElement> {
13
13
  /** A workbench rail: the start tools at the leading edge, the end tools
14
14
  * at the trailing, the rail itself carrying the toolbar role so
15
15
  * assistive tech reads it as one group of commands. */
16
- export declare function Toolbar({ label, start, end, children, ...rest }: ToolbarProps): import("react").JSX.Element;
16
+ declare function ToolbarImpl({ label, start, end, children, ...rest }: ToolbarProps): import("react").JSX.Element;
17
+ export declare const Toolbar: typeof ToolbarImpl & {
18
+ Root: typeof ToolbarImpl;
19
+ };
17
20
  //#endregion
@@ -1,10 +1,11 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  //#region src/components/toolbar/index.tsx
4
5
  /** A workbench rail: the start tools at the leading edge, the end tools
5
6
  * at the trailing, the rail itself carrying the toolbar role so
6
7
  * assistive tech reads it as one group of commands. */
7
- function Toolbar({ label, start, end, children, ...rest }) {
8
+ function ToolbarImpl({ label, start, end, children, ...rest }) {
8
9
  injectComponentStyle("toolbar");
9
10
  return /* @__PURE__ */ jsxs("div", {
10
11
  ...rest,
@@ -25,5 +26,6 @@ function Toolbar({ label, start, end, children, ...rest }) {
25
26
  }) : null]
26
27
  });
27
28
  }
29
+ const Toolbar = withSelfRoot(ToolbarImpl);
28
30
  //#endregion
29
31
  export { Toolbar };
@@ -1,7 +1,20 @@
1
+ import { ReactNode } from "react";
1
2
  import { Tooltip as Tooltip$1 } from "@ark-ui/react/tooltip";
2
3
  //#region src/components/tooltip/index.d.ts
3
- /** Ark's Tooltip, dressed in the paper-and-ink system: the smallest
4
- * vessel — a tight chip of ink that dissolves in over its anchor. The
5
- * API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
6
- export declare const Tooltip: typeof Tooltip$1;
4
+ type TooltipPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end" | "right" | "right-start" | "right-end";
5
+ export interface TooltipFacadeProps {
6
+ open?: boolean;
7
+ defaultOpen?: boolean;
8
+ trigger: ReactNode;
9
+ content: string;
10
+ disabled?: boolean;
11
+ placement?: TooltipPlacement;
12
+ onOpenChange?: (open: boolean) => void;
13
+ }
14
+ declare function TooltipFacade({ open, defaultOpen, trigger, content, disabled, placement, onOpenChange }: TooltipFacadeProps): import("react").JSX.Element;
15
+ declare namespace TooltipFacade {
16
+ var displayName: string;
17
+ }
18
+ type TooltipParts = typeof Tooltip$1;
19
+ export declare const Tooltip: typeof TooltipFacade & TooltipParts;
7
20
  //#endregion
@@ -1,10 +1,37 @@
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { isValidElement } from "react";
2
5
  import { Tooltip as Tooltip$1 } from "@ark-ui/react/tooltip";
3
6
  //#region src/components/tooltip/index.tsx
4
7
  /** Ark's Tooltip, dressed in the paper-and-ink system: the smallest
5
8
  * vessel — a tight chip of ink that dissolves in over its anchor. The
6
9
  * API is Ark's own — Root, Trigger, Positioner, Content, Arrow, ArrowTip. */
7
- const Tooltip = Tooltip$1;
10
+ function TooltipRoot(props) {
11
+ const id = useElementId("tooltip", props);
12
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, {
13
+ ...props,
14
+ id
15
+ });
16
+ }
17
+ function TooltipFacade({ open, defaultOpen, trigger, content, disabled = false, placement, onOpenChange }) {
18
+ return /* @__PURE__ */ jsxs(TooltipRoot, {
19
+ ...placement === void 0 ? {} : { positioning: { placement } },
20
+ ...open === void 0 ? {} : { open },
21
+ ...defaultOpen === void 0 ? {} : { defaultOpen },
22
+ onOpenChange: (details) => onOpenChange?.(details.open),
23
+ children: [/* @__PURE__ */ jsx(Tooltip$1.Trigger, {
24
+ asChild: isValidElement(trigger),
25
+ disabled,
26
+ children: trigger
27
+ }), /* @__PURE__ */ jsx(Tooltip$1.Positioner, { children: /* @__PURE__ */ jsxs(Tooltip$1.Content, { children: [/* @__PURE__ */ jsx(Tooltip$1.Arrow, { children: /* @__PURE__ */ jsx(Tooltip$1.ArrowTip, {}) }), content] }) })]
28
+ });
29
+ }
30
+ TooltipFacade.displayName = "STooltip";
31
+ const Tooltip = Object.assign(TooltipFacade, {
32
+ ...Tooltip$1,
33
+ Root: TooltipRoot
34
+ });
8
35
  injectComponentStyle("tooltip");
9
36
  //#endregion
10
37
  export { Tooltip };
@@ -1,11 +1,20 @@
1
- import { Tour as Tour$1, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, useTour } from "@ark-ui/react/tour";
1
+ import { ReactNode } from "react";
2
+ import { Tour as Tour$1, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, UseTourProps, UseTourReturn } from "@ark-ui/react/tour";
2
3
  //#region src/components/tour/index.d.ts
3
- /** Ark's Tour, dressed in the paper-and-ink system: a dimmed page where
4
- * the spotlight alone keeps the focus halo, and the anchored card rides
5
- * the shared popup vessel. The API is Ark's own — Root, Backdrop,
6
- * Spotlight, Positioner, Content, Arrow, ArrowTip, Title, Description,
7
- * ProgressText, Control, Actions, ActionTrigger, CloseTrigger, plus
8
- * useTour. */
9
- export declare const Tour: typeof Tour$1;
4
+ export interface TourFacadeProps {
5
+ tour: UseTourReturn;
6
+ trigger?: string;
7
+ /** Replaces the standard card body when supplied. */
8
+ content?: ReactNode;
9
+ children?: ReactNode;
10
+ }
11
+ declare function TourFacade({ tour, trigger, content, children }: TourFacadeProps): import("react").JSX.Element;
12
+ declare namespace TourFacade {
13
+ var displayName: string;
14
+ }
15
+ type TourParts = typeof Tour$1;
16
+ export declare const Tour: typeof TourFacade & TourParts;
17
+ /** Tour machines are created by useTour, so the stable id belongs there. */
18
+ export declare function useTour(props?: UseTourProps): UseTourReturn;
10
19
  //#endregion
11
- export { type TourInteractOutsideEvent, type TourPointerDownOutsideEvent, type TourStepDetails, useTour };
20
+ export type { TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails };
@@ -1,5 +1,8 @@
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { Button } from "../button/index.mjs";
1
3
  import { injectComponentStyle } from "@bysages/core";
2
- import { Tour as Tour$1, useTour } from "@ark-ui/react/tour";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { Tour as Tour$1, useTour as useTour$1 } from "@ark-ui/react/tour";
3
6
  //#region src/components/tour/index.tsx
4
7
  /** Ark's Tour, dressed in the paper-and-ink system: a dimmed page where
5
8
  * the spotlight alone keeps the focus halo, and the anchored card rides
@@ -7,7 +10,46 @@ import { Tour as Tour$1, useTour } from "@ark-ui/react/tour";
7
10
  * Spotlight, Positioner, Content, Arrow, ArrowTip, Title, Description,
8
11
  * ProgressText, Control, Actions, ActionTrigger, CloseTrigger, plus
9
12
  * useTour. */
10
- const Tour = Tour$1;
13
+ function TourRoot(props) {
14
+ return /* @__PURE__ */ jsx(Tour$1.Root, { ...props });
15
+ }
16
+ function TourFacade({ tour, trigger = "Start tour", content, children }) {
17
+ return /* @__PURE__ */ jsxs(TourRoot, {
18
+ tour,
19
+ children: [
20
+ /* @__PURE__ */ jsx(Button, {
21
+ size: "sm",
22
+ onClick: () => tour.start(),
23
+ children: trigger
24
+ }),
25
+ children,
26
+ /* @__PURE__ */ jsx(Tour$1.Backdrop, {}),
27
+ /* @__PURE__ */ jsx(Tour$1.Spotlight, {}),
28
+ /* @__PURE__ */ jsx(Tour$1.Positioner, { children: /* @__PURE__ */ jsx(Tour$1.Content, { children: content ?? /* @__PURE__ */ jsxs(Fragment, { children: [
29
+ /* @__PURE__ */ jsx(Tour$1.ProgressText, {}),
30
+ /* @__PURE__ */ jsx(Tour$1.Title, {}),
31
+ /* @__PURE__ */ jsx(Tour$1.Description, {}),
32
+ /* @__PURE__ */ jsx(Tour$1.Control, { children: /* @__PURE__ */ jsx(Tour$1.Actions, { children: (actions) => actions.map((action) => /* @__PURE__ */ jsx(Tour$1.ActionTrigger, {
33
+ action,
34
+ children: action.label
35
+ }, action.label)) }) })
36
+ ] }) }) })
37
+ ]
38
+ });
39
+ }
40
+ TourFacade.displayName = "STour";
41
+ const Tour = Object.assign(TourFacade, {
42
+ ...Tour$1,
43
+ Root: TourRoot
44
+ });
45
+ /** Tour machines are created by useTour, so the stable id belongs there. */
46
+ function useTour(props = {}) {
47
+ const id = useElementId("tour", props);
48
+ return useTour$1({
49
+ id,
50
+ ...props
51
+ });
52
+ }
11
53
  injectComponentStyle("tour");
12
54
  //#endregion
13
55
  export { Tour, useTour };
@@ -1,3 +1,4 @@
1
+ import { Checkbox } from "../checkbox/index.mjs";
1
2
  import { HTMLAttributes } from "react";
2
3
  //#region src/components/transfer/index.d.ts
3
4
  export interface TransferItem {
@@ -19,5 +20,6 @@ export interface TransferProps extends HTMLAttributes<HTMLDivElement> {
19
20
  * `value` is the target column's value list; everything else in `data`
20
21
  * stays on the left. `searchable` adds a filter line to each panel.
21
22
  */
22
- export declare function Transfer({ value, data, titles, searchable, disabled, onValueChange, ...rest }: TransferProps): import("react").JSX.Element;
23
+ declare function TransferImpl({ value, data, titles, searchable, disabled, onValueChange, ...rest }: TransferProps): import("react").JSX.Element;
24
+ export declare const Transfer: typeof TransferImpl & typeof Checkbox;
23
25
  //#endregion
@@ -1,32 +1,17 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
3
  import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
2
4
  import { Button } from "../button/index.mjs";
3
- import { t as Input } from "../../input-2oezH-dY.mjs";
5
+ import { t as Input } from "../../input-C21Zzuy6.mjs";
6
+ import { Checkbox as Checkbox$1 } from "../checkbox/index.mjs";
4
7
  import { injectComponentStyle } from "@bysages/core";
5
8
  import { jsx, jsxs } from "react/jsx-runtime";
6
9
  import { useState } from "react";
7
10
  import { Checkbox } from "@ark-ui/react/checkbox";
8
11
  //#region src/components/transfer/index.tsx
9
- const checkGlyph = /* @__PURE__ */ jsx("svg", {
10
- viewBox: "0 0 24 24",
11
- fill: "none",
12
- stroke: "currentColor",
13
- strokeWidth: 3,
14
- strokeLinecap: "round",
15
- strokeLinejoin: "round",
16
- "aria-hidden": "true",
17
- children: /* @__PURE__ */ jsx("path", { d: "m5 12.5 5 5L19 7" })
18
- });
19
- function arrowGlyph(direction) {
20
- return /* @__PURE__ */ jsx("svg", {
21
- viewBox: "0 0 24 24",
22
- fill: "none",
23
- stroke: "currentColor",
24
- strokeWidth: 1.75,
25
- strokeLinecap: "round",
26
- strokeLinejoin: "round",
27
- "aria-hidden": "true",
28
- children: /* @__PURE__ */ jsx("path", { d: direction === "right" ? "M5 12h14m-6-6 6 6-6 6" : "M19 12H5m6-6-6 6 6 6" })
29
- });
12
+ const checkIcon = iconNode("check");
13
+ function arrowIcon(direction) {
14
+ return iconNode(direction === "right" ? "arrow-right" : "arrow-left");
30
15
  }
31
16
  /**
32
17
  * Two ledgers and a crossing: items sit in the source column until the
@@ -34,9 +19,10 @@ function arrowGlyph(direction) {
34
19
  * `value` is the target column's value list; everything else in `data`
35
20
  * stays on the left. `searchable` adds a filter line to each panel.
36
21
  */
37
- function Transfer({ value = [], data, titles = ["Source", "Target"], searchable = false, disabled = false, onValueChange, ...rest }) {
22
+ function TransferImpl({ value = [], data, titles = ["Source", "Target"], searchable = false, disabled = false, onValueChange, ...rest }) {
38
23
  injectComponentStyle("transfer");
39
24
  injectComponentStyle("checkbox");
25
+ const id = useElementId("transfer", rest);
40
26
  const messages = useComponentMessages();
41
27
  const [checkedSource, setCheckedSource] = useState(() => /* @__PURE__ */ new Set());
42
28
  const [checkedTarget, setCheckedTarget] = useState(() => /* @__PURE__ */ new Set());
@@ -102,11 +88,12 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
102
88
  }) : items.map((item) => {
103
89
  const locked = disabled || item.disabled === true;
104
90
  return /* @__PURE__ */ jsxs(Checkbox.Root, {
91
+ id: `${id}-${side}-${item.value}`,
105
92
  checked: checked.has(item.value),
106
93
  disabled: locked,
107
94
  onCheckedChange: () => toggle(side, item.value),
108
95
  children: [
109
- /* @__PURE__ */ jsx(Checkbox.Control, { children: /* @__PURE__ */ jsx(Checkbox.Indicator, { children: checkGlyph }) }),
96
+ /* @__PURE__ */ jsx(Checkbox.Control, { children: /* @__PURE__ */ jsx(Checkbox.Indicator, { children: checkIcon }) }),
110
97
  /* @__PURE__ */ jsx(Checkbox.Label, {
111
98
  "data-part": "label",
112
99
  children: item.label
@@ -137,7 +124,7 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
137
124
  disabled: checkedSource.size === 0 || disabled,
138
125
  "aria-label": messages.transfer.moveRight,
139
126
  onClick: () => move(true),
140
- children: arrowGlyph("right")
127
+ children: arrowIcon("right")
141
128
  }), /* @__PURE__ */ jsx(Button, {
142
129
  variant: "outline",
143
130
  size: "sm",
@@ -145,12 +132,13 @@ function Transfer({ value = [], data, titles = ["Source", "Target"], searchable
145
132
  disabled: checkedTarget.size === 0 || disabled,
146
133
  "aria-label": messages.transfer.moveLeft,
147
134
  onClick: () => move(false),
148
- children: arrowGlyph("left")
135
+ children: arrowIcon("left")
149
136
  })]
150
137
  }),
151
138
  panel("target", titles[1], targetQuery, setTargetQuery, checkedTarget, targetItems)
152
139
  ]
153
140
  });
154
141
  }
142
+ const Transfer = Object.assign(TransferImpl, Checkbox$1);
155
143
  //#endregion
156
144
  export { Transfer };
@@ -1,3 +1,4 @@
1
+ import { t as Popover } from "../../index-Eu-Bttta.mjs";
1
2
  import { HTMLAttributes } from "react";
2
3
  //#region src/components/tree-select/index.d.ts
3
4
  export interface TreeSelectNode {
@@ -24,5 +25,6 @@ export interface TreeSelectProps extends HTMLAttributes<HTMLDivElement> {
24
25
  size?: "sm" | "md" | "lg";
25
26
  onValueChange?: (value: string) => void;
26
27
  }
27
- export declare function TreeSelect({ value, data, placeholder, filterable, disabled, size, onValueChange, ...rest }: TreeSelectProps): import("react").JSX.Element;
28
+ declare function TreeSelectImpl({ value, data, placeholder, filterable, disabled, size, onValueChange, ...rest }: TreeSelectProps): import("react").JSX.Element;
29
+ export declare const TreeSelect: typeof TreeSelectImpl & typeof Popover;
28
30
  //#endregion
@@ -1,5 +1,8 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
3
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
- import { t as Input } from "../../input-2oezH-dY.mjs";
4
+ import { Popover as Popover$1 } from "../popover/index.mjs";
5
+ import { t as Input } from "../../input-C21Zzuy6.mjs";
3
6
  import { injectComponentStyle } from "@bysages/core";
4
7
  import { jsx, jsxs } from "react/jsx-runtime";
5
8
  import { useMemo, useState } from "react";
@@ -8,16 +11,7 @@ import { Portal } from "@ark-ui/react/portal";
8
11
  import { useFilter } from "@ark-ui/react/locale";
9
12
  import { TreeView, createTreeCollection } from "@ark-ui/react/tree-view";
10
13
  //#region src/components/tree-select/index.tsx
11
- const chevron = /* @__PURE__ */ jsx("svg", {
12
- viewBox: "0 0 24 24",
13
- fill: "none",
14
- stroke: "currentColor",
15
- strokeWidth: 2,
16
- strokeLinecap: "round",
17
- strokeLinejoin: "round",
18
- "aria-hidden": "true",
19
- children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" })
20
- });
14
+ const chevron = iconNode("chevron-right");
21
15
  const chevronDown = /* @__PURE__ */ jsx("span", {
22
16
  "data-part": "chevron",
23
17
  "aria-hidden": "true",
@@ -30,21 +24,13 @@ function TreeSelectRow({ node, indexPath }) {
30
24
  children: node.children ? /* @__PURE__ */ jsxs(TreeView.Branch, { children: [/* @__PURE__ */ jsxs(TreeView.BranchControl, { children: [/* @__PURE__ */ jsx(TreeView.BranchIndicator, { children: chevron }), /* @__PURE__ */ jsx(TreeView.BranchText, { children: node.label })] }), /* @__PURE__ */ jsxs(TreeView.BranchContent, { children: [/* @__PURE__ */ jsx(TreeView.BranchIndentGuide, {}), node.children.map((child, index) => /* @__PURE__ */ jsx(TreeSelectRow, {
31
25
  node: child,
32
26
  indexPath: [...indexPath, index]
33
- }, child.value))] })] }) : /* @__PURE__ */ jsx(TreeView.Item, {
34
- asChild: true,
35
- children: /* @__PURE__ */ jsx("span", {
36
- style: {
37
- display: "flex",
38
- inlineSize: "100%"
39
- },
40
- children: /* @__PURE__ */ jsx(TreeView.ItemText, { children: node.label })
41
- })
42
- })
27
+ }, child.value))] })] }) : /* @__PURE__ */ jsx(TreeView.Item, { children: /* @__PURE__ */ jsx(TreeView.ItemText, { children: node.label }) })
43
28
  });
44
29
  }
45
- function TreeSelect({ value, data, placeholder = "Select…", filterable = false, disabled = false, size = "md", onValueChange, ...rest }) {
30
+ function TreeSelectImpl({ value, data, placeholder = "Select…", filterable = false, disabled = false, size = "md", onValueChange, ...rest }) {
46
31
  injectComponentStyle("tree-select");
47
32
  injectComponentStyle("tree-view");
33
+ const hostId = useElementId("tree-select", rest);
48
34
  const messages = useComponentMessages();
49
35
  const [open, setOpen] = useState(false);
50
36
  const [query, setQuery] = useState("");
@@ -97,6 +83,7 @@ function TreeSelect({ value, data, placeholder = "Select…", filterable = false
97
83
  }
98
84
  return /* @__PURE__ */ jsxs(Popover.Root, {
99
85
  ...rest,
86
+ id: `${hostId}:popover`,
100
87
  open,
101
88
  onOpenChange: (details) => {
102
89
  setOpen(details.open);
@@ -141,6 +128,7 @@ function TreeSelect({ value, data, placeholder = "Select…", filterable = false
141
128
  "data-part": "empty",
142
129
  children: "Nothing matches"
143
130
  }) : /* @__PURE__ */ jsx(TreeView.Root, {
131
+ id: `${hostId}:tree`,
144
132
  collection: visibleCollection,
145
133
  selectionMode: "single",
146
134
  selectedValue: value ? [value] : [],
@@ -155,5 +143,6 @@ function TreeSelect({ value, data, placeholder = "Select…", filterable = false
155
143
  }) }) })]
156
144
  });
157
145
  }
146
+ const TreeSelect = Object.assign(TreeSelectImpl, Popover$1);
158
147
  //#endregion
159
148
  export { TreeSelect };
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from "react";
1
+ import { CSSProperties, ComponentProps } from "react";
2
2
  import { CollectionItem } from "@ark-ui/react/collection";
3
3
  import { TreeView as TreeView$1, TreeViewRootComponentProps } from "@ark-ui/react/tree-view";
4
4
  //#region src/components/tree-view/index.d.ts
@@ -20,7 +20,27 @@ declare function TreeViewNodeCheckbox(props: ComponentProps<typeof TreeView$1.No
20
20
  /** A branch is born with its chevron — the indicator stays a consumer's
21
21
  * children to override, never a chore to remember. */
22
22
  declare function TreeViewBranchIndicator(props: ComponentProps<typeof TreeView$1.BranchIndicator>): import("react").JSX.Element;
23
- export declare const TreeView: Omit<typeof TreeView$1, "Root" | "NodeCheckbox" | "BranchIndicator"> & {
23
+ type TreeOption = {
24
+ label: string;
25
+ value: string;
26
+ disabled?: boolean;
27
+ children?: TreeOption[];
28
+ };
29
+ type TreeViewFacadeProps = {
30
+ value?: string[];
31
+ defaultValue?: string[];
32
+ options: TreeOption[];
33
+ multiple?: boolean;
34
+ label?: string;
35
+ size?: "sm" | "md" | "lg";
36
+ className?: string;
37
+ style?: CSSProperties;
38
+ onValueChange?: (value: string[]) => void;
39
+ };
40
+ /** The complete tree behind selected values: nested options render their own
41
+ * branches and leaves, while async and checkbox trees remain anatomy work. */
42
+ declare function TreeViewFacade(props: TreeViewFacadeProps): import("react").JSX.Element;
43
+ export declare const TreeView: typeof TreeViewFacade & Omit<typeof TreeView$1, "Root" | "NodeCheckbox" | "BranchIndicator"> & {
24
44
  Root: typeof TreeViewRoot;
25
45
  NodeCheckbox: typeof TreeViewNodeCheckbox;
26
46
  BranchIndicator: typeof TreeViewBranchIndicator;