@bysages/react 0.2.2 → 0.3.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 (293) hide show
  1. package/README.md +16 -2
  2. package/dist/ai-response-jZy-0Tvv.mjs +127 -0
  3. package/dist/chevron-BeHvt46K.mjs +17 -0
  4. package/dist/components/accordion/index.d.mts +7 -0
  5. package/dist/components/accordion/index.mjs +10 -0
  6. package/dist/components/affix/index.d.mts +20 -0
  7. package/dist/components/affix/index.mjs +18 -0
  8. package/dist/components/ai/index.d.mts +2 -0
  9. package/dist/components/ai/index.mjs +65 -0
  10. package/dist/components/ai-action/index.d.mts +14 -0
  11. package/dist/components/ai-action/index.mjs +18 -0
  12. package/dist/components/ai-attachments/index.d.mts +19 -0
  13. package/dist/components/ai-attachments/index.mjs +106 -0
  14. package/dist/components/ai-message/index.d.mts +11 -0
  15. package/dist/components/ai-message/index.mjs +15 -0
  16. package/dist/components/ai-prompt-input/index.d.mts +47 -0
  17. package/dist/components/ai-prompt-input/index.mjs +135 -0
  18. package/dist/components/ai-reasoning/index.d.mts +13 -0
  19. package/dist/components/ai-reasoning/index.mjs +19 -0
  20. package/dist/components/ai-response/index.d.mts +22 -0
  21. package/dist/components/ai-response/index.mjs +2 -0
  22. package/dist/components/ai-source/index.d.mts +17 -0
  23. package/dist/components/ai-source/index.mjs +27 -0
  24. package/dist/components/ai-suggestion/index.d.mts +13 -0
  25. package/dist/components/ai-suggestion/index.mjs +16 -0
  26. package/dist/components/ai-tool/index.d.mts +21 -0
  27. package/dist/components/ai-tool/index.mjs +36 -0
  28. package/dist/components/alert/index.d.mts +23 -0
  29. package/dist/components/alert/index.mjs +80 -0
  30. package/dist/components/angle-slider/index.d.mts +16 -0
  31. package/dist/components/angle-slider/index.mjs +21 -0
  32. package/dist/components/aspect-ratio/index.d.mts +10 -0
  33. package/dist/components/aspect-ratio/index.mjs +17 -0
  34. package/dist/components/autocomplete/index.d.mts +21 -0
  35. package/dist/components/autocomplete/index.mjs +35 -0
  36. package/dist/components/avatar/index.d.mts +23 -0
  37. package/dist/components/avatar/index.mjs +15 -0
  38. package/dist/components/avatar-group/index.d.mts +11 -0
  39. package/dist/components/avatar-group/index.mjs +15 -0
  40. package/dist/components/back-top/index.d.mts +29 -0
  41. package/dist/components/back-top/index.mjs +82 -0
  42. package/dist/components/badge/index.d.mts +10 -0
  43. package/dist/components/badge/index.mjs +15 -0
  44. package/dist/components/banner/index.d.mts +31 -0
  45. package/dist/components/banner/index.mjs +63 -0
  46. package/dist/components/bento/index.d.mts +26 -0
  47. package/dist/components/bento/index.mjs +41 -0
  48. package/dist/components/block-ui/index.d.mts +12 -0
  49. package/dist/components/block-ui/index.mjs +24 -0
  50. package/dist/components/breadcrumb/index.d.mts +32 -0
  51. package/dist/components/breadcrumb/index.mjs +35 -0
  52. package/dist/components/browser/index.d.mts +23 -0
  53. package/dist/components/browser/index.mjs +70 -0
  54. package/dist/components/button/index.d.mts +19 -0
  55. package/dist/components/button/index.mjs +29 -0
  56. package/dist/components/button-group/index.d.mts +24 -0
  57. package/dist/components/button-group/index.mjs +25 -0
  58. package/dist/components/calendar/index.d.mts +17 -0
  59. package/dist/components/calendar/index.mjs +96 -0
  60. package/dist/components/card/index.d.mts +46 -0
  61. package/dist/components/card/index.mjs +44 -0
  62. package/dist/components/carousel/index.d.mts +9 -0
  63. package/dist/components/carousel/index.mjs +12 -0
  64. package/dist/components/cascade-select/index.d.mts +31 -0
  65. package/dist/components/cascade-select/index.mjs +229 -0
  66. package/dist/components/checkbox/index.d.mts +16 -0
  67. package/dist/components/checkbox/index.mjs +21 -0
  68. package/dist/components/checkbox-group/index.d.mts +28 -0
  69. package/dist/components/checkbox-group/index.mjs +65 -0
  70. package/dist/components/chip/index.d.mts +12 -0
  71. package/dist/components/chip/index.mjs +17 -0
  72. package/dist/components/client-only/index.d.mts +2 -0
  73. package/dist/components/client-only/index.mjs +2 -0
  74. package/dist/components/clipboard/index.d.mts +17 -0
  75. package/dist/components/clipboard/index.mjs +17 -0
  76. package/dist/components/collapsible/index.d.mts +7 -0
  77. package/dist/components/collapsible/index.mjs +10 -0
  78. package/dist/components/collection/index.d.mts +2 -0
  79. package/dist/components/collection/index.mjs +2 -0
  80. package/dist/components/color-picker/index.d.mts +20 -0
  81. package/dist/components/color-picker/index.mjs +25 -0
  82. package/dist/components/combobox/index.d.mts +17 -0
  83. package/dist/components/combobox/index.mjs +18 -0
  84. package/dist/components/command/index.d.mts +43 -0
  85. package/dist/components/command/index.mjs +137 -0
  86. package/dist/components/comment/index.d.mts +17 -0
  87. package/dist/components/comment/index.mjs +47 -0
  88. package/dist/components/config-provider/index.d.mts +46 -0
  89. package/dist/components/config-provider/index.mjs +41 -0
  90. package/dist/components/container/index.d.mts +13 -0
  91. package/dist/components/container/index.mjs +15 -0
  92. package/dist/components/data-view/index.d.mts +18 -0
  93. package/dist/components/data-view/index.mjs +64 -0
  94. package/dist/components/date-input/index.d.mts +17 -0
  95. package/dist/components/date-input/index.mjs +21 -0
  96. package/dist/components/date-picker/index.d.mts +19 -0
  97. package/dist/components/date-picker/index.mjs +23 -0
  98. package/dist/components/deferred-content/index.d.mts +16 -0
  99. package/dist/components/deferred-content/index.mjs +34 -0
  100. package/dist/components/descriptions/index.d.mts +33 -0
  101. package/dist/components/descriptions/index.mjs +50 -0
  102. package/dist/components/dialog/index.d.mts +9 -0
  103. package/dist/components/dialog/index.mjs +11 -0
  104. package/dist/components/dock/index.d.mts +25 -0
  105. package/dist/components/dock/index.mjs +51 -0
  106. package/dist/components/download-trigger/index.d.mts +2 -0
  107. package/dist/components/download-trigger/index.mjs +2 -0
  108. package/dist/components/drawer/index.d.mts +9 -0
  109. package/dist/components/drawer/index.mjs +12 -0
  110. package/dist/components/dynamic-input/index.d.mts +28 -0
  111. package/dist/components/dynamic-input/index.mjs +83 -0
  112. package/dist/components/editable/index.d.mts +16 -0
  113. package/dist/components/editable/index.mjs +17 -0
  114. package/dist/components/ellipsis/index.d.mts +10 -0
  115. package/dist/components/ellipsis/index.mjs +19 -0
  116. package/dist/components/empty/index.d.mts +28 -0
  117. package/dist/components/empty/index.mjs +32 -0
  118. package/dist/components/field/index.d.mts +8 -0
  119. package/dist/components/field/index.mjs +11 -0
  120. package/dist/components/fieldset/index.d.mts +7 -0
  121. package/dist/components/fieldset/index.mjs +10 -0
  122. package/dist/components/file-upload/index.d.mts +18 -0
  123. package/dist/components/file-upload/index.mjs +23 -0
  124. package/dist/components/float-button/index.d.mts +59 -0
  125. package/dist/components/float-button/index.mjs +90 -0
  126. package/dist/components/floating-panel/index.d.mts +9 -0
  127. package/dist/components/floating-panel/index.mjs +12 -0
  128. package/dist/components/focus-trap/index.d.mts +2 -0
  129. package/dist/components/focus-trap/index.mjs +2 -0
  130. package/dist/components/form/index.d.mts +2 -0
  131. package/dist/components/form/index.mjs +67 -0
  132. package/dist/components/format/index.d.mts +9 -0
  133. package/dist/components/format/index.mjs +10 -0
  134. package/dist/components/frame/index.d.mts +10 -0
  135. package/dist/components/frame/index.mjs +12 -0
  136. package/dist/components/grid/index.d.mts +13 -0
  137. package/dist/components/grid/index.mjs +31 -0
  138. package/dist/components/highlight/index.d.mts +7 -0
  139. package/dist/components/highlight/index.mjs +11 -0
  140. package/dist/components/hover-card/index.d.mts +7 -0
  141. package/dist/components/hover-card/index.mjs +10 -0
  142. package/dist/components/icon/index.d.mts +24 -0
  143. package/dist/components/icon/index.mjs +26 -0
  144. package/dist/components/image/index.d.mts +17 -0
  145. package/dist/components/image/index.mjs +57 -0
  146. package/dist/components/image-cropper/index.d.mts +8 -0
  147. package/dist/components/image-cropper/index.mjs +11 -0
  148. package/dist/components/image-viewer/index.d.mts +18 -0
  149. package/dist/components/image-viewer/index.mjs +110 -0
  150. package/dist/components/input/index.d.mts +19 -0
  151. package/dist/components/input/index.mjs +2 -0
  152. package/dist/components/input-group/index.d.mts +17 -0
  153. package/dist/components/input-group/index.mjs +31 -0
  154. package/dist/components/json-tree-view/index.d.mts +7 -0
  155. package/dist/components/json-tree-view/index.mjs +10 -0
  156. package/dist/components/kbd/index.d.mts +6 -0
  157. package/dist/components/kbd/index.mjs +14 -0
  158. package/dist/components/layout/index.d.mts +63 -0
  159. package/dist/components/layout/index.mjs +133 -0
  160. package/dist/components/link/index.d.mts +10 -0
  161. package/dist/components/link/index.mjs +18 -0
  162. package/dist/components/list/index.d.mts +39 -0
  163. package/dist/components/list/index.mjs +66 -0
  164. package/dist/components/listbox/index.d.mts +18 -0
  165. package/dist/components/listbox/index.mjs +18 -0
  166. package/dist/components/marquee/index.d.mts +7 -0
  167. package/dist/components/marquee/index.mjs +10 -0
  168. package/dist/components/masonry/index.d.mts +11 -0
  169. package/dist/components/masonry/index.mjs +29 -0
  170. package/dist/components/mentions/index.d.mts +2 -0
  171. package/dist/components/mentions/index.mjs +2 -0
  172. package/dist/components/menu/index.d.mts +20 -0
  173. package/dist/components/menu/index.mjs +37 -0
  174. package/dist/components/menubar/index.d.mts +32 -0
  175. package/dist/components/menubar/index.mjs +35 -0
  176. package/dist/components/meter/index.d.mts +26 -0
  177. package/dist/components/meter/index.mjs +59 -0
  178. package/dist/components/navigation-menu/index.d.mts +8 -0
  179. package/dist/components/navigation-menu/index.mjs +11 -0
  180. package/dist/components/number-input/index.d.mts +16 -0
  181. package/dist/components/number-input/index.mjs +21 -0
  182. package/dist/components/order-list/index.d.mts +21 -0
  183. package/dist/components/order-list/index.mjs +162 -0
  184. package/dist/components/page-header/index.d.mts +32 -0
  185. package/dist/components/page-header/index.mjs +34 -0
  186. package/dist/components/pagination/index.d.mts +18 -0
  187. package/dist/components/pagination/index.mjs +23 -0
  188. package/dist/components/password-input/index.d.mts +16 -0
  189. package/dist/components/password-input/index.mjs +21 -0
  190. package/dist/components/pin-input/index.d.mts +15 -0
  191. package/dist/components/pin-input/index.mjs +20 -0
  192. package/dist/components/popconfirm/index.d.mts +20 -0
  193. package/dist/components/popconfirm/index.mjs +44 -0
  194. package/dist/components/popover/index.d.mts +8 -0
  195. package/dist/components/popover/index.mjs +11 -0
  196. package/dist/components/presence/index.d.mts +2 -0
  197. package/dist/components/presence/index.mjs +2 -0
  198. package/dist/components/progress/index.d.mts +16 -0
  199. package/dist/components/progress/index.mjs +21 -0
  200. package/dist/components/progress-group/index.d.mts +22 -0
  201. package/dist/components/progress-group/index.mjs +56 -0
  202. package/dist/components/qr-code/index.d.mts +8 -0
  203. package/dist/components/qr-code/index.mjs +11 -0
  204. package/dist/components/radio-group/index.d.mts +16 -0
  205. package/dist/components/radio-group/index.mjs +21 -0
  206. package/dist/components/rating-group/index.d.mts +16 -0
  207. package/dist/components/rating-group/index.mjs +21 -0
  208. package/dist/components/result/index.d.mts +31 -0
  209. package/dist/components/result/index.mjs +59 -0
  210. package/dist/components/scroll-area/index.d.mts +7 -0
  211. package/dist/components/scroll-area/index.mjs +10 -0
  212. package/dist/components/segment-group/index.d.mts +18 -0
  213. package/dist/components/segment-group/index.mjs +20 -0
  214. package/dist/components/select/index.d.mts +2 -0
  215. package/dist/components/select/index.mjs +2 -0
  216. package/dist/components/separator/index.d.mts +11 -0
  217. package/dist/components/separator/index.mjs +16 -0
  218. package/dist/components/signature-pad/index.d.mts +8 -0
  219. package/dist/components/signature-pad/index.mjs +11 -0
  220. package/dist/components/skeleton/index.d.mts +7 -0
  221. package/dist/components/skeleton/index.mjs +13 -0
  222. package/dist/components/slider/index.d.mts +16 -0
  223. package/dist/components/slider/index.mjs +21 -0
  224. package/dist/components/spinner/index.d.mts +9 -0
  225. package/dist/components/spinner/index.mjs +36 -0
  226. package/dist/components/split-button/index.d.mts +36 -0
  227. package/dist/components/split-button/index.mjs +71 -0
  228. package/dist/components/splitter/index.d.mts +7 -0
  229. package/dist/components/splitter/index.mjs +10 -0
  230. package/dist/components/spotlight/index.d.mts +12 -0
  231. package/dist/components/spotlight/index.mjs +33 -0
  232. package/dist/components/stack/index.d.mts +11 -0
  233. package/dist/components/stack/index.mjs +32 -0
  234. package/dist/components/stat/index.d.mts +29 -0
  235. package/dist/components/stat/index.mjs +37 -0
  236. package/dist/components/steps/index.d.mts +19 -0
  237. package/dist/components/steps/index.mjs +24 -0
  238. package/dist/components/swap/index.d.mts +8 -0
  239. package/dist/components/swap/index.mjs +11 -0
  240. package/dist/components/switch/index.d.mts +16 -0
  241. package/dist/components/switch/index.mjs +21 -0
  242. package/dist/components/table/index.d.mts +79 -0
  243. package/dist/components/table/index.mjs +688 -0
  244. package/dist/components/tabs/index.d.mts +20 -0
  245. package/dist/components/tabs/index.mjs +24 -0
  246. package/dist/components/tags-input/index.d.mts +17 -0
  247. package/dist/components/tags-input/index.mjs +22 -0
  248. package/dist/components/terminal/index.d.mts +17 -0
  249. package/dist/components/terminal/index.mjs +65 -0
  250. package/dist/components/textarea/index.d.mts +14 -0
  251. package/dist/components/textarea/index.mjs +20 -0
  252. package/dist/components/timeline/index.d.mts +26 -0
  253. package/dist/components/timeline/index.mjs +40 -0
  254. package/dist/components/timer/index.d.mts +8 -0
  255. package/dist/components/timer/index.mjs +11 -0
  256. package/dist/components/toast/index.d.mts +11 -0
  257. package/dist/components/toast/index.mjs +13 -0
  258. package/dist/components/toc/index.d.mts +7 -0
  259. package/dist/components/toc/index.mjs +10 -0
  260. package/dist/components/toggle/index.d.mts +7 -0
  261. package/dist/components/toggle/index.mjs +10 -0
  262. package/dist/components/toggle-group/index.d.mts +15 -0
  263. package/dist/components/toggle-group/index.mjs +20 -0
  264. package/dist/components/toolbar/index.d.mts +17 -0
  265. package/dist/components/toolbar/index.mjs +29 -0
  266. package/dist/components/tooltip/index.d.mts +7 -0
  267. package/dist/components/tooltip/index.mjs +10 -0
  268. package/dist/components/tour/index.d.mts +11 -0
  269. package/dist/components/tour/index.mjs +13 -0
  270. package/dist/components/transfer/index.d.mts +23 -0
  271. package/dist/components/transfer/index.mjs +154 -0
  272. package/dist/components/tree-select/index.d.mts +28 -0
  273. package/dist/components/tree-select/index.mjs +157 -0
  274. package/dist/components/tree-view/index.d.mts +19 -0
  275. package/dist/components/tree-view/index.mjs +18 -0
  276. package/dist/components/typography/index.d.mts +32 -0
  277. package/dist/components/typography/index.mjs +34 -0
  278. package/dist/components/user/index.d.mts +20 -0
  279. package/dist/components/user/index.mjs +42 -0
  280. package/dist/components/virtual-list/index.d.mts +17 -0
  281. package/dist/components/virtual-list/index.mjs +52 -0
  282. package/dist/components/watermark/index.d.mts +16 -0
  283. package/dist/components/watermark/index.mjs +80 -0
  284. package/dist/index-CsfxYv6J.d.mts +10383 -0
  285. package/dist/index-DFN9F5Zt.d.mts +42 -0
  286. package/dist/index-Uefyw7Im.d.mts +108 -0
  287. package/dist/index-uPyYiWaL.d.mts +1813 -0
  288. package/dist/index.d.mts +141 -15446
  289. package/dist/index.mjs +141 -4871
  290. package/dist/input-2oezH-dY.mjs +58 -0
  291. package/dist/mentions-DMIBCBOd.mjs +181 -0
  292. package/dist/select-D1xiT1oJ.mjs +68 -0
  293. package/package.json +103 -9
