@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,10 +1,11 @@
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/spotlight/index.tsx
4
5
  /** The ink-light card: a vessel whose rim and face take light from the
5
6
  * reader's hand. The wrapper only measures and writes the geometry —
6
7
  * the lamp itself is the two layers the stylesheet paints. */
7
- function Spotlight({ radius, children, ...rest }) {
8
+ function SpotlightImpl({ radius, children, ...rest }) {
8
9
  injectComponentStyle("spotlight");
9
10
  const track = (event) => {
10
11
  const host = event.currentTarget;
@@ -29,5 +30,6 @@ function Spotlight({ radius, children, ...rest }) {
29
30
  children
30
31
  });
31
32
  }
33
+ const Spotlight = withSelfRoot(SpotlightImpl);
32
34
  //#endregion
33
35
  export { Spotlight };
@@ -7,5 +7,8 @@ export interface StackProps extends HTMLAttributes<HTMLDivElement> {
7
7
  align?: string;
8
8
  justify?: string;
9
9
  }
10
- export declare function Stack({ direction, gap, wrap, align, justify, ...rest }: StackProps): import("react").JSX.Element;
10
+ declare function StackImpl({ direction, gap, wrap, align, justify, ...rest }: StackProps): import("react").JSX.Element;
11
+ export declare const Stack: typeof StackImpl & {
12
+ Root: typeof StackImpl;
13
+ };
11
14
  //#endregion
@@ -1,4 +1,5 @@
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/stack/index.tsx
4
5
  /** Whitespace chosen by name: the named steps point at the space ramp so
@@ -11,14 +12,14 @@ const gapVars = {
11
12
  lg: "var(--bs-gap-lg)",
12
13
  xl: "var(--bs-gap-xl)"
13
14
  };
14
- function Stack({ direction = "column", gap = "md", wrap = false, align, justify, ...rest }) {
15
+ function StackImpl({ direction = "column", gap = "md", wrap = false, align, justify, ...rest }) {
15
16
  injectComponentStyle("stack");
16
17
  const style = {
17
18
  ...rest.style,
18
19
  "--bs-stack-gap": gapVars[gap] ?? gapVars.md,
19
- alignItems: align,
20
- justifyContent: justify,
21
- flexWrap: wrap ? "wrap" : void 0
20
+ "--bs-stack-align": align,
21
+ "--bs-stack-justify": justify,
22
+ "--bs-stack-wrap": wrap ? "wrap" : void 0
22
23
  };
23
24
  return /* @__PURE__ */ jsx("div", {
24
25
  ...rest,
@@ -28,5 +29,6 @@ function Stack({ direction = "column", gap = "md", wrap = false, align, justify,
28
29
  "data-direction": direction
29
30
  });
30
31
  }
32
+ const Stack = withSelfRoot(StackImpl);
31
33
  //#endregion
32
34
  export { Stack };
@@ -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/stat/index.tsx
4
4
  function part(name, tag) {
@@ -5,7 +5,28 @@ type StepsRootProps = ComponentProps<typeof Steps$1.Root> & {
5
5
  /** One rung of the control-height ladder every indicator stands on. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function StepsRoot({ size, ...rest }: StepsRootProps): import("react").JSX.Element;
8
+ declare function StepsRoot(props: StepsRootProps): import("react").JSX.Element;
9
+ type StepsItem = {
10
+ title: string;
11
+ };
12
+ export interface StepsFacadeProps {
13
+ items: StepsItem[];
14
+ step?: number;
15
+ defaultStep?: number;
16
+ linear?: boolean;
17
+ orientation?: "horizontal" | "vertical";
18
+ /** One rung of the control-height ladder every indicator stands on. */
19
+ size?: "sm" | "md" | "lg";
20
+ className?: string;
21
+ onStepChange?: (step: number) => void;
22
+ }
23
+ declare function StepsFacade({ items, step, defaultStep, linear, orientation, size, className, onStepChange }: StepsFacadeProps): import("react").JSX.Element;
24
+ declare namespace StepsFacade {
25
+ var displayName: string;
26
+ }
27
+ /** The machine wraps each tab in an item div; presentation keeps the
28
+ * tablist owned children legal while the tab itself keeps its role. */
29
+ declare function StepsItem(props: ComponentProps<typeof Steps$1.Item>): import("react").JSX.Element;
9
30
  /**
10
31
  * Steps — linear progress through a sequence.
11
32
  *
@@ -13,11 +34,10 @@ declare function StepsRoot({ size, ...rest }: StepsRootProps): import("react").J
13
34
  * PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
14
35
  * data-complete / data-current / data-incomplete.
15
36
  */
16
- /** The machine wraps each tab in an item div; presentation keeps the
17
- * tablist owned children legal while the tab itself keeps its role. */
18
- declare function StepsItem(props: ComponentProps<typeof Steps$1.Item>): import("react").JSX.Element;
19
- export declare const Steps: Omit<typeof Steps$1, "Root" | "Item"> & {
37
+ type StepsParts = Omit<typeof Steps$1, "Root" | "Item"> & {
20
38
  Root: typeof StepsRoot;
21
39
  Item: typeof StepsItem;
22
40
  };
23
- //#endregion
41
+ export declare const Steps: typeof StepsFacade & StepsParts;
42
+ //#endregion
43
+ export { StepsItem };
@@ -1,20 +1,35 @@
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 { Steps as Steps$1 } from "@ark-ui/react/steps";
4
5
  //#region src/components/steps/index.tsx
5
- function StepsRoot({ size = "md", ...rest }) {
6
+ function StepsRoot(props) {
7
+ const id = useElementId("steps", props);
8
+ const { size = "md", ...rest } = props;
6
9
  return /* @__PURE__ */ jsx(Steps$1.Root, {
7
10
  ...rest,
11
+ id,
8
12
  "data-size": size
9
13
  });
10
14
  }
11
- /**
12
- * Steps — linear progress through a sequence.
13
- *
14
- * Parts: Root, List, Item, Trigger, Indicator, Separator, Content,
15
- * PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
16
- * data-complete / data-current / data-incomplete.
17
- */
15
+ function StepsFacade({ items, step, defaultStep = 0, linear = false, orientation = "horizontal", size = "md", className, onStepChange }) {
16
+ return /* @__PURE__ */ jsx(StepsRoot, {
17
+ className,
18
+ size,
19
+ count: items.length,
20
+ linear,
21
+ orientation,
22
+ defaultStep,
23
+ ...step === void 0 ? {} : { step },
24
+ onStepChange: (details) => onStepChange?.(details.step),
25
+ children: /* @__PURE__ */ jsx(Steps$1.List, { children: items.map((item, index) => /* @__PURE__ */ jsxs(Steps$1.Item, {
26
+ index,
27
+ role: "presentation",
28
+ children: [/* @__PURE__ */ jsxs(Steps$1.Trigger, { children: [/* @__PURE__ */ jsx(Steps$1.Indicator, { children: String(index + 1) }), item.title] }), /* @__PURE__ */ jsx(Steps$1.Separator, {})]
29
+ }, item.title)) })
30
+ });
31
+ }
32
+ StepsFacade.displayName = "SSteps";
18
33
  /** The machine wraps each tab in an item div; presentation keeps the
19
34
  * tablist owned children legal while the tab itself keeps its role. */
20
35
  function StepsItem(props) {
@@ -23,11 +38,11 @@ function StepsItem(props) {
23
38
  role: "presentation"
24
39
  });
25
40
  }
26
- const Steps = {
41
+ const Steps = Object.assign(StepsFacade, {
27
42
  ...Steps$1,
28
43
  Root: StepsRoot,
29
44
  Item: StepsItem
30
- };
45
+ });
31
46
  injectComponentStyle("steps");
32
47
  //#endregion
33
48
  export { Steps };
@@ -1,8 +1,14 @@
1
+ import { ReactNode } from "react";
1
2
  import { Swap as Swap$1 } from "@ark-ui/react/swap";
2
3
  //#region src/components/swap/index.d.ts
3
- /** Ark's Swap, dressed in the paper-and-ink system: two impressions
4
- * occupying one seal, the arriving one growing into place on the spring
5
- * while the departing one shrinks away. The API is Ark's own — Root,
6
- * Indicator (type="on" | "off"), RootProvider. */
7
- export declare const Swap: typeof Swap$1;
4
+ interface SwapFacadeProps {
5
+ swap?: boolean;
6
+ on?: ReactNode;
7
+ off?: ReactNode;
8
+ children?: ReactNode;
9
+ }
10
+ /** The one-tag path for the default check/cross impression; custom
11
+ * transitions and indicators stay on the anatomy. */
12
+ declare function SwapFacade({ swap, on, off }: SwapFacadeProps): import("react").JSX.Element;
13
+ export declare const Swap: typeof SwapFacade & typeof Swap$1;
8
14
  //#endregion
@@ -1,11 +1,38 @@
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 { Swap as Swap$1 } from "@ark-ui/react/swap";
3
6
  //#region src/components/swap/index.tsx
4
- /** Ark's Swap, dressed in the paper-and-ink system: two impressions
7
+ /** Swap, dressed in the paper-and-ink system: two impressions
5
8
  * occupying one seal, the arriving one growing into place on the spring
6
- * while the departing one shrinks away. The API is Ark's own — Root,
9
+ * while the departing one shrinks away. The parts — Root,
7
10
  * Indicator (type="on" | "off"), RootProvider. */
8
- const Swap = Swap$1;
11
+ function SwapRoot(props) {
12
+ const id = useElementId("swap", props);
13
+ return /* @__PURE__ */ jsx(Swap$1.Root, {
14
+ ...props,
15
+ id
16
+ });
17
+ }
18
+ /** The one-tag path for the default check/cross impression; custom
19
+ * transitions and indicators stay on the anatomy. */
20
+ function SwapFacade({ swap = false, on, off }) {
21
+ return /* @__PURE__ */ jsxs(SwapRoot, {
22
+ swap,
23
+ children: [/* @__PURE__ */ jsx(Swap$1.Indicator, {
24
+ type: "on",
25
+ children: on ?? iconNode("check")
26
+ }), /* @__PURE__ */ jsx(Swap$1.Indicator, {
27
+ type: "off",
28
+ children: off ?? iconNode("x")
29
+ })]
30
+ });
31
+ }
32
+ const Swap = Object.assign(SwapFacade, {
33
+ ...Swap$1,
34
+ Root: SwapRoot
35
+ });
9
36
  injectComponentStyle("swap");
10
37
  //#endregion
11
38
  export { Swap };
@@ -5,12 +5,30 @@ type SwitchRootProps = ComponentProps<typeof Switch$1.Root> & {
5
5
  /** One rung for the thumb; the track travels with it. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function SwitchRoot({ size, ...rest }: SwitchRootProps): import("react").JSX.Element;
8
+ declare function SwitchRoot(props: SwitchRootProps): import("react").JSX.Element;
9
+ export interface SwitchFacadeProps {
10
+ value?: boolean;
11
+ defaultValue?: boolean;
12
+ label?: string;
13
+ disabled?: boolean;
14
+ invalid?: boolean;
15
+ required?: boolean;
16
+ readOnly?: boolean;
17
+ /** One rung for the thumb; the track travels with it. */
18
+ size?: "sm" | "md" | "lg";
19
+ className?: string;
20
+ onValueChange?: (value: boolean) => void;
21
+ }
22
+ declare function SwitchFacade({ value, defaultValue, label, disabled, invalid, required, readOnly, size, className, onValueChange }: SwitchFacadeProps): import("react").JSX.Element;
23
+ declare namespace SwitchFacade {
24
+ var displayName: string;
25
+ }
9
26
  /** Ark's Switch, dressed in the paper-and-ink system: a track that rests
10
27
  * in the inset shade of the paper and fills flat with primary ink when on,
11
28
  * the thumb sliding on the spring. The API is Ark's own — Root, Label,
12
29
  * Control, Thumb, HiddenInput. */
13
- export declare const Switch: Omit<typeof Switch$1, "Root"> & {
30
+ type SwitchParts = Omit<typeof Switch$1, "Root"> & {
14
31
  Root: typeof SwitchRoot;
15
32
  };
33
+ export declare const Switch: typeof SwitchFacade & SwitchParts;
16
34
  //#endregion
@@ -1,21 +1,40 @@
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 { Switch as Switch$1 } from "@ark-ui/react/switch";
4
5
  //#region src/components/switch/index.tsx
5
- function SwitchRoot({ size = "md", ...rest }) {
6
+ function SwitchRoot(props) {
7
+ const id = useElementId("switch", props);
8
+ const { size = "md", ...rest } = props;
6
9
  return /* @__PURE__ */ jsx(Switch$1.Root, {
7
10
  ...rest,
11
+ id,
8
12
  "data-size": size
9
13
  });
10
14
  }
11
- /** Ark's Switch, dressed in the paper-and-ink system: a track that rests
12
- * in the inset shade of the paper and fills flat with primary ink when on,
13
- * the thumb sliding on the spring. The API is Ark's own — Root, Label,
14
- * Control, Thumb, HiddenInput. */
15
- const Switch = {
15
+ function SwitchFacade({ value, defaultValue = false, label, disabled = false, invalid = false, required = false, readOnly = false, size = "md", className, onValueChange }) {
16
+ return /* @__PURE__ */ jsxs(SwitchRoot, {
17
+ className,
18
+ size,
19
+ disabled,
20
+ invalid,
21
+ readOnly,
22
+ required,
23
+ defaultChecked: defaultValue,
24
+ ...value === void 0 ? {} : { checked: value },
25
+ onCheckedChange: (details) => onValueChange?.(details.checked),
26
+ children: [
27
+ /* @__PURE__ */ jsx(Switch$1.Control, { children: /* @__PURE__ */ jsx(Switch$1.Thumb, {}) }),
28
+ label ? /* @__PURE__ */ jsx(Switch$1.Label, { children: label }) : null,
29
+ /* @__PURE__ */ jsx(Switch$1.HiddenInput, {})
30
+ ]
31
+ });
32
+ }
33
+ SwitchFacade.displayName = "SSwitch";
34
+ const Switch = Object.assign(SwitchFacade, {
16
35
  ...Switch$1,
17
36
  Root: SwitchRoot
18
- };
37
+ });
19
38
  injectComponentStyle("switch");
20
39
  //#endregion
21
40
  export { Switch };
@@ -74,6 +74,9 @@ export interface DataTableProps {
74
74
  /** Applied to the root vessel. */
75
75
  style?: CSSProperties;
76
76
  }
77
- export declare function DataTable(rawProps: DataTableProps): import("react").JSX.Element;
77
+ declare function DataTableImpl(rawProps: DataTableProps): import("react").JSX.Element;
78
+ export declare const DataTable: typeof DataTableImpl & {
79
+ Root: typeof DataTableImpl;
80
+ };
78
81
  //#endregion
79
82
  export { type ColumnDef, FlexRender, type SortingState, createColumnHelper };
@@ -1,43 +1,25 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
3
  import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
2
4
  import { Pagination } from "../pagination/index.mjs";
3
- import { t as Select$1 } from "../../select-eAHutw56.mjs";
4
- import { injectComponentStyle } from "@bysages/core";
5
+ import { t as Select$1 } from "../../select-i9UZsQCU.mjs";
6
+ import { injectComponentStyle } from "@bysages/core/styling";
5
7
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { useEffect, useLayoutEffect, useMemo, useReducer, useRef } from "react";
8
+ import { useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
7
9
  import { createListCollection } from "@ark-ui/react/select";
8
10
  import { FlexRender, cellSpanningFeature, columnFilteringFeature, columnOrderingFeature, columnPinningFeature, columnSizingFeature, columnVisibilityFeature, createColumnHelper, createExpandedRowModel, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, filterFn_arrIncludes, filterFn_equals, filterFn_inDateRange, filterFn_inNumberRange, filterFn_includesString, filterFn_weakEquals, globalFilteringFeature, rowExpandingFeature, rowPaginationFeature, rowSelectionFeature, rowSortingFeature, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, tableFeatures, useTable } from "@tanstack/react-table";
9
11
  import { useVirtualizer } from "@tanstack/react-virtual";
10
12
  //#region src/components/table/index.tsx
11
- /** The pagination bar's arrows — thin chevrons for the row of seals. */
12
- function pageGlyph(direction) {
13
- return /* @__PURE__ */ jsx("svg", {
14
- viewBox: "0 0 24 24",
13
+ function pageIcon(direction) {
14
+ return iconNode(direction === "start" ? "chevron-left" : "chevron-right", {
15
15
  width: 14,
16
- height: 14,
17
- fill: "none",
18
- stroke: "currentColor",
19
- strokeWidth: 2,
20
- strokeLinecap: "round",
21
- strokeLinejoin: "round",
22
- "aria-hidden": "true",
23
- children: /* @__PURE__ */ jsx("path", { d: direction === "start" ? "m15 18-6-6 6-6" : "m9 18 6-6-6-6" })
24
- });
25
- }
26
- /** The page-size select's pointing chevron. */
27
- function chevronDownGlyph() {
28
- return /* @__PURE__ */ jsx("svg", {
29
- viewBox: "0 0 24 24",
30
- width: 14,
31
- height: 14,
32
- fill: "none",
33
- stroke: "currentColor",
34
- strokeWidth: 2.5,
35
- strokeLinecap: "round",
36
- strokeLinejoin: "round",
37
- "aria-hidden": "true",
38
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
16
+ height: 14
39
17
  });
40
18
  }
19
+ const chevronDownIcon = iconNode("chevron-down", {
20
+ width: 14,
21
+ height: 14
22
+ });
41
23
  const SELECT_COL_ID = "__select";
42
24
  const SELECT_COL_WIDTH = 48;
43
25
  /** The list holding `id` and the index inside it, or null when absent. */
@@ -88,18 +70,7 @@ function mark(el, attr, on) {
88
70
  if (on) el.setAttribute(attr, "");
89
71
  else el.removeAttribute(attr);
90
72
  }
91
- function ChevronGlyph() {
92
- return /* @__PURE__ */ jsx("svg", {
93
- viewBox: "0 0 24 24",
94
- fill: "none",
95
- stroke: "currentColor",
96
- strokeWidth: 2.5,
97
- strokeLinecap: "round",
98
- strokeLinejoin: "round",
99
- "aria-hidden": true,
100
- children: /* @__PURE__ */ jsx("path", { d: "m9 6 6 6-6 6" })
101
- });
102
- }
73
+ const chevronIcon = iconNode("chevron-right");
103
74
  /** React keeps `indeterminate` off the JSX types; the DOM property is the
104
75
  * only channel, so the checkbox owns its ref. */
105
76
  function SelectBox(props) {
@@ -115,7 +86,7 @@ function SelectBox(props) {
115
86
  onChange: props.onToggle
116
87
  });
117
88
  }
118
- function DataTable(rawProps) {
89
+ function DataTableImpl(rawProps) {
119
90
  injectComponentStyle("table");
120
91
  const props = rawProps;
121
92
  const { selectable = false, sortable = true, filterable = false, showToolbar = true, tree = false, virtual: virtualProp = false, rowHeight = 40, paginated = false, pageSize = 10, pageSizeOptions = [
@@ -213,6 +184,7 @@ function DataTable(rawProps) {
213
184
  });
214
185
  const viewport = useRef(null);
215
186
  const rows = table.getRowModel().rows;
187
+ const [hydrated, setHydrated] = useState(false);
216
188
  /** The declared row height is the density-scale baseline; the live
217
189
  * scale comes off the document so the virtual window matches what CSS
218
190
  * actually renders. It is read once and re-read only when the density
@@ -240,8 +212,15 @@ function DataTable(rawProps) {
240
212
  });
241
213
  return () => observer.disconnect();
242
214
  }, [virtual]);
243
- const virtualRows = virtualizer.getVirtualItems();
244
- const totalSize = virtualizer.getTotalSize();
215
+ useEffect(() => setHydrated(true), []);
216
+ const fallbackRows = virtual ? rows.slice(0, Math.max(1, Math.ceil(320 / rowHeight))).map((row, index) => ({
217
+ key: row.id ?? index,
218
+ index,
219
+ start: index * rowHeight,
220
+ size: rowHeight
221
+ })) : [];
222
+ const virtualRows = hydrated ? virtualizer.getVirtualItems() : fallbackRows;
223
+ const totalSize = hydrated ? virtualizer.getTotalSize() : rows.length * rowHeight;
245
224
  /** Column ids of the visible leaves, for pin-seam bookkeeping. */
246
225
  const leafIds = table.getAllLeafColumns().map((c) => c.id);
247
226
  const expandHostId = tree ? leafIds.find((id) => id !== SELECT_COL_ID) : void 0;
@@ -431,7 +410,7 @@ function DataTable(rawProps) {
431
410
  const style = { ...pin.style };
432
411
  delete pin.style;
433
412
  const rowSpan = cell.getRowSpan();
434
- if (rowSpan > 1) style.gridRow = `span ${rowSpan}`;
413
+ if (rowSpan > 1) style["--bs-table-row-span"] = String(rowSpan);
435
414
  const spanned = rowSpan > 1 ? { "data-spanned": "" } : {};
436
415
  let content;
437
416
  if (column.id === SELECT_COL_ID) content = /* @__PURE__ */ jsx(SelectBox, {
@@ -452,7 +431,7 @@ function DataTable(rawProps) {
452
431
  "data-leaf": !row.getCanExpand() || void 0,
453
432
  "aria-label": row.getIsExpanded() ? messages.table.collapseRow : messages.table.expandRow,
454
433
  onClick: () => row.toggleExpanded(),
455
- children: /* @__PURE__ */ jsx(ChevronGlyph, {})
434
+ children: chevronIcon
456
435
  }), /* @__PURE__ */ jsx(FlexRender, { cell })]
457
436
  });
458
437
  else content = /* @__PURE__ */ jsx(FlexRender, { cell });
@@ -509,11 +488,8 @@ function DataTable(rawProps) {
509
488
  const style = {};
510
489
  if (virtual) {
511
490
  const item = virtualRows[virtualIndex];
512
- style.position = "absolute";
513
- style.insetInlineStart = "0";
514
- style.inlineSize = "100%";
515
- style.transform = `translateY(${item.start}px)`;
516
- style.blockSize = `${item.size}px`;
491
+ style["--bs-table-virtual-row-start"] = `${item.start}px`;
492
+ style["--bs-table-virtual-row-size"] = `${item.size}px`;
517
493
  }
518
494
  return /* @__PURE__ */ jsx("div", {
519
495
  role: "row",
@@ -564,10 +540,8 @@ function DataTable(rawProps) {
564
540
  "data-scope": "table",
565
541
  "data-part": "body",
566
542
  "data-merge": mergeMode || void 0,
567
- style: virtual ? {
568
- position: "relative",
569
- blockSize: `${totalSize}px`
570
- } : void 0,
543
+ "data-virtual": virtual || void 0,
544
+ style: virtual ? { "--bs-table-virtual-total": `${totalSize}px` } : void 0,
571
545
  children: [virtual ? virtualRows.map((_, index) => renderRow(rows[index], index)) : rows.map((row) => renderRow(row, -1)), rows.length === 0 ? /* @__PURE__ */ jsx("div", {
572
546
  "data-scope": "table",
573
547
  "data-part": "empty",
@@ -609,10 +583,13 @@ function DataTable(rawProps) {
609
583
  positioning: { placement: "top-start" },
610
584
  children: [/* @__PURE__ */ jsx(Select$1.Control, { children: /* @__PURE__ */ jsxs(Select$1.Trigger, {
611
585
  "aria-label": messages.table.rowsPerPage,
612
- children: [/* @__PURE__ */ jsx(Select$1.ValueText, {}), /* @__PURE__ */ jsx(Select$1.Indicator, { children: chevronDownGlyph() })]
586
+ children: [/* @__PURE__ */ jsx(Select$1.ValueText, {}), /* @__PURE__ */ jsx(Select$1.Indicator, { children: chevronDownIcon })]
613
587
  }) }), /* @__PURE__ */ jsx(Select$1.Positioner, { children: /* @__PURE__ */ jsx(Select$1.Content, { children: sizeItems.items.map((item) => /* @__PURE__ */ jsxs(Select$1.Item, {
614
588
  item,
615
- children: [/* @__PURE__ */ jsx(Select$1.ItemText, { children: item.label }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: "✓" })]
589
+ children: [/* @__PURE__ */ jsx(Select$1.ItemText, { children: item.label }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: iconNode("check", {
590
+ width: 14,
591
+ height: 14
592
+ }) })]
616
593
  }, item.value)) }) })]
617
594
  });
618
595
  const pager = /* @__PURE__ */ jsxs(Pagination.Root, {
@@ -621,13 +598,13 @@ function DataTable(rawProps) {
621
598
  page: pagination.pageIndex + 1,
622
599
  onPageChange: (details) => table.setPageIndex(details.page - 1),
623
600
  children: [
624
- /* @__PURE__ */ jsx(Pagination.PrevTrigger, { children: pageGlyph("start") }),
601
+ /* @__PURE__ */ jsx(Pagination.PrevTrigger, { children: pageIcon("start") }),
625
602
  /* @__PURE__ */ jsx(Pagination.Context, { children: (scope) => scope.pages.map((page, index) => page.type === "ellipsis" ? /* @__PURE__ */ jsx(Pagination.Ellipsis, { index }, `e${index}`) : /* @__PURE__ */ jsx(Pagination.Item, {
626
603
  type: "page",
627
604
  value: page.value,
628
605
  children: String(page.value)
629
606
  }, page.value)) }),
630
- /* @__PURE__ */ jsx(Pagination.NextTrigger, { children: pageGlyph("end") })
607
+ /* @__PURE__ */ jsx(Pagination.NextTrigger, { children: pageIcon("end") })
631
608
  ]
632
609
  });
633
610
  return /* @__PURE__ */ jsxs("div", {
@@ -688,5 +665,6 @@ function DataTable(rawProps) {
688
665
  ]
689
666
  });
690
667
  }
668
+ const DataTable = withSelfRoot(DataTableImpl);
691
669
  //#endregion
692
670
  export { DataTable, FlexRender, createColumnHelper };
@@ -1,6 +1,27 @@
1
- import { ComponentProps } from "react";
1
+ import { ComponentProps, ReactNode } from "react";
2
2
  import { Tabs as Tabs$1 } from "@ark-ui/react/tabs";
3
3
  //#region src/components/tabs/index.d.ts
4
+ export type TabsItem = {
5
+ value: string;
6
+ label: string;
7
+ content?: ReactNode;
8
+ };
9
+ export interface TabsFacadeProps {
10
+ value?: string;
11
+ defaultValue?: string;
12
+ items: TabsItem[];
13
+ /** The register: a ruled line (default), or each tab its own card. */
14
+ variant?: "line" | "card";
15
+ orientation?: "horizontal" | "vertical";
16
+ /** One rung of the control-height ladder for the tab rows. */
17
+ size?: "sm" | "md" | "lg";
18
+ className?: string;
19
+ onValueChange?: (value: string) => void;
20
+ }
21
+ declare function TabsFacade({ value, defaultValue, items, variant, orientation, size, className, onValueChange }: TabsFacadeProps): import("react").JSX.Element;
22
+ declare namespace TabsFacade {
23
+ var displayName: string;
24
+ }
4
25
  type TabsRootProps = ComponentProps<typeof Tabs$1.Root> & {
5
26
  /** One rung of the control-height ladder for the tab rows. */
6
27
  size?: "sm" | "md" | "lg";
@@ -14,7 +35,8 @@ declare function TabsRoot({ size, variant, ...rest }: TabsRootProps): import("re
14
35
  * Parts: Root, List, Trigger, Content, Indicator (machine-positioned ink
15
36
  * bar on the list rule).
16
37
  */
17
- export declare const Tabs: Omit<typeof Tabs$1, "Root"> & {
38
+ type TabsParts = Omit<typeof Tabs$1, "Root"> & {
18
39
  Root: typeof TabsRoot;
19
40
  };
41
+ export declare const Tabs: typeof TabsFacade & TabsParts;
20
42
  //#endregion
@@ -1,24 +1,40 @@
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 { Tabs as Tabs$1 } from "@ark-ui/react/tabs";
4
5
  //#region src/components/tabs/index.tsx
6
+ function TabsFacade({ value, defaultValue, items, variant = "line", orientation = "horizontal", size = "md", className, onValueChange }) {
7
+ return /* @__PURE__ */ jsxs(TabsRoot, {
8
+ className,
9
+ size,
10
+ variant,
11
+ orientation,
12
+ defaultValue,
13
+ ...value === void 0 ? {} : { value },
14
+ onValueChange: (details) => onValueChange?.(details.value),
15
+ children: [/* @__PURE__ */ jsxs(Tabs$1.List, { children: [items.map((item) => /* @__PURE__ */ jsx(Tabs$1.Trigger, {
16
+ value: item.value,
17
+ children: item.label
18
+ }, item.value)), /* @__PURE__ */ jsx(Tabs$1.Indicator, {})] }), items.map((item) => /* @__PURE__ */ jsx(Tabs$1.Content, {
19
+ value: item.value,
20
+ children: item.content
21
+ }, item.value))]
22
+ });
23
+ }
24
+ TabsFacade.displayName = "STabs";
5
25
  function TabsRoot({ size = "md", variant = "line", ...rest }) {
26
+ const id = useElementId("tabs", rest);
6
27
  return /* @__PURE__ */ jsx(Tabs$1.Root, {
7
28
  ...rest,
29
+ id,
8
30
  "data-size": size,
9
31
  "data-variant": variant
10
32
  });
11
33
  }
12
- /**
13
- * Tabs — tabbed navigation.
14
- *
15
- * Parts: Root, List, Trigger, Content, Indicator (machine-positioned ink
16
- * bar on the list rule).
17
- */
18
- const Tabs = {
34
+ const Tabs = Object.assign(TabsFacade, {
19
35
  ...Tabs$1,
20
36
  Root: TabsRoot
21
- };
37
+ });
22
38
  injectComponentStyle("tabs");
23
39
  //#endregion
24
40
  export { Tabs };