@bysages/react 0.3.1 → 0.4.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 (286) hide show
  1. package/dist/{ai-response-BfKTmtCt.mjs → ai-response-nhDOlELQ.mjs} +4 -2
  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 +32 -2
  5. package/dist/components/affix/index.d.mts +4 -1
  6. package/dist/components/affix/index.mjs +6 -4
  7. package/dist/components/ai/index.d.mts +1 -1
  8. package/dist/components/ai/index.mjs +6 -4
  9. package/dist/components/ai-action/index.d.mts +4 -1
  10. package/dist/components/ai-action/index.mjs +4 -2
  11. package/dist/components/ai-attachments/index.d.mts +10 -4
  12. package/dist/components/ai-attachments/index.mjs +17 -45
  13. package/dist/components/ai-message/index.d.mts +4 -1
  14. package/dist/components/ai-message/index.mjs +4 -2
  15. package/dist/components/ai-prompt-input/index.d.mts +5 -2
  16. package/dist/components/ai-prompt-input/index.mjs +11 -15
  17. package/dist/components/ai-reasoning/index.d.mts +4 -1
  18. package/dist/components/ai-reasoning/index.mjs +5 -3
  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 +6 -3
  23. package/dist/components/ai-suggestion/index.d.mts +4 -1
  24. package/dist/components/ai-suggestion/index.mjs +4 -2
  25. package/dist/components/ai-tool/index.d.mts +4 -1
  26. package/dist/components/ai-tool/index.mjs +5 -3
  27. package/dist/components/alert/index.d.mts +2 -0
  28. package/dist/components/alert/index.mjs +12 -19
  29. package/dist/components/angle-slider/index.d.mts +19 -2
  30. package/dist/components/angle-slider/index.mjs +32 -9
  31. package/dist/components/aspect-ratio/index.d.mts +4 -1
  32. package/dist/components/aspect-ratio/index.mjs +4 -2
  33. package/dist/components/autocomplete/index.d.mts +3 -1
  34. package/dist/components/autocomplete/index.mjs +15 -3
  35. package/dist/components/avatar/index.d.mts +2 -2
  36. package/dist/components/avatar/index.mjs +10 -3
  37. package/dist/components/avatar-group/index.d.mts +4 -1
  38. package/dist/components/avatar-group/index.mjs +4 -2
  39. package/dist/components/back-top/index.d.mts +7 -1
  40. package/dist/components/back-top/index.mjs +13 -18
  41. package/dist/components/badge/index.d.mts +4 -1
  42. package/dist/components/badge/index.mjs +4 -2
  43. package/dist/components/banner/index.mjs +3 -12
  44. package/dist/components/bento/index.mjs +1 -1
  45. package/dist/components/block-ui/index.d.mts +4 -1
  46. package/dist/components/block-ui/index.mjs +4 -2
  47. package/dist/components/breadcrumb/index.mjs +1 -1
  48. package/dist/components/browser/index.mjs +1 -1
  49. package/dist/components/button/index.d.mts +4 -1
  50. package/dist/components/button/index.mjs +4 -2
  51. package/dist/components/button-group/index.mjs +1 -1
  52. package/dist/components/calendar/index.d.mts +3 -1
  53. package/dist/components/calendar/index.mjs +10 -11
  54. package/dist/components/card/index.mjs +1 -1
  55. package/dist/components/carousel/index.d.mts +21 -1
  56. package/dist/components/carousel/index.mjs +44 -3
  57. package/dist/components/cascade-select/index.d.mts +6 -1
  58. package/dist/components/cascade-select/index.mjs +13 -36
  59. package/dist/components/checkbox/index.d.mts +20 -2
  60. package/dist/components/checkbox/index.mjs +29 -9
  61. package/dist/components/checkbox-group/index.d.mts +8 -6
  62. package/dist/components/checkbox-group/index.mjs +45 -49
  63. package/dist/components/chip/index.d.mts +4 -1
  64. package/dist/components/chip/index.mjs +4 -2
  65. package/dist/components/client-only/index.d.mts +7 -2
  66. package/dist/components/client-only/index.mjs +5 -1
  67. package/dist/components/clipboard/index.d.mts +17 -4
  68. package/dist/components/clipboard/index.mjs +34 -6
  69. package/dist/components/collapsible/index.d.mts +16 -4
  70. package/dist/components/collapsible/index.mjs +26 -2
  71. package/dist/components/color-picker/index.d.mts +20 -4
  72. package/dist/components/color-picker/index.mjs +57 -15
  73. package/dist/components/combobox/index.d.mts +27 -1
  74. package/dist/components/combobox/index.mjs +63 -6
  75. package/dist/components/command/index.d.mts +4 -1
  76. package/dist/components/command/index.mjs +8 -2
  77. package/dist/components/comment/index.d.mts +4 -1
  78. package/dist/components/comment/index.mjs +4 -2
  79. package/dist/components/config-provider/index.d.mts +4 -1
  80. package/dist/components/config-provider/index.mjs +3 -1
  81. package/dist/components/container/index.d.mts +4 -1
  82. package/dist/components/container/index.mjs +4 -2
  83. package/dist/components/data-view/index.d.mts +4 -1
  84. package/dist/components/data-view/index.mjs +4 -2
  85. package/dist/components/date-input/index.d.mts +19 -4
  86. package/dist/components/date-input/index.mjs +34 -10
  87. package/dist/components/date-picker/index.d.mts +21 -4
  88. package/dist/components/date-picker/index.mjs +59 -12
  89. package/dist/components/deferred-content/index.d.mts +4 -1
  90. package/dist/components/deferred-content/index.mjs +4 -2
  91. package/dist/components/descriptions/index.d.mts +10 -2
  92. package/dist/components/descriptions/index.mjs +14 -9
  93. package/dist/components/dialog/index.d.mts +18 -5
  94. package/dist/components/dialog/index.mjs +44 -2
  95. package/dist/components/dock/index.mjs +1 -1
  96. package/dist/components/download-trigger/index.d.mts +7 -2
  97. package/dist/components/download-trigger/index.mjs +5 -1
  98. package/dist/components/drawer/index.d.mts +18 -6
  99. package/dist/components/drawer/index.mjs +41 -2
  100. package/dist/components/dynamic-input/index.d.mts +4 -1
  101. package/dist/components/dynamic-input/index.mjs +11 -19
  102. package/dist/components/editable/index.d.mts +28 -7
  103. package/dist/components/editable/index.mjs +44 -5
  104. package/dist/components/ellipsis/index.d.mts +4 -1
  105. package/dist/components/ellipsis/index.mjs +4 -2
  106. package/dist/components/empty/index.mjs +1 -1
  107. package/dist/components/field/index.d.mts +30 -5
  108. package/dist/components/field/index.mjs +37 -4
  109. package/dist/components/fieldset/index.d.mts +19 -4
  110. package/dist/components/fieldset/index.mjs +29 -4
  111. package/dist/components/file-upload/index.d.mts +29 -9
  112. package/dist/components/file-upload/index.mjs +47 -11
  113. package/dist/components/float-button/index.mjs +1 -1
  114. package/dist/components/floating-panel/index.d.mts +18 -6
  115. package/dist/components/floating-panel/index.mjs +56 -2
  116. package/dist/components/focus-trap/index.d.mts +7 -2
  117. package/dist/components/focus-trap/index.mjs +5 -1
  118. package/dist/components/form/index.d.mts +1 -1
  119. package/dist/components/form/index.mjs +6 -3
  120. package/dist/components/frame/index.d.mts +4 -8
  121. package/dist/components/frame/index.mjs +13 -1
  122. package/dist/components/grid/index.d.mts +4 -1
  123. package/dist/components/grid/index.mjs +4 -2
  124. package/dist/components/highlight/index.d.mts +3 -5
  125. package/dist/components/highlight/index.mjs +7 -2
  126. package/dist/components/hover-card/index.d.mts +20 -4
  127. package/dist/components/hover-card/index.mjs +33 -2
  128. package/dist/components/icon/index.d.mts +10 -8
  129. package/dist/components/icon/index.mjs +6 -4
  130. package/dist/components/image/index.d.mts +5 -2
  131. package/dist/components/image/index.mjs +15 -30
  132. package/dist/components/image-cropper/index.d.mts +13 -2
  133. package/dist/components/image-cropper/index.mjs +35 -3
  134. package/dist/components/image-viewer/index.d.mts +2 -24
  135. package/dist/components/image-viewer/index.mjs +3 -113
  136. package/dist/components/input/index.d.mts +3 -1
  137. package/dist/components/input/index.mjs +1 -1
  138. package/dist/components/input-group/index.mjs +1 -1
  139. package/dist/components/json-tree-view/index.d.mts +17 -1
  140. package/dist/components/json-tree-view/index.mjs +27 -6
  141. package/dist/components/kbd/index.d.mts +4 -1
  142. package/dist/components/kbd/index.mjs +4 -2
  143. package/dist/components/layout/index.d.mts +25 -7
  144. package/dist/components/layout/index.mjs +158 -64
  145. package/dist/components/link/index.d.mts +4 -1
  146. package/dist/components/link/index.mjs +4 -2
  147. package/dist/components/list/index.mjs +1 -1
  148. package/dist/components/listbox/index.d.mts +22 -1
  149. package/dist/components/listbox/index.mjs +37 -5
  150. package/dist/components/marquee/index.d.mts +18 -1
  151. package/dist/components/marquee/index.mjs +35 -3
  152. package/dist/components/masonry/index.d.mts +4 -1
  153. package/dist/components/masonry/index.mjs +4 -2
  154. package/dist/components/media-player/index.d.mts +2 -0
  155. package/dist/components/media-player/index.mjs +2 -0
  156. package/dist/components/mentions/index.d.mts +1 -1
  157. package/dist/components/mentions/index.mjs +1 -1
  158. package/dist/components/menu/index.d.mts +29 -11
  159. package/dist/components/menu/index.mjs +35 -13
  160. package/dist/components/menubar/index.d.mts +3 -1
  161. package/dist/components/menubar/index.mjs +7 -2
  162. package/dist/components/meter/index.mjs +1 -1
  163. package/dist/components/navigation-menu/index.d.mts +25 -1
  164. package/dist/components/navigation-menu/index.mjs +37 -2
  165. package/dist/components/number-input/index.d.mts +28 -6
  166. package/dist/components/number-input/index.mjs +34 -9
  167. package/dist/components/order-list/index.d.mts +4 -1
  168. package/dist/components/order-list/index.mjs +27 -25
  169. package/dist/components/page-header/index.mjs +1 -1
  170. package/dist/components/pagination/index.d.mts +23 -3
  171. package/dist/components/pagination/index.mjs +58 -13
  172. package/dist/components/password-input/index.d.mts +24 -6
  173. package/dist/components/password-input/index.mjs +32 -9
  174. package/dist/components/pin-input/index.d.mts +23 -5
  175. package/dist/components/pin-input/index.mjs +30 -8
  176. package/dist/components/popconfirm/index.d.mts +9 -5
  177. package/dist/components/popconfirm/index.mjs +24 -19
  178. package/dist/components/popover/index.d.mts +2 -8
  179. package/dist/components/popover/index.mjs +45 -5
  180. package/dist/components/presence/index.d.mts +10 -2
  181. package/dist/components/presence/index.mjs +6 -1
  182. package/dist/components/progress/index.d.mts +18 -3
  183. package/dist/components/progress/index.mjs +35 -10
  184. package/dist/components/progress-group/index.d.mts +4 -1
  185. package/dist/components/progress-group/index.mjs +5 -3
  186. package/dist/components/qr-code/index.d.mts +14 -1
  187. package/dist/components/qr-code/index.mjs +27 -3
  188. package/dist/components/radio-group/index.d.mts +27 -2
  189. package/dist/components/radio-group/index.mjs +33 -9
  190. package/dist/components/rating-group/index.d.mts +20 -3
  191. package/dist/components/rating-group/index.mjs +27 -9
  192. package/dist/components/result/index.d.mts +1 -1
  193. package/dist/components/result/index.mjs +3 -3
  194. package/dist/components/scroll-area/index.d.mts +14 -1
  195. package/dist/components/scroll-area/index.mjs +33 -3
  196. package/dist/components/segment-group/index.d.mts +28 -2
  197. package/dist/components/segment-group/index.mjs +35 -8
  198. package/dist/components/select/index.d.mts +2 -2
  199. package/dist/components/select/index.mjs +1 -1
  200. package/dist/components/separator/index.d.mts +4 -1
  201. package/dist/components/separator/index.mjs +4 -2
  202. package/dist/components/signature-pad/index.d.mts +25 -5
  203. package/dist/components/signature-pad/index.mjs +38 -4
  204. package/dist/components/skeleton/index.d.mts +4 -1
  205. package/dist/components/skeleton/index.mjs +4 -2
  206. package/dist/components/slider/index.d.mts +21 -2
  207. package/dist/components/slider/index.mjs +32 -9
  208. package/dist/components/spinner/index.d.mts +4 -1
  209. package/dist/components/spinner/index.mjs +4 -2
  210. package/dist/components/split-button/index.d.mts +3 -1
  211. package/dist/components/split-button/index.mjs +13 -18
  212. package/dist/components/splitter/index.d.mts +17 -4
  213. package/dist/components/splitter/index.mjs +36 -2
  214. package/dist/components/spotlight/index.d.mts +4 -1
  215. package/dist/components/spotlight/index.mjs +4 -2
  216. package/dist/components/stack/index.d.mts +4 -1
  217. package/dist/components/stack/index.mjs +7 -5
  218. package/dist/components/stat/index.mjs +1 -1
  219. package/dist/components/steps/index.d.mts +26 -6
  220. package/dist/components/steps/index.mjs +27 -12
  221. package/dist/components/swap/index.d.mts +11 -5
  222. package/dist/components/swap/index.mjs +31 -4
  223. package/dist/components/switch/index.d.mts +20 -2
  224. package/dist/components/switch/index.mjs +28 -9
  225. package/dist/components/table/index.d.mts +4 -1
  226. package/dist/components/table/index.mjs +38 -60
  227. package/dist/components/tabs/index.d.mts +24 -2
  228. package/dist/components/tabs/index.mjs +26 -10
  229. package/dist/components/tags-input/index.d.mts +33 -8
  230. package/dist/components/tags-input/index.mjs +42 -10
  231. package/dist/components/terminal/index.d.mts +4 -1
  232. package/dist/components/terminal/index.mjs +4 -2
  233. package/dist/components/textarea/index.d.mts +4 -1
  234. package/dist/components/textarea/index.mjs +4 -2
  235. package/dist/components/timeline/index.mjs +1 -1
  236. package/dist/components/timer/index.d.mts +18 -1
  237. package/dist/components/timer/index.mjs +52 -3
  238. package/dist/components/toast/index.d.mts +3 -6
  239. package/dist/components/toast/index.mjs +23 -3
  240. package/dist/components/toc/index.d.mts +19 -5
  241. package/dist/components/toc/index.mjs +32 -6
  242. package/dist/components/toggle/index.d.mts +11 -4
  243. package/dist/components/toggle/index.mjs +22 -2
  244. package/dist/components/toggle-group/index.d.mts +26 -2
  245. package/dist/components/toggle-group/index.mjs +32 -7
  246. package/dist/components/toolbar/index.d.mts +4 -1
  247. package/dist/components/toolbar/index.mjs +4 -2
  248. package/dist/components/tooltip/index.d.mts +17 -4
  249. package/dist/components/tooltip/index.mjs +29 -2
  250. package/dist/components/tour/index.d.mts +18 -9
  251. package/dist/components/tour/index.mjs +45 -3
  252. package/dist/components/transfer/index.d.mts +3 -1
  253. package/dist/components/transfer/index.mjs +15 -27
  254. package/dist/components/tree-select/index.d.mts +3 -1
  255. package/dist/components/tree-select/index.mjs +12 -23
  256. package/dist/components/tree-view/index.d.mts +22 -2
  257. package/dist/components/tree-view/index.mjs +51 -9
  258. package/dist/components/typography/index.d.mts +4 -0
  259. package/dist/components/typography/index.mjs +2 -1
  260. package/dist/components/user/index.d.mts +4 -1
  261. package/dist/components/user/index.mjs +4 -2
  262. package/dist/components/virtual-list/index.d.mts +4 -1
  263. package/dist/components/virtual-list/index.mjs +11 -13
  264. package/dist/components/watermark/index.d.mts +4 -1
  265. package/dist/components/watermark/index.mjs +5 -3
  266. package/dist/family-DE_GQeeM.mjs +9 -0
  267. package/dist/icon-BALgGtNK.mjs +18 -0
  268. package/dist/id-C37UYLwJ.mjs +13 -0
  269. package/dist/image-viewer-B-hKFkEw.mjs +141 -0
  270. package/dist/{index-Dn5mHf1g.d.mts → index-B4twHAQC.d.mts} +194 -106
  271. package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
  272. package/dist/index-BcRdWGY-.d.mts +115 -0
  273. package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
  274. package/dist/index-Dj8S4eyJ.d.mts +41 -0
  275. package/dist/index-Eu-Bttta.d.mts +24 -0
  276. package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
  277. package/dist/index.d.mts +36 -35
  278. package/dist/index.mjs +11 -10
  279. package/dist/{input-2oezH-dY.mjs → input-BDpQ0e6G.mjs} +4 -2
  280. package/dist/media-player-DjVvo1_7.mjs +554 -0
  281. package/dist/{mentions-DMIBCBOd.mjs → mentions-BwnyvdXz.mjs} +75 -43
  282. package/dist/select-i9UZsQCU.mjs +121 -0
  283. package/package.json +9 -81
  284. package/dist/chevron-BeHvt46K.mjs +0 -17
  285. package/dist/glyph-VI989p8H.mjs +0 -14
  286. package/dist/select-eAHutw56.mjs +0 -70