@@ -0,0 +1,29 @@
1
+ import { HTMLAttributes } from "react";
2
+ //#region src/components/back-top/index.d.ts
3
+ export interface BackTopProps extends HTMLAttributes<HTMLButtonElement> {
4
+ /** How far the reader must have travelled (px) before the affordance
5
+ * appears. */
6
+ threshold?: number;
7
+ /** The accessible name; the control is icon-only by default. */
8
+ label?: string;
9
+ /** Ride a scrolling element of your own instead of the page: the
10
+ * control moors inside that element's corner and watches its
11
+ * scrollTop. The host supplies the positioning context. */
12
+ scrollEl?: () => HTMLElement | null;
13
+ }
14
+ /**
15
+ * A way home: after the page has scrolled past `threshold`, a small
16
+ * floating control rises at the page's corner and returns the reader to
17
+ * the top. The scroll itself stays native — `window.scrollTo` defers to
18
+ * the stylesheet's `scroll-behavior: smooth`, which reduced motion turns
19
+ * back into an instant jump (a moored control asks the media query
20
+ * directly, since a scroller of its own has no stylesheet to defer to).
21
+ * The button stays mounted either way so the entrance is a transition,
22
+ * never a pop.
23
+ *
24
+ * The control itself is the shared `Button` (outline, square) — the
25
+ * paper, hairline and halo are its; this family owns only the floating
26
+ * and the entrance.
27
+ */
28
+ export declare function BackTop({ threshold, label, scrollEl, ...rest }: BackTopProps): import("react").JSX.Element;
29
+ //#endregion
@@ -0,0 +1,82 @@
1
+ import { Button } from "../button/index.mjs";
2
+ import { injectComponentStyle } from "@bysages/core";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { useEffect, useState } from "react";
5
+ //#region src/components/back-top/index.tsx
6
+ /** The single glyph a way-home control needs: one stroke pointing up. */
7
+ function chevronUp() {
8
+ return /* @__PURE__ */ jsx("svg", {
9
+ width: 16,
10
+ height: 16,
11
+ viewBox: "0 0 24 24",
12
+ fill: "none",
13
+ stroke: "currentColor",
14
+ strokeWidth: 1.75,
15
+ strokeLinecap: "round",
16
+ strokeLinejoin: "round",
17
+ "aria-hidden": "true",
18
+ children: /* @__PURE__ */ jsx("path", { d: "m6 14 6-6 6 6" })
19
+ });
20
+ }
21
+ /**
22
+ * A way home: after the page has scrolled past `threshold`, a small
23
+ * floating control rises at the page's corner and returns the reader to
24
+ * the top. The scroll itself stays native — `window.scrollTo` defers to
25
+ * the stylesheet's `scroll-behavior: smooth`, which reduced motion turns
26
+ * back into an instant jump (a moored control asks the media query
27
+ * directly, since a scroller of its own has no stylesheet to defer to).
28
+ * The button stays mounted either way so the entrance is a transition,
29
+ * never a pop.
30
+ *
31
+ * The control itself is the shared `Button` (outline, square) — the
32
+ * paper, hairline and halo are its; this family owns only the floating
33
+ * and the entrance.
34
+ */
35
+ function BackTop({ threshold = 400, label = "Back to top", scrollEl, ...rest }) {
36
+ injectComponentStyle("back-top");
37
+ const [visible, setVisible] = useState(false);
38
+ useEffect(() => {
39
+ if (typeof window === "undefined") return;
40
+ const el = scrollEl?.() ?? null;
41
+ const onScroll = () => setVisible((el ? el.scrollTop : window.scrollY) > threshold);
42
+ onScroll();
43
+ if (el) el.addEventListener("scroll", onScroll, { passive: true });
44
+ else window.addEventListener("scroll", onScroll, { passive: true });
45
+ return () => {
46
+ if (el) el.removeEventListener("scroll", onScroll);
47
+ else window.removeEventListener("scroll", onScroll);
48
+ };
49
+ }, [threshold, scrollEl]);
50
+ const toTop = () => {
51
+ const el = scrollEl?.();
52
+ if (!el) {
53
+ window.scrollTo({ top: 0 });
54
+ return;
55
+ }
56
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
57
+ el.scrollTo({
58
+ top: 0,
59
+ behavior: reduce ? "auto" : "smooth"
60
+ });
61
+ };
62
+ return /* @__PURE__ */ jsx("div", {
63
+ "data-scope": "back-top",
64
+ "data-part": "root",
65
+ "data-state": visible ? "shown" : "hidden",
66
+ ...scrollEl ? { "data-container": "" } : {},
67
+ children: /* @__PURE__ */ jsx(Button, {
68
+ ...rest,
69
+ variant: "outline",
70
+ square: true,
71
+ size: "lg",
72
+ type: "button",
73
+ "aria-label": label,
74
+ "aria-hidden": visible ? void 0 : "true",
75
+ tabIndex: visible ? 0 : -1,
76
+ onClick: toTop,
77
+ children: rest.children ?? chevronUp()
78
+ })
79
+ });
80
+ }
81
+ //#endregion
82
+ export { BackTop };
@@ -0,0 +1,10 @@
1
+ import { HTMLAttributes } from "react";
2
+ //#region src/components/badge/index.d.ts
3
+ /** A small seal of state. Ink is the neutral tone; the four semantic
4
+ * pigments are fixed. Subtle and outline re-register the same pigment. */
5
+ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
6
+ tone?: "ink" | "info" | "success" | "warning" | "danger";
7
+ variant?: "solid" | "subtle" | "outline";
8
+ }
9
+ export declare function Badge({ tone, variant, ...rest }: BadgeProps): import("react").JSX.Element;
10
+ //#endregion
@@ -0,0 +1,15 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/badge/index.tsx
4
+ function Badge({ tone = "ink", variant = "solid", ...rest }) {
5
+ injectComponentStyle("badge");
6
+ return /* @__PURE__ */ jsx("span", {
7
+ ...rest,
8
+ "data-scope": "badge",
9
+ "data-part": "root",
10
+ "data-tone": tone,
11
+ "data-variant": variant
12
+ });
13
+ }
14
+ //#endregion
15
+ export { Badge };
@@ -0,0 +1,31 @@
1
+ import { ButtonHTMLAttributes, HTMLAttributes } from "react";
2
+ //#region src/components/banner/index.d.ts
3
+ export type BannerStatus = "ink" | "info" | "success" | "warning" | "danger";
4
+ export interface BannerRootProps extends HTMLAttributes<HTMLElement> {
5
+ status?: BannerStatus;
6
+ }
7
+ export declare const Banner: (({ status, children, ...rest }: BannerRootProps) => import("react").JSX.Element) & {
8
+ Root: ({ status, children, ...rest }: BannerRootProps) => import("react").JSX.Element;
9
+ Icon: {
10
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ Body: {
14
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ Title: {
18
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ Description: {
22
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ Actions: {
26
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
27
+ displayName: string;
28
+ };
29
+ Close: (rest: ButtonHTMLAttributes<HTMLButtonElement>) => import("react").JSX.Element;
30
+ };
31
+ //#endregion
@@ -0,0 +1,63 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/banner/index.tsx
4
+ /** A page-level notice, spoken across the full measure: a wash of the
5
+ * status pigment, one heavier hairline on the leading edge, and room
6
+ * for actions and a quiet close. Ink is the neutral register; the four
7
+ * semantic pigments are fixed. */
8
+ const Root = ({ status = "ink", children, ...rest }) => /* @__PURE__ */ jsx("div", {
9
+ ...rest,
10
+ role: status === "ink" ? void 0 : "status",
11
+ "data-scope": "banner",
12
+ "data-part": "root",
13
+ "data-status": status,
14
+ children
15
+ });
16
+ function part(name, tag) {
17
+ const Tag = tag;
18
+ const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
19
+ ...rest,
20
+ "data-scope": "banner",
21
+ "data-part": name.toLowerCase(),
22
+ children
23
+ });
24
+ Component.displayName = "Banner" + name;
25
+ return Component;
26
+ }
27
+ const Icon = part("Icon", "span");
28
+ const Body = part("Body", "div");
29
+ const Title = part("Title", "p");
30
+ const Description = part("Description", "p");
31
+ const Actions = part("Actions", "div");
32
+ /** The quiet close: a plain square-cut button; dismissal stays the
33
+ * consumer's state. */
34
+ const Close = (rest) => /* @__PURE__ */ jsx("button", {
35
+ ...rest,
36
+ type: rest.type ?? "button",
37
+ "aria-label": rest["aria-label"] ?? "Dismiss",
38
+ "data-scope": "banner",
39
+ "data-part": "close",
40
+ children: /* @__PURE__ */ jsx("svg", {
41
+ viewBox: "0 0 16 16",
42
+ fill: "none",
43
+ "aria-hidden": true,
44
+ children: /* @__PURE__ */ jsx("path", {
45
+ d: "M4 4l8 8M12 4l-8 8",
46
+ stroke: "currentColor",
47
+ strokeWidth: 1.5,
48
+ strokeLinecap: "round"
49
+ })
50
+ })
51
+ });
52
+ const Banner = Object.assign(Root, {
53
+ Root,
54
+ Icon,
55
+ Body,
56
+ Title,
57
+ Description,
58
+ Actions,
59
+ Close
60
+ });
61
+ injectComponentStyle("banner");
62
+ //#endregion
63
+ export { Banner };
@@ -0,0 +1,26 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ //#region src/components/bento/index.d.ts
3
+ export interface BentoProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Tracks across the lattice. */
5
+ columns?: number;
6
+ children?: ReactNode;
7
+ }
8
+ export interface BentoCellProps extends HTMLAttributes<HTMLDivElement> {
9
+ /** Columns this tile claims. */
10
+ span?: number;
11
+ /** Rows this tile claims. */
12
+ rowSpan?: number;
13
+ children?: ReactNode;
14
+ }
15
+ /** The bento lattice: a grid of unequal tiles that reads as one plate.
16
+ * The container owns the track count; each cell claims its own span. */
17
+ export declare function BentoRoot({ columns, children, ...rest }: BentoProps): import("react").JSX.Element;
18
+ /** One tile: `span` claims columns, `rowSpan` claims rows — the rest
19
+ * of the plate stays in measure. */
20
+ export declare function BentoCell({ span, rowSpan, children, ...rest }: BentoCellProps): import("react").JSX.Element;
21
+ /** The whole family under one handle — Bento.Root, Bento.Cell. */
22
+ export declare const Bento: typeof BentoRoot & {
23
+ Root: typeof BentoRoot;
24
+ Cell: typeof BentoCell;
25
+ };
26
+ //#endregion
@@ -0,0 +1,41 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/bento/index.tsx
4
+ /** The bento lattice: a grid of unequal tiles that reads as one plate.
5
+ * The container owns the track count; each cell claims its own span. */
6
+ function BentoRoot({ columns = 3, children, ...rest }) {
7
+ injectComponentStyle("bento");
8
+ return /* @__PURE__ */ jsx("div", {
9
+ ...rest,
10
+ "data-scope": "bento",
11
+ "data-part": "root",
12
+ style: {
13
+ ...rest.style,
14
+ "--bs-bento-columns": String(columns)
15
+ },
16
+ children
17
+ });
18
+ }
19
+ /** One tile: `span` claims columns, `rowSpan` claims rows — the rest
20
+ * of the plate stays in measure. */
21
+ function BentoCell({ span = 1, rowSpan = 1, children, ...rest }) {
22
+ injectComponentStyle("bento");
23
+ return /* @__PURE__ */ jsx("div", {
24
+ ...rest,
25
+ "data-scope": "bento",
26
+ "data-part": "cell",
27
+ style: {
28
+ ...rest.style,
29
+ "--bs-bento-span-x": String(span),
30
+ "--bs-bento-span-y": String(rowSpan)
31
+ },
32
+ children
33
+ });
34
+ }
35
+ /** The whole family under one handle — Bento.Root, Bento.Cell. */
36
+ const Bento = Object.assign(BentoRoot, {
37
+ Root: BentoRoot,
38
+ Cell: BentoCell
39
+ });
40
+ //#endregion
41
+ export { Bento, BentoCell, BentoRoot };
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ //#region src/components/block-ui/index.d.ts
3
+ export interface BlockUIProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** Whether the curtain is drawn. */
5
+ blocked?: boolean;
6
+ children?: ReactNode;
7
+ }
8
+ /** A curtain over content that must wait: the blocked region keeps its
9
+ * shape and dims under frosted paper while a quiet wheel reports the
10
+ * wait. Callers own the state; the curtain only answers it. */
11
+ export declare function BlockUI({ blocked, children, ...rest }: BlockUIProps): import("react").JSX.Element;
12
+ //#endregion
@@ -0,0 +1,24 @@
1
+ import { Spinner } from "../spinner/index.mjs";
2
+ import { injectComponentStyle } from "@bysages/core";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/components/block-ui/index.tsx
5
+ /** A curtain over content that must wait: the blocked region keeps its
6
+ * shape and dims under frosted paper while a quiet wheel reports the
7
+ * wait. Callers own the state; the curtain only answers it. */
8
+ function BlockUI({ blocked = false, children, ...rest }) {
9
+ injectComponentStyle("block-ui");
10
+ return /* @__PURE__ */ jsxs("div", {
11
+ ...rest,
12
+ "data-scope": "block-ui",
13
+ "data-part": "root",
14
+ "data-blocked": blocked ? "" : void 0,
15
+ "aria-busy": blocked || void 0,
16
+ children: [children, blocked ? /* @__PURE__ */ jsx("div", {
17
+ "data-scope": "block-ui",
18
+ "data-part": "mask",
19
+ children: /* @__PURE__ */ jsx(Spinner, { size: "lg" })
20
+ }) : null]
21
+ });
22
+ }
23
+ //#endregion
24
+ export { BlockUI };
@@ -0,0 +1,32 @@
1
+ import { AnchorHTMLAttributes, HTMLAttributes } from "react";
2
+ //#region src/components/breadcrumb/index.d.ts
3
+ export declare const Breadcrumb: {
4
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
5
+ displayName: string;
6
+ } & {
7
+ Root: {
8
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ List: {
12
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ Item: {
16
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ Link: {
20
+ ({ children, ...rest }: AnchorHTMLAttributes<HTMLAnchorElement>): import("react").JSX.Element;
21
+ displayName: string;
22
+ };
23
+ Current: {
24
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ Separator: {
28
+ ({ children, ...rest }: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
29
+ displayName: string;
30
+ };
31
+ };
32
+ //#endregion
@@ -0,0 +1,35 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/breadcrumb/index.tsx
4
+ /** A trail of waymarks: Root wraps the nav, List the ordered trail, and
5
+ * each Item carries a Link — or the Current page — parted by a quiet
6
+ * Separator. Links take href and the rest through attributes. */
7
+ function part(name, tag, extra = {}, fallback) {
8
+ const Tag = tag;
9
+ const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
10
+ ...extra,
11
+ ...rest,
12
+ "data-scope": "breadcrumb",
13
+ "data-part": name.toLowerCase(),
14
+ children: children ?? fallback
15
+ });
16
+ Component.displayName = "Breadcrumb" + name;
17
+ return Component;
18
+ }
19
+ const Root = part("Root", "nav", { "aria-label": "Breadcrumb" });
20
+ const List = part("List", "ol");
21
+ const Item = part("Item", "li");
22
+ const Link = part("Link", "a");
23
+ const Current = part("Current", "span", { "aria-current": "page" });
24
+ const Separator = part("Separator", "span", { "aria-hidden": "true" }, "/");
25
+ const Breadcrumb = Object.assign(Root, {
26
+ Root,
27
+ List,
28
+ Item,
29
+ Link,
30
+ Current,
31
+ Separator
32
+ });
33
+ injectComponentStyle("breadcrumb");
34
+ //#endregion
35
+ export { Breadcrumb };
@@ -0,0 +1,23 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ //#region src/components/browser/index.d.ts
3
+ export interface BrowserPartProps extends HTMLAttributes<HTMLDivElement> {
4
+ children?: ReactNode;
5
+ }
6
+ /** The three lamps are the system's own fixed pigments — the same
7
+ * semantics reserved for danger, warning, and success. */
8
+ export declare function BrowserDots(props: BrowserPartProps): import("react").JSX.Element;
9
+ export declare function BrowserRoot(props: BrowserPartProps): import("react").JSX.Element;
10
+ export declare function BrowserTitleBar(props: BrowserPartProps): import("react").JSX.Element;
11
+ export declare function BrowserUrlBar(props: BrowserPartProps): import("react").JSX.Element;
12
+ export declare function BrowserBody(props: BrowserPartProps): import("react").JSX.Element;
13
+ /** A browser window as a vessel: title bar, the three lamps, the
14
+ * address well, and a body that carries whatever the site hangs in
15
+ * it — an iframe, a screenshot, a live page. */
16
+ export declare const Browser: typeof BrowserRoot & {
17
+ Root: typeof BrowserRoot;
18
+ TitleBar: typeof BrowserTitleBar;
19
+ Dots: typeof BrowserDots;
20
+ UrlBar: typeof BrowserUrlBar;
21
+ Body: typeof BrowserBody;
22
+ };
23
+ //#endregion
@@ -0,0 +1,70 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/browser/index.tsx
4
+ /** The three lamps are the system's own fixed pigments — the same
5
+ * semantics reserved for danger, warning, and success. */
6
+ function BrowserDots(props) {
7
+ injectComponentStyle("browser");
8
+ return /* @__PURE__ */ jsx("div", {
9
+ ...props,
10
+ "data-scope": "browser",
11
+ "data-part": "dots",
12
+ children: [
13
+ "danger",
14
+ "warning",
15
+ "success"
16
+ ].map((tone) => /* @__PURE__ */ jsx("span", {
17
+ "data-scope": "browser",
18
+ "data-part": "dot",
19
+ "data-tone": tone
20
+ }, tone))
21
+ });
22
+ }
23
+ function BrowserRoot(props) {
24
+ injectComponentStyle("browser");
25
+ return /* @__PURE__ */ jsx("div", {
26
+ ...props,
27
+ "data-scope": "browser",
28
+ "data-part": "root",
29
+ children: props.children
30
+ });
31
+ }
32
+ function BrowserTitleBar(props) {
33
+ injectComponentStyle("browser");
34
+ return /* @__PURE__ */ jsx("div", {
35
+ ...props,
36
+ "data-scope": "browser",
37
+ "data-part": "titlebar",
38
+ children: props.children
39
+ });
40
+ }
41
+ function BrowserUrlBar(props) {
42
+ injectComponentStyle("browser");
43
+ return /* @__PURE__ */ jsx("div", {
44
+ ...props,
45
+ "data-scope": "browser",
46
+ "data-part": "urlbar",
47
+ children: props.children
48
+ });
49
+ }
50
+ function BrowserBody(props) {
51
+ injectComponentStyle("browser");
52
+ return /* @__PURE__ */ jsx("div", {
53
+ ...props,
54
+ "data-scope": "browser",
55
+ "data-part": "body",
56
+ children: props.children
57
+ });
58
+ }
59
+ /** A browser window as a vessel: title bar, the three lamps, the
60
+ * address well, and a body that carries whatever the site hangs in
61
+ * it — an iframe, a screenshot, a live page. */
62
+ const Browser = Object.assign(BrowserRoot, {
63
+ Root: BrowserRoot,
64
+ TitleBar: BrowserTitleBar,
65
+ Dots: BrowserDots,
66
+ UrlBar: BrowserUrlBar,
67
+ Body: BrowserBody
68
+ });
69
+ //#endregion
70
+ export { Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar };
@@ -0,0 +1,19 @@
1
+ import { ButtonHTMLAttributes, ReactNode } from "react";
2
+ //#region src/components/button/index.d.ts
3
+ /** The control recipe as a standalone button: the variant chooses how it
4
+ * rests, the tone chooses the pigment. Ink is the solemn default; any
5
+ * action can carry the primary weight. */
6
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
7
+ variant?: "solid" | "outline" | "ghost" | "subtle";
8
+ tone?: "ink" | "info" | "success" | "warning" | "danger";
9
+ size?: "sm" | "md" | "lg";
10
+ /** Icon-only: the silhouette squares to the control height. */
11
+ square?: boolean;
12
+ /** Render the child element as the button — the recipe rides on it
13
+ * (a router Link, say) instead of wrapping it in a nested <button>. */
14
+ asChild?: boolean;
15
+ disabled?: boolean;
16
+ children?: ReactNode;
17
+ }
18
+ export declare function Button({ variant, tone, size, square, asChild, disabled, type, children, ...rest }: ButtonProps): import("react").JSX.Element | null;
19
+ //#endregion
@@ -0,0 +1,29 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Children, cloneElement, isValidElement } from "react";
4
+ //#region src/components/button/index.tsx
5
+ function Button({ variant = "solid", tone = "ink", size = "md", square = false, asChild = false, disabled = false, type = "button", children, ...rest }) {
6
+ injectComponentStyle("button");
7
+ const partProps = {
8
+ ...rest,
9
+ "data-scope": "button",
10
+ "data-part": "root",
11
+ "data-variant": variant,
12
+ "data-tone": tone,
13
+ "data-size": size,
14
+ "data-square": square ? "true" : void 0,
15
+ "data-motion": "ink-ripple lit"
16
+ };
17
+ if (asChild) {
18
+ const child = Children.only(children);
19
+ return isValidElement(child) ? cloneElement(child, partProps) : null;
20
+ }
21
+ return /* @__PURE__ */ jsx("button", {
22
+ type,
23
+ disabled,
24
+ ...partProps,
25
+ children
26
+ });
27
+ }
28
+ //#endregion
29
+ export { Button };
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ //#region src/components/button-group/index.d.ts
3
+ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** The seam runs across the group (default) or down it. */
5
+ orientation?: "horizontal" | "vertical";
6
+ /** One register for every member: falls onto data-size for the
7
+ * stylesheet to retune the buttons' heights. */
8
+ size?: "sm" | "md" | "lg";
9
+ /** The members' corner register: retunes --bs-radius-control for the
10
+ * whole fused shape — edges and trimmed seams keep one story. */
11
+ radius?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
12
+ children?: ReactNode;
13
+ }
14
+ /**
15
+ * Buttons fused into one control: the group owns only the joinery, so
16
+ * members keep every variant they were given — a solid action can sit
17
+ * beside an outline one and the seam still reads. Selection belongs to
18
+ * the toggle group; this is layout alone.
19
+ */
20
+ declare function Root({ orientation, size, radius, children, ...rest }: ButtonGroupProps): import("react").JSX.Element;
21
+ export declare const ButtonGroup: typeof Root & {
22
+ Root: typeof Root;
23
+ };
24
+ //#endregion
@@ -0,0 +1,25 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/button-group/index.tsx
4
+ /**
5
+ * Buttons fused into one control: the group owns only the joinery, so
6
+ * members keep every variant they were given — a solid action can sit
7
+ * beside an outline one and the seam still reads. Selection belongs to
8
+ * the toggle group; this is layout alone.
9
+ */
10
+ function Root({ orientation = "horizontal", size, radius, children, ...rest }) {
11
+ return /* @__PURE__ */ jsx("div", {
12
+ ...rest,
13
+ role: "group",
14
+ "data-scope": "button-group",
15
+ "data-part": "root",
16
+ "data-orientation": orientation,
17
+ "data-size": size,
18
+ "data-radius": radius,
19
+ children
20
+ });
21
+ }
22
+ const ButtonGroup = Object.assign(Root, { Root });
23
+ injectComponentStyle("button-group");
24
+ //#endregion
25
+ export { ButtonGroup };
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { DatePickerRootProps } from "@ark-ui/react/date-picker";
3
+ //#region src/components/calendar/index.d.ts
4
+ export interface CalendarProps extends HTMLAttributes<HTMLDivElement> {
5
+ /** Selected date(s) — an array, as the machine speaks in ranges. */
6
+ value?: DatePickerRootProps["value"];
7
+ min?: DatePickerRootProps["min"];
8
+ max?: DatePickerRootProps["max"];
9
+ onValueChange?: (value: NonNullable<DatePickerRootProps["value"]>) => void;
10
+ }
11
+ /** The date-picker's month grid, standing on the page without its
12
+ * popup: always open, the trigger gone, the vessel a quiet card. The
13
+ * title zooms out through month and year grids; the grids themselves
14
+ * are the shared machinery — value, range selection, and focus ride
15
+ * Ark's own contract. */
16
+ export declare function Calendar({ value, min, max, onValueChange, children, ...rest }: CalendarProps): import("react").JSX.Element;
17
+ //#endregion