@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,11 +1,35 @@
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 { QrCode as QrCode$1 } from "@ark-ui/react/qr-code";
3
5
  //#region src/components/qr-code/index.tsx
4
6
  /** Ark's QrCode, dressed in the paper-and-ink system: the pattern prints in
5
7
  * ink on the page, with an optional paper badge and a seal-cut download
6
8
  * control. The API is Ark's own — Root, Frame, Pattern, Overlay,
7
9
  * DownloadTrigger. */
8
- const QrCode = QrCode$1;
9
- injectComponentStyle("qr-code");
10
+ function QrCodeRoot(props) {
11
+ injectComponentStyle("qr-code");
12
+ const id = useElementId("qr-code", props);
13
+ return /* @__PURE__ */ jsx(QrCode$1.Root, {
14
+ ...props,
15
+ id
16
+ });
17
+ }
18
+ /** The complete printable code behind one payload. */
19
+ function QrCodeFacade(props) {
20
+ const { value, defaultValue, className, style, onValueChange } = props;
21
+ return /* @__PURE__ */ jsx(QrCodeRoot, {
22
+ defaultValue,
23
+ value,
24
+ className,
25
+ style,
26
+ onValueChange: (event) => onValueChange?.(event.value),
27
+ children: /* @__PURE__ */ jsx(QrCode$1.Frame, { children: /* @__PURE__ */ jsx(QrCode$1.Pattern, {}) })
28
+ });
29
+ }
30
+ const QrCode = Object.assign(QrCodeFacade, {
31
+ ...QrCode$1,
32
+ Root: QrCodeRoot
33
+ });
10
34
  //#endregion
11
35
  export { QrCode };
@@ -5,12 +5,37 @@ type RadioGroupRootProps = ComponentProps<typeof RadioGroup$1.Root> & {
5
5
  /** One rung for the dial; the chosen dot rides it. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function RadioGroupRoot({ size, ...rest }: RadioGroupRootProps): import("react").JSX.Element;
8
+ declare function RadioGroupRoot(props: RadioGroupRootProps): import("react").JSX.Element;
9
+ export type RadioGroupItem = {
10
+ value: string;
11
+ label: string;
12
+ disabled?: boolean;
13
+ };
14
+ export interface RadioGroupFacadeProps {
15
+ value?: string;
16
+ defaultValue?: string;
17
+ items: RadioGroupItem[];
18
+ label?: string;
19
+ disabled?: boolean;
20
+ invalid?: boolean;
21
+ required?: boolean;
22
+ readOnly?: boolean;
23
+ orientation?: "horizontal" | "vertical";
24
+ /** One rung for the dial; the chosen dot rides it. */
25
+ size?: "sm" | "md" | "lg";
26
+ className?: string;
27
+ onValueChange?: (value: string) => void;
28
+ }
29
+ declare function RadioGroupFacade({ value, defaultValue, items, label, disabled, invalid, required, readOnly, orientation, size, className, onValueChange }: RadioGroupFacadeProps): import("react").JSX.Element;
30
+ declare namespace RadioGroupFacade {
31
+ var displayName: string;
32
+ }
9
33
  /** Ark's RadioGroup, dressed in the paper-and-ink system: a column of
10
34
  * full-circle seals that fill flat with primary ink when chosen, the dot
11
35
  * punched through as paper. The API is Ark's own — Root, Label, Item,
12
36
  * ItemText, ItemControl, Indicator, ItemHiddenInput. */