@@ -1,4 +1,4 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { injectComponentStyle } from "@bysages/core/styling";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/result/index.tsx
4
4
  const MARK = "<g data-for=\"success\"><path d=\"M20 6 9 17l-5-5\"/></g><g data-for=\"warning\"><path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></g><g data-for=\"danger\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></g><g data-for=\"info\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 16v-4\"/><path d=\"M12 8h.01\"/></g>";
@@ -48,12 +48,12 @@ function part(name, tag) {
48
48
  /** A verdict drawn after the deed: the mark washes in the fixed
49
49
  * pigment, the title rides the serif, and the extra carries the way
50
50
  * onward. Any subset composes. */
51
- const Result = {
51
+ const Result = Object.assign(ResultRoot, {
52
52
  Root: ResultRoot,
53
53
  Icon: ResultIcon,
54
54
  Title: part("title", "h3"),
55
55
  Description: part("description", "p"),
56
56
  Extra: part("extra", "div")
57
- };
57
+ });
58
58
  //#endregion
59
59
  export { Result, ResultIcon, ResultRoot };
@@ -1,7 +1,20 @@
1
+ import { CSSProperties, ComponentProps, ReactNode } from "react";
1
2
  import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
2
3
  //#region src/components/scroll-area/index.d.ts
3
4
  /** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
4
5
  * give way to quiet ink lanes that surface on hover and scroll. The API
5
6
  * is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
6
- export declare const ScrollArea: typeof ScrollArea$1;
7
+ declare function ScrollAreaRoot(props: ComponentProps<typeof ScrollArea$1.Root>): import("react").JSX.Element;
8
+ type ScrollAreaFacadeProps = {
9
+ orientation?: "vertical" | "horizontal" | "both";
10
+ className?: string;
11
+ style?: CSSProperties;
12
+ children?: ReactNode;
13
+ };
14
+ /** The complete scroll vessel around caller content, with one or both quiet
15
+ * lanes depending on orientation. */
16
+ declare function ScrollAreaFacade(props: ScrollAreaFacadeProps): import("react").JSX.Element;
17
+ export declare const ScrollArea: typeof ScrollAreaFacade & Omit<typeof ScrollArea$1, "Root"> & {
18
+ Root: typeof ScrollAreaRoot;
19
+ };
7
20
  //#endregion
@@ -1,10 +1,40 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
2
4
  import { ScrollArea as ScrollArea$1 } from "@ark-ui/react/scroll-area";
3
5
  //#region src/components/scroll-area/index.tsx
4
6
  /** Ark's ScrollArea, dressed in the paper-and-ink system: native bars
5
7
  * give way to quiet ink lanes that surface on hover and scroll. The API
6
8
  * is Ark's own — Root, Viewport, Content, Scrollbar, Thumb, Corner. */
7
- const ScrollArea = ScrollArea$1;
8
- injectComponentStyle("scroll-area");
9
+ function ScrollAreaRoot(props) {
10
+ injectComponentStyle("scroll-area");
11
+ const id = useElementId("scroll-area", props);
12
+ return /* @__PURE__ */ jsx(ScrollArea$1.Root, {
13
+ ...props,
14
+ id
15
+ });
16
+ }
17
+ /** The complete scroll vessel around caller content, with one or both quiet
18
+ * lanes depending on orientation. */
19
+ function ScrollAreaFacade(props) {
20
+ const { orientation = "vertical", className, style, children } = props;
21
+ const orientations = orientation === "both" ? ["vertical", "horizontal"] : [orientation];
22
+ return /* @__PURE__ */ jsxs(ScrollAreaRoot, {
23
+ className,
24
+ style,
25
+ children: [
26
+ /* @__PURE__ */ jsx(ScrollArea$1.Viewport, { children: /* @__PURE__ */ jsx(ScrollArea$1.Content, { children }) }),
27
+ orientations.map((item) => /* @__PURE__ */ jsx(ScrollArea$1.Scrollbar, {
28
+ orientation: item,
29
+ children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, {})
30
+ }, item)),
31
+ /* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
32
+ ]
33
+ });
34
+ }
35
+ const ScrollArea = Object.assign(ScrollAreaFacade, {
36
+ ...ScrollArea$1,
37
+ Root: ScrollAreaRoot
38
+ });
9
39
  //#endregion
10
40
  export { ScrollArea };
@@ -8,11 +8,37 @@ type SegmentGroupRootProps = ComponentProps<typeof SegmentGroup$1.Root> & {
8
8
  * height. */
9
9
  size?: "sm" | "md" | "lg";
10
10
  };
11
- declare function SegmentGroupRoot({ size, ...rest }: SegmentGroupRootProps): import("react").JSX.Element;
11
+ declare function SegmentGroupRoot(props: SegmentGroupRootProps): import("react").JSX.Element;
12
+ export type SegmentGroupItem = {
13
+ value: string;
14
+ label: string;
15
+ disabled?: boolean;
16
+ };
17
+ export interface SegmentGroupFacadeProps {
18
+ value?: string;
19
+ defaultValue?: string;
20
+ items: SegmentGroupItem[];
21
+ label?: string;
22
+ disabled?: boolean;
23
+ readOnly?: boolean;
24
+ orientation?: "horizontal" | "vertical";
25
+ /** One rung of the control-height ladder for the segments. The
26
+ * family keeps its compact register, so the rungs sit one notch
27
+ * below the global ladder - the default md rests at the small
28
+ * height. */
29
+ size?: "sm" | "md" | "lg";
30
+ className?: string;
31
+ onValueChange?: (value: string) => void;
32
+ }
33
+ declare function SegmentGroupFacade({ value, defaultValue, items, label, disabled, readOnly, orientation, size, className, onValueChange }: SegmentGroupFacadeProps): import("react").JSX.Element;
34
+ declare namespace SegmentGroupFacade {
35
+ var displayName: string;
36
+ }
12
37
  /** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
13
38
  * where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
14
39
  * ItemHiddenInput. */
15
- export declare const SegmentGroup: Omit<typeof SegmentGroup$1, "Root"> & {
40
+ type SegmentGroupParts = Omit<typeof SegmentGroup$1, "Root"> & {
16
41
  Root: typeof SegmentGroupRoot;
17
42
  };
43
+ export declare const SegmentGroup: typeof SegmentGroupFacade & SegmentGroupParts;
18
44
  //#endregion
@@ -1,20 +1,47 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/react/segment-group";
4
5
  //#region src/components/segment-group/index.tsx
5
- function SegmentGroupRoot({ size = "md", ...rest }) {
6
+ function SegmentGroupRoot(props) {
7
+ const id = useElementId("segment-group", props);
8
+ const { size = "md", ...rest } = props;
6
9
  return /* @__PURE__ */ jsx(SegmentGroup$1.Root, {
7
10
  ...rest,
11
+ id,
8
12
  "data-size": size
9
13
  });
10
14
  }
11
- /** SegmentGroup, dressed in the paper-and-ink system: a hairline tray
12
- * where one flat ink plate travels beneath the checked seal. The parts - Root, Label, Indicator, Item, ItemText, ItemControl,
13
- * ItemHiddenInput. */
14
- const SegmentGroup = {
15
+ function SegmentGroupFacade({ value, defaultValue, items, label, disabled = false, readOnly = false, orientation = "horizontal", size = "md", className, onValueChange }) {
16
+ return /* @__PURE__ */ jsxs(SegmentGroupRoot, {
17
+ className,
18
+ size,
19
+ orientation,
20
+ disabled,
21
+ readOnly,
22
+ defaultValue,
23
+ ...value === void 0 ? {} : { value },
24
+ onValueChange: (details) => onValueChange?.(details.value ?? ""),
25
+ children: [
26
+ label ? /* @__PURE__ */ jsx(SegmentGroup$1.Label, { children: label }) : null,
27
+ /* @__PURE__ */ jsx(SegmentGroup$1.Indicator, {}),
28
+ items.map((item) => /* @__PURE__ */ jsxs(SegmentGroup$1.Item, {
29
+ value: item.value,
30
+ disabled: item.disabled,
31
+ children: [
32
+ /* @__PURE__ */ jsx(SegmentGroup$1.ItemText, { children: item.label }),
33
+ /* @__PURE__ */ jsx(SegmentGroup$1.ItemControl, {}),
34
+ /* @__PURE__ */ jsx(SegmentGroup$1.ItemHiddenInput, {})
35
+ ]
36
+ }, item.value))
37
+ ]
38
+ });
39
+ }
40
+ SegmentGroupFacade.displayName = "SSegmentGroup";
41
+ const SegmentGroup = Object.assign(SegmentGroupFacade, {
15
42
  ...SegmentGroup$1,
16
43
  Root: SegmentGroupRoot
17
- };
44
+ });
18
45
  injectComponentStyle("segment-group");
19
46
  //#endregion
20
47
  export { SegmentGroup };
@@ -1,2 +1,2 @@
1
- import { i as NativeSelectProps, n as NativeSelect, r as NativeSelectOption, t as Select } from "../../index-Iy8m0Qev.mjs";
2
- export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select };
1
+ import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "../../index-D_iKc2Uw.mjs";
2
+ export { NativeSelect, type NativeSelectOption, type NativeSelectProps, Select, SelectFacadeProps };
@@ -1,2 +1,2 @@
1
- import { n as NativeSelect, t as Select } from "../../select-eAHutw56.mjs";
1
+ import { n as NativeSelect, t as Select } from "../../select-i9UZsQCU.mjs";
2
2
  export { NativeSelect, Select };
@@ -7,5 +7,8 @@ export interface SeparatorProps extends HTMLAttributes<HTMLDivElement> {
7
7
  orientation?: "horizontal" | "vertical";
8
8
  decorative?: boolean;
9
9
  }
10
- export declare function Separator({ orientation, decorative, ...rest }: SeparatorProps): import("react").JSX.Element;
10
+ declare function SeparatorImpl({ orientation, decorative, ...rest }: SeparatorProps): import("react").JSX.Element;
11
+ export declare const Separator: typeof SeparatorImpl & {
12
+ Root: typeof SeparatorImpl;
13
+ };
11
14
  //#endregion
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/separator/index.tsx
4
- function Separator({ orientation = "horizontal", decorative = false, ...rest }) {
5
+ function SeparatorImpl({ orientation = "horizontal", decorative = false, ...rest }) {
5
6
  injectComponentStyle("separator");
6
7
  return /* @__PURE__ */ jsx("div", {
7
8
  ...rest,
@@ -12,5 +13,6 @@ function Separator({ orientation = "horizontal", decorative = false, ...rest })
12
13
  "aria-orientation": decorative ? void 0 : orientation
13
14
  });
14
15
  }
16
+ const Separator = withSelfRoot(SeparatorImpl);
15
17
  //#endregion
16
18
  export { Separator };
@@ -1,8 +1,28 @@
1
+ import { ReactNode } from "react";
1
2
  import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
2
3
  //#region src/components/signature-pad/index.d.ts
3
- /** Ark's SignaturePad, dressed in the paper-and-ink system: a quiet paper
4
- * field with a guide hairline where ink — real ink strokes — is laid down.
5
- * The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
6
- * ClearTrigger, HiddenInput, Context. */
7
- export declare const SignaturePad: typeof SignaturePad$1;
4
+ interface SignaturePadFacadeProps {
5
+ value?: string[];
6
+ defaultValue?: string[];
7
+ label?: string;
8
+ /** Show the reset control. */
9
+ clearable?: boolean;
10
+ disabled?: boolean;
11
+ onValueChange?: (paths: string[]) => void;
12
+ children?: ReactNode;
13
+ }
14
+ /** The one-tag path: the paper, guide, clear control, and hidden form
15
+ * value; stroke previews and drawing events stay on the anatomy. */
16
+ declare function SignaturePadFacade({ value, defaultValue, label, clearable, disabled, onValueChange }: SignaturePadFacadeProps): import("react").JSX.Element;
17
+ export declare const SignaturePad: typeof SignaturePadFacade & {
18
+ Root: typeof SignaturePad$1.Root;
19
+ ClearTrigger: import("react").ForwardRefExoticComponent<SignaturePad$1.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
20
+ Context: (props: SignaturePad$1.ContextProps) => ReactNode;
21
+ Control: import("react").ForwardRefExoticComponent<SignaturePad$1.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ Guide: import("react").ForwardRefExoticComponent<SignaturePad$1.GuideProps & import("react").RefAttributes<HTMLDivElement>>;
23
+ HiddenInput: import("react").ForwardRefExoticComponent<SignaturePad$1.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
24
+ Label: import("react").ForwardRefExoticComponent<SignaturePad$1.LabelProps & import("react").RefAttributes<HTMLLabelElement>>;
25
+ RootProvider: import("react").ForwardRefExoticComponent<SignaturePad$1.RootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
26
+ Segment: import("react").ForwardRefExoticComponent<SignaturePad$1.SegmentProps & import("react").RefAttributes<SVGSVGElement>>;
27
+ };
8
28
  //#endregion
@@ -1,11 +1,45 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
2
5
  import { SignaturePad as SignaturePad$1 } from "@ark-ui/react/signature-pad";
3
6
  //#region src/components/signature-pad/index.tsx
4
- /** Ark's SignaturePad, dressed in the paper-and-ink system: a quiet paper
7
+ /** SignaturePad, dressed in the paper-and-ink system: a quiet paper
5
8
  * field with a guide hairline where ink — real ink strokes — is laid down.
6
- * The API is Ark's own — Root, Label, Control, Segment, SegmentPath, Guide,
9
+ * The parts — Root, Label, Control, Segment, SegmentPath, Guide,
7
10
  * ClearTrigger, HiddenInput, Context. */
8
- const SignaturePad = SignaturePad$1;
11
+ function SignaturePadRoot(props) {
12
+ const id = useElementId("signature-pad", props);
13
+ return /* @__PURE__ */ jsx(SignaturePad$1.Root, {
14
+ ...props,
15
+ id
16
+ });
17
+ }
18
+ /** The one-tag path: the paper, guide, clear control, and hidden form
19
+ * value; stroke previews and drawing events stay on the anatomy. */
20
+ function SignaturePadFacade({ value, defaultValue, label, clearable = true, disabled = false, onValueChange }) {
21
+ return /* @__PURE__ */ jsxs(SignaturePadRoot, {
22
+ disabled,
23
+ defaultPaths: defaultValue,
24
+ ...value === void 0 ? {} : {
25
+ paths: value,
26
+ onDraw: (details) => onValueChange?.(details.paths)
27
+ },
28
+ children: [
29
+ label ? /* @__PURE__ */ jsx(SignaturePad$1.Label, { children: label }) : null,
30
+ /* @__PURE__ */ jsxs(SignaturePad$1.Control, { children: [
31
+ /* @__PURE__ */ jsx(SignaturePad$1.Segment, {}),
32
+ clearable ? /* @__PURE__ */ jsx(SignaturePad$1.ClearTrigger, { children: iconNode("undo") }) : null,
33
+ /* @__PURE__ */ jsx(SignaturePad$1.Guide, {})
34
+ ] }),
35
+ /* @__PURE__ */ jsx(SignaturePad$1.HiddenInput, { value: "" })
36
+ ]
37
+ });
38
+ }
39
+ const SignaturePad = Object.assign(SignaturePadFacade, {
40
+ ...SignaturePad$1,
41
+ Root: SignaturePadRoot
42
+ });
9
43
  injectComponentStyle("signature-pad");
10
44
  //#endregion
11
45
  export { SignaturePad };
@@ -3,5 +3,8 @@ import { HTMLAttributes } from "react";
3
3
  /** A waiting sheet of unset paper. Size it from the outside; the breath
4
4
  * is the component's own. */
5
5
  export type SkeletonProps = HTMLAttributes<HTMLDivElement>;
6
- export declare function Skeleton({ ...rest }: SkeletonProps): import("react").JSX.Element;
6
+ declare function SkeletonImpl({ ...rest }: SkeletonProps): import("react").JSX.Element;
7
+ export declare const Skeleton: typeof SkeletonImpl & {
8
+ Root: typeof SkeletonImpl;
9
+ };
7
10
  //#endregion
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/skeleton/index.tsx
4
- function Skeleton({ ...rest }) {
5
+ function SkeletonImpl({ ...rest }) {
5
6
  injectComponentStyle("skeleton");
6
7
  return /* @__PURE__ */ jsx("div", {
7
8
  ...rest,
@@ -9,5 +10,6 @@ function Skeleton({ ...rest }) {
9
10
  "data-part": "root"
10
11
  });
11
12
  }
13
+ const Skeleton = withSelfRoot(SkeletonImpl);
12
14
  //#endregion
13
15
  export { Skeleton };
@@ -5,12 +5,31 @@ type SliderRootProps = ComponentProps<typeof Slider$1.Root> & {
5
5
  /** One rung of the part-size ladder for the thumb seal. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function SliderRoot({ size, ...rest }: SliderRootProps): import("react").JSX.Element;
8
+ declare function SliderRoot(props: SliderRootProps): import("react").JSX.Element;
9
+ export interface SliderFacadeProps {
10
+ value?: number;
11
+ defaultValue?: number;
12
+ label?: string;
13
+ min?: number;
14
+ max?: number;
15
+ step?: number;
16
+ disabled?: boolean;
17
+ orientation?: "horizontal" | "vertical";
18
+ /** One rung of the part-size ladder for the thumb seal. */
19
+ size?: "sm" | "md" | "lg";
20
+ className?: string;
21
+ onValueChange?: (value: number) => void;
22
+ }
23
+ declare function SliderFacade({ value, defaultValue, label, min, max, step, disabled, orientation, size, className, onValueChange }: SliderFacadeProps): import("react").JSX.Element;
24
+ declare namespace SliderFacade {
25
+ var displayName: string;
26
+ }
9
27
  /** Ark's Slider, dressed in the paper-and-ink system: a recessed track the
10
28
  * primary ink runs along, a paper-seal thumb, and hairline tick markers.
11
29
  * The API is Ark's own — Root, Label, ValueText, Control, Track, Range,
12
30
  * Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput. */
13
- export declare const Slider: Omit<typeof Slider$1, "Root"> & {
31
+ type SliderParts = Omit<typeof Slider$1, "Root"> & {
14
32
  Root: typeof SliderRoot;
15
33
  };
34
+ export declare const Slider: typeof SliderFacade & SliderParts;
16
35
  //#endregion
@@ -1,21 +1,44 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { Slider as Slider$1 } from "@ark-ui/react/slider";
4
5
  //#region src/components/slider/index.tsx
5
- function SliderRoot({ size = "md", ...rest }) {
6
+ function SliderRoot(props) {
7
+ const id = useElementId("slider", props);
8
+ const { size = "md", ...rest } = props;
6
9
  return /* @__PURE__ */ jsx(Slider$1.Root, {
7
10
  ...rest,
11
+ id,
8
12
  "data-size": size
9
13
  });
10
14
  }
11
- /** Ark's Slider, dressed in the paper-and-ink system: a recessed track the
12
- * primary ink runs along, a paper-seal thumb, and hairline tick markers.
13
- * The API is Ark's own — Root, Label, ValueText, Control, Track, Range,
14
- * Thumb, MarkerGroup, Marker, DraggingIndicator, HiddenInput. */
15
- const Slider = {
15
+ function SliderFacade({ value, defaultValue = 50, label, min = 0, max = 100, step = 1, disabled = false, orientation = "horizontal", size = "md", className, onValueChange }) {
16
+ return /* @__PURE__ */ jsxs(SliderRoot, {
17
+ className,
18
+ size,
19
+ disabled,
20
+ min,
21
+ max,
22
+ step,
23
+ orientation,
24
+ defaultValue: [defaultValue],
25
+ ...value === void 0 ? {} : { value: [value] },
26
+ onValueChange: (details) => onValueChange?.(details.value.at(0) ?? min),
27
+ children: [
28
+ label ? /* @__PURE__ */ jsx(Slider$1.Label, { children: label }) : null,
29
+ /* @__PURE__ */ jsx(Slider$1.ValueText, {}),
30
+ /* @__PURE__ */ jsxs(Slider$1.Control, { children: [/* @__PURE__ */ jsx(Slider$1.Track, { children: /* @__PURE__ */ jsx(Slider$1.Range, {}) }), /* @__PURE__ */ jsx(Slider$1.Thumb, {
31
+ index: 0,
32
+ children: /* @__PURE__ */ jsx(Slider$1.HiddenInput, {})
33
+ })] })
34
+ ]
35
+ });
36
+ }
37
+ SliderFacade.displayName = "SSlider";
38
+ const Slider = Object.assign(SliderFacade, {
16
39
  ...Slider$1,
17
40
  Root: SliderRoot
18
- };
41
+ });
19
42
  injectComponentStyle("slider");
20
43
  //#endregion
21
44
  export { Slider };
@@ -5,5 +5,8 @@ export interface SpinnerProps extends HTMLAttributes<HTMLElement> {
5
5
  }
6
6
  /** A wheel of waiting: one arc of ink turning about its center. Quiet by
7
7
  * default — it reports progress without claiming attention. */
8
- export declare function Spinner({ size, children, ...rest }: SpinnerProps): import("react").JSX.Element;
8
+ declare function SpinnerImpl({ size, children, ...rest }: SpinnerProps): import("react").JSX.Element;
9
+ export declare const Spinner: typeof SpinnerImpl & {
10
+ Root: typeof SpinnerImpl;
11
+ };
9
12
  //#endregion
@@ -1,10 +1,11 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
3
4
  import { jsx, jsxs } from "react/jsx-runtime";
4
5
  //#region src/components/spinner/index.tsx
5
6
  /** A wheel of waiting: one arc of ink turning about its center. Quiet by
6
7
  * default — it reports progress without claiming attention. */
7
- function Spinner({ size = "md", children, ...rest }) {
8
+ function SpinnerImpl({ size = "md", children, ...rest }) {
8
9
  injectComponentStyle("spinner");
9
10
  const messages = useComponentMessages();
10
11
  return /* @__PURE__ */ jsxs("span", {
@@ -34,5 +35,6 @@ function Spinner({ size = "md", children, ...rest }) {
34
35
  }), children]
35
36
  });
36
37
  }
38
+ const Spinner = withSelfRoot(SpinnerImpl);
37
39
  //#endregion
38
40
  export { Spinner };
@@ -1,3 +1,4 @@
1
+ import { Menu } from "../menu/index.mjs";
1
2
  import { HTMLAttributes } from "react";
2
3
  //#region src/components/split-button/index.d.ts
3
4
  export interface SplitButtonEntry {
@@ -32,5 +33,6 @@ export interface SplitButtonProps extends Omit<HTMLAttributes<HTMLDivElement>, "
32
33
  * button stylesheet's trigger register dresses it. The popup keeps the
33
34
  * menu parts untouched.
34
35
  */
35
- export declare function SplitButton({ label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
36
+ declare function SplitButtonImpl({ label, items, variant, tone, size, disabled, onClick, onSelect, ...rest }: SplitButtonProps): import("react").JSX.Element;
37
+ export declare const SplitButton: typeof SplitButtonImpl & typeof Menu;
36
38
  //#endregion
@@ -1,6 +1,9 @@
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
4
  import { Button } from "../button/index.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
5
+ import { Menu as Menu$1 } from "../menu/index.mjs";
6
+ import { injectComponentStyle } from "@bysages/core/styling";
4
7
  import { jsx, jsxs } from "react/jsx-runtime";
5
8
  import { Portal } from "@ark-ui/react/portal";
6
9
  import { Menu } from "@ark-ui/react/menu";
@@ -14,9 +17,10 @@ import { Menu } from "@ark-ui/react/menu";
14
17
  * button stylesheet's trigger register dresses it. The popup keeps the
15
18
  * menu parts untouched.
16
19
  */
17
- function SplitButton({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
20
+ function SplitButtonImpl({ label, items = [], variant = "solid", tone = "ink", size = "md", disabled = false, onClick, onSelect, ...rest }) {
18
21
  injectComponentStyle("split-button");
19
22
  injectComponentStyle("menu");
23
+ const hostId = useElementId("split-button", rest);
20
24
  const messages = useComponentMessages();
21
25
  return /* @__PURE__ */ jsxs("div", {
22
26
  ...rest,
@@ -30,6 +34,7 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
30
34
  onClick,
31
35
  children: label
32
36
  }), /* @__PURE__ */ jsxs(Menu.Root, {
37
+ id: `${hostId}:menu`,
33
38
  positioning: { placement: "bottom-end" },
34
39
  children: [/* @__PURE__ */ jsx(Menu.Trigger, {
35
40
  asChild: true,
@@ -42,7 +47,7 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
42
47
  "data-square": "true",
43
48
  "data-motion": "ink-ripple lit",
44
49
  "aria-label": messages.more.actions,
45
- children: chevronDown()
50
+ children: chevronDown
46
51
  })
47
52
  }), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { children: /* @__PURE__ */ jsx(Menu.Content, { children: items.map((entry) => /* @__PURE__ */ jsx(Menu.Item, {
48
53
  value: entry.value,
@@ -54,20 +59,10 @@ function SplitButton({ label, items = [], variant = "solid", tone = "ink", size
54
59
  })]
55
60
  });
56
61
  }
57
- /** One stroke pointing down: all a fitted dropdown arrow needs. */
58
- function chevronDown() {
59
- return /* @__PURE__ */ jsx("svg", {
60
- width: 16,
61
- height: 16,
62
- viewBox: "0 0 24 24",
63
- fill: "none",
64
- stroke: "currentColor",
65
- strokeWidth: 1.75,
66
- strokeLinecap: "round",
67
- strokeLinejoin: "round",
68
- "aria-hidden": "true",
69
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
70
- });
71
- }
62
+ const SplitButton = Object.assign(SplitButtonImpl, Menu$1);
63
+ const chevronDown = iconNode("chevron-down", {
64
+ width: 16,
65
+ height: 16
66
+ });
72
67
  //#endregion
73
68
  export { SplitButton };
@@ -1,7 +1,20 @@
1
1
  import { Splitter as Splitter$1 } from "@ark-ui/react/splitter";
2
2
  //#region src/components/splitter/index.d.ts
3
- /** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
4
- * a hairline and a small paper-seal thumb answers the hand. The API is
5
- * Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
6
- export declare const Splitter: typeof Splitter$1;
3
+ export type SplitterItem = {
4
+ id: string;
5
+ label: string;
6
+ };
7
+ export interface SplitterFacadeProps {
8
+ items: SplitterItem[];
9
+ defaultValue?: number[];
10
+ value?: number[];
11
+ orientation?: "horizontal" | "vertical";
12
+ className?: string;
13
+ }
14
+ declare function SplitterFacade({ items, defaultValue, value, orientation, className }: SplitterFacadeProps): import("react").JSX.Element;
15
+ declare namespace SplitterFacade {
16
+ var displayName: string;
17
+ }
18
+ type SplitterParts = typeof Splitter$1;
19
+ export declare const Splitter: typeof SplitterFacade & SplitterParts;
7
20
  //#endregion
@@ -1,10 +1,44 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { Fragment as Fragment$1 } from "react";
2
5
  import { Splitter as Splitter$1 } from "@ark-ui/react/splitter";
3
6
  //#region src/components/splitter/index.tsx
4
7
  /** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
5
8
  * a hairline and a small paper-seal thumb answers the hand. The API is
6
9
  * Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
7
- const Splitter = Splitter$1;
10
+ function SplitterRoot(props) {
11
+ const id = useElementId("splitter", props);
12
+ return /* @__PURE__ */ jsx(Splitter$1.Root, {
13
+ ...props,
14
+ id
15
+ });
16
+ }
17
+ function SplitterFacade({ items, defaultValue, value, orientation = "horizontal", className }) {
18
+ return /* @__PURE__ */ jsx(SplitterRoot, {
19
+ className,
20
+ orientation,
21
+ panels: items.map((item) => ({ id: item.id })),
22
+ ...defaultValue === void 0 ? {} : { defaultSize: defaultValue },
23
+ ...value === void 0 ? {} : { size: value },
24
+ children: items.map((item, index) => {
25
+ const next = items.at(index + 1);
26
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Splitter$1.Panel, {
27
+ id: item.id,
28
+ children: item.label
29
+ }), next ? /* @__PURE__ */ jsx(Splitter$1.ResizeTrigger, {
30
+ id: `${item.id}:${next.id}`,
31
+ "aria-label": "Resize panels",
32
+ children: /* @__PURE__ */ jsx(Splitter$1.ResizeTriggerIndicator, {})
33
+ }) : null] }, item.id);
34
+ })
35
+ });
36
+ }
37
+ SplitterFacade.displayName = "SSplitter";
38
+ const Splitter = Object.assign(SplitterFacade, {
39
+ ...Splitter$1,
40
+ Root: SplitterRoot
41
+ });
8
42
  injectComponentStyle("splitter");
9
43
  //#endregion
10
44
  export { Splitter };
@@ -8,5 +8,8 @@ export interface SpotlightProps extends HTMLAttributes<HTMLDivElement> {
8
8
  /** The ink-light card: a vessel whose rim and face take light from the
9
9
  * reader's hand. The wrapper only measures and writes the geometry —
10
10
  * the lamp itself is the two layers the stylesheet paints. */
11
- export declare function Spotlight({ radius, children, ...rest }: SpotlightProps): import("react").JSX.Element;
11
+ declare function SpotlightImpl({ radius, children, ...rest }: SpotlightProps): import("react").JSX.Element;
12
+ export declare const Spotlight: typeof SpotlightImpl & {
13
+ Root: typeof SpotlightImpl;
14
+ };
12
15
  //#endregion