13
- export declare const RadioGroup: Omit<typeof RadioGroup$1, "Root"> & {
37
+ type RadioGroupParts = Omit<typeof RadioGroup$1, "Root"> & {
14
38
  Root: typeof RadioGroupRoot;
15
39
  };
40
+ export declare const RadioGroup: typeof RadioGroupFacade & RadioGroupParts;
16
41
  //#endregion
@@ -1,21 +1,45 @@
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 { RadioGroup as RadioGroup$1 } from "@ark-ui/react/radio-group";
4
5
  //#region src/components/radio-group/index.tsx
5
- function RadioGroupRoot({ size = "md", ...rest }) {
6
+ function RadioGroupRoot(props) {
7
+ const id = useElementId("radio-group", props);
8
+ const { size = "md", ...rest } = props;
6
9
  return /* @__PURE__ */ jsx(RadioGroup$1.Root, {
7
10
  ...rest,
11
+ id,
8
12
  "data-size": size
9
13
  });
10
14
  }
11
- /** Ark's RadioGroup, dressed in the paper-and-ink system: a column of
12
- * full-circle seals that fill flat with primary ink when chosen, the dot
13
- * punched through as paper. The API is Ark's own — Root, Label, Item,
14
- * ItemText, ItemControl, Indicator, ItemHiddenInput. */
15
- const RadioGroup = {
15
+ function RadioGroupFacade({ value, defaultValue, items, label, disabled = false, invalid = false, required = false, readOnly = false, orientation = "vertical", size = "md", className, onValueChange }) {
16
+ return /* @__PURE__ */ jsxs(RadioGroupRoot, {
17
+ className,
18
+ size,
19
+ disabled,
20
+ invalid,
21
+ readOnly,
22
+ required,
23
+ orientation,
24
+ defaultValue,
25
+ ...value === void 0 ? {} : { value },
26
+ onValueChange: (details) => onValueChange?.(details.value ?? ""),
27
+ children: [label ? /* @__PURE__ */ jsx(RadioGroup$1.Label, { children: label }) : null, items.map((item) => /* @__PURE__ */ jsxs(RadioGroup$1.Item, {
28
+ value: item.value,
29
+ disabled: item.disabled,
30
+ children: [
31
+ /* @__PURE__ */ jsx(RadioGroup$1.ItemControl, {}),
32
+ /* @__PURE__ */ jsx(RadioGroup$1.ItemText, { children: item.label }),
33
+ /* @__PURE__ */ jsx(RadioGroup$1.ItemHiddenInput, {})
34
+ ]
35
+ }, item.value))]
36
+ });
37
+ }
38
+ RadioGroupFacade.displayName = "SRadioGroup";
39
+ const RadioGroup = Object.assign(RadioGroupFacade, {
16
40
  ...RadioGroup$1,
17
41
  Root: RadioGroupRoot
18
- };
42
+ });
19
43
  injectComponentStyle("radio-group");
20
44
  //#endregion
21
45
  export { RadioGroup };
@@ -5,12 +5,29 @@ type RatingGroupRootProps = ComponentProps<typeof RatingGroup$1.Root> & {
5
5
  /** One rung of the control-height ladder every seal stands on. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function RatingGroupRoot({ size, ...rest }: RatingGroupRootProps): import("react").JSX.Element;
8
+ declare function RatingGroupRoot(props: RatingGroupRootProps): import("react").JSX.Element;
9
+ export interface RatingGroupFacadeProps {
10
+ value?: number;
11
+ defaultValue?: number;
12
+ label?: string;
13
+ count?: number;
14
+ disabled?: boolean;
15
+ readOnly?: boolean;
16
+ /** One rung of the control-height ladder every seal stands on. */
17
+ size?: "sm" | "md" | "lg";
18
+ className?: string;
19
+ onValueChange?: (value: number) => void;
20
+ }
21
+ declare function RatingGroupFacade({ value, defaultValue, label, count, disabled, readOnly, size, className, onValueChange }: RatingGroupFacadeProps): import("react").JSX.Element;
22
+ declare namespace RatingGroupFacade {
23
+ var displayName: string;
24
+ }
9
25
  /** Ark's RatingGroup, dressed in the paper-and-ink system: a row of quiet
10
- * seals whose glyphs take the primary pigment as they light up. The API is
26
+ * seals whose icons take the primary pigment as they light up. The API is
11
27
  * Ark's own — Root, Label, Control, Item, HiddenInput (plus the Context and
12
28
  * ItemContext render helpers). */
13
- export declare const RatingGroup: Omit<typeof RatingGroup$1, "Root"> & {
29
+ type RatingGroupParts = Omit<typeof RatingGroup$1, "Root"> & {
14
30
  Root: typeof RatingGroupRoot;
15
31
  };
32
+ export declare const RatingGroup: typeof RatingGroupFacade & RatingGroupParts;
16
33
  //#endregion
@@ -1,21 +1,39 @@
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
- import { jsx } from "react/jsx-runtime";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
3
5
  import { RatingGroup as RatingGroup$1 } from "@ark-ui/react/rating-group";
4
6
  //#region src/components/rating-group/index.tsx
5
- function RatingGroupRoot({ size = "md", ...rest }) {
7
+ function RatingGroupRoot(props) {
8
+ const id = useElementId("rating-group", props);
9
+ const { size = "md", ...rest } = props;
6
10
  return /* @__PURE__ */ jsx(RatingGroup$1.Root, {
7
11
  ...rest,
12
+ id,
8
13
  "data-size": size
9
14
  });
10
15
  }
11
- /** Ark's RatingGroup, dressed in the paper-and-ink system: a row of quiet
12
- * seals whose glyphs take the primary pigment as they light up. The API is
13
- * Ark's own — Root, Label, Control, Item, HiddenInput (plus the Context and
14
- * ItemContext render helpers). */
15
- const RatingGroup = {
16
+ function RatingGroupFacade({ value, defaultValue = 0, label, count = 5, disabled = false, readOnly = false, size = "md", className, onValueChange }) {
17
+ return /* @__PURE__ */ jsxs(RatingGroupRoot, {
18
+ className,
19
+ size,
20
+ count,
21
+ disabled,
22
+ readOnly,
23
+ defaultValue,
24
+ ...value === void 0 ? {} : { value },
25
+ onValueChange: (details) => onValueChange?.(details.value ?? 0),
26
+ children: [label ? /* @__PURE__ */ jsx(RatingGroup$1.Label, { children: label }) : null, /* @__PURE__ */ jsxs(RatingGroup$1.Control, { children: [/* @__PURE__ */ jsx(RatingGroup$1.Context, { children: (api) => api.items.map((item) => /* @__PURE__ */ jsx(RatingGroup$1.Item, {
27
+ index: item,
28
+ children: iconNode("star")
29
+ }, item)) }), /* @__PURE__ */ jsx(RatingGroup$1.HiddenInput, {})] })]
30
+ });
31
+ }
32
+ RatingGroupFacade.displayName = "SRatingGroup";
33
+ const RatingGroup = Object.assign(RatingGroupFacade, {
16
34
  ...RatingGroup$1,
17
35
  Root: RatingGroupRoot
18
- };
36
+ });
19
37
  injectComponentStyle("rating-group");
20
38
  //#endregion
21
39
  export { RatingGroup };
@@ -15,7 +15,7 @@ export declare function ResultIcon({ children, ...rest }: HTMLAttributes<HTMLDiv
15
15
  /** A verdict drawn after the deed: the mark washes in the fixed
16
16
  * pigment, the title rides the serif, and the extra carries the way
17
17
  * onward. Any subset composes. */
18
- export declare const Result: {
18
+ export declare const Result: typeof ResultRoot & {
19
19
  Root: typeof ResultRoot;
20
20
  Icon: typeof ResultIcon;
21
21
  Title: ({ children, ...rest }: HTMLAttributes<HTMLElement> & {
@@ -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 { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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 { 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 { 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-ozUFq0zd.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 { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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 { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
3
  import { injectComponentStyle } from "@bysages/core";
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 { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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 { 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 { 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 };