@bysages/solid 0.2.2 → 0.2.3

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 (263) hide show
  1. package/dist/ai-response-B_586r27.mjs +139 -0
  2. package/dist/chevron-GWEoEYdO.mjs +9 -0
  3. package/dist/components/accordion/index.d.mts +7 -0
  4. package/dist/components/accordion/index.mjs +10 -0
  5. package/dist/components/affix/index.d.mts +20 -0
  6. package/dist/components/affix/index.mjs +35 -0
  7. package/dist/components/ai/index.d.mts +2 -0
  8. package/dist/components/ai/index.mjs +69 -0
  9. package/dist/components/ai-action/index.d.mts +13 -0
  10. package/dist/components/ai-action/index.mjs +27 -0
  11. package/dist/components/ai-attachments/index.d.mts +20 -0
  12. package/dist/components/ai-attachments/index.mjs +98 -0
  13. package/dist/components/ai-message/index.d.mts +13 -0
  14. package/dist/components/ai-message/index.mjs +24 -0
  15. package/dist/components/ai-prompt-input/index.d.mts +45 -0
  16. package/dist/components/ai-prompt-input/index.mjs +136 -0
  17. package/dist/components/ai-reasoning/index.d.mts +13 -0
  18. package/dist/components/ai-reasoning/index.mjs +34 -0
  19. package/dist/components/ai-response/index.d.mts +20 -0
  20. package/dist/components/ai-response/index.mjs +2 -0
  21. package/dist/components/ai-source/index.d.mts +13 -0
  22. package/dist/components/ai-source/index.mjs +36 -0
  23. package/dist/components/ai-suggestion/index.d.mts +13 -0
  24. package/dist/components/ai-suggestion/index.mjs +22 -0
  25. package/dist/components/ai-tool/index.d.mts +23 -0
  26. package/dist/components/ai-tool/index.mjs +78 -0
  27. package/dist/components/alert/index.d.mts +22 -0
  28. package/dist/components/alert/index.mjs +92 -0
  29. package/dist/components/angle-slider/index.d.mts +15 -0
  30. package/dist/components/angle-slider/index.mjs +18 -0
  31. package/dist/components/aspect-ratio/index.d.mts +10 -0
  32. package/dist/components/aspect-ratio/index.mjs +25 -0
  33. package/dist/components/autocomplete/index.d.mts +21 -0
  34. package/dist/components/autocomplete/index.mjs +75 -0
  35. package/dist/components/avatar/index.d.mts +20 -0
  36. package/dist/components/avatar/index.mjs +15 -0
  37. package/dist/components/avatar-group/index.d.mts +11 -0
  38. package/dist/components/avatar-group/index.mjs +22 -0
  39. package/dist/components/back-top/index.d.mts +29 -0
  40. package/dist/components/back-top/index.mjs +89 -0
  41. package/dist/components/badge/index.d.mts +10 -0
  42. package/dist/components/badge/index.mjs +25 -0
  43. package/dist/components/banner/index.d.mts +24 -0
  44. package/dist/components/banner/index.mjs +71 -0
  45. package/dist/components/breadcrumb/index.d.mts +11 -0
  46. package/dist/components/breadcrumb/index.mjs +43 -0
  47. package/dist/components/button/index.d.mts +15 -0
  48. package/dist/components/button/index.mjs +45 -0
  49. package/dist/components/button-group/index.d.mts +23 -0
  50. package/dist/components/button-group/index.mjs +40 -0
  51. package/dist/components/calendar/index.d.mts +17 -0
  52. package/dist/components/calendar/index.mjs +197 -0
  53. package/dist/components/card/index.d.mts +11 -0
  54. package/dist/components/card/index.mjs +33 -0
  55. package/dist/components/carousel/index.d.mts +9 -0
  56. package/dist/components/carousel/index.mjs +12 -0
  57. package/dist/components/cascade-select/index.d.mts +31 -0
  58. package/dist/components/cascade-select/index.mjs +265 -0
  59. package/dist/components/checkbox/index.d.mts +15 -0
  60. package/dist/components/checkbox/index.mjs +18 -0
  61. package/dist/components/checkbox-group/index.d.mts +28 -0
  62. package/dist/components/checkbox-group/index.mjs +99 -0
  63. package/dist/components/chip/index.d.mts +12 -0
  64. package/dist/components/chip/index.mjs +34 -0
  65. package/dist/components/client-only/index.d.mts +2 -0
  66. package/dist/components/client-only/index.mjs +2 -0
  67. package/dist/components/clipboard/index.d.mts +16 -0
  68. package/dist/components/clipboard/index.mjs +19 -0
  69. package/dist/components/collapsible/index.d.mts +7 -0
  70. package/dist/components/collapsible/index.mjs +10 -0
  71. package/dist/components/collection/index.d.mts +2 -0
  72. package/dist/components/collection/index.mjs +2 -0
  73. package/dist/components/color-picker/index.d.mts +19 -0
  74. package/dist/components/color-picker/index.mjs +18 -0
  75. package/dist/components/combobox/index.d.mts +17 -0
  76. package/dist/components/combobox/index.mjs +18 -0
  77. package/dist/components/command/index.d.mts +43 -0
  78. package/dist/components/command/index.mjs +237 -0
  79. package/dist/components/comment/index.d.mts +17 -0
  80. package/dist/components/comment/index.mjs +86 -0
  81. package/dist/components/config-provider/index.d.mts +48 -0
  82. package/dist/components/config-provider/index.mjs +65 -0
  83. package/dist/components/container/index.d.mts +13 -0
  84. package/dist/components/container/index.mjs +25 -0
  85. package/dist/components/date-input/index.d.mts +15 -0
  86. package/dist/components/date-input/index.mjs +18 -0
  87. package/dist/components/date-picker/index.d.mts +17 -0
  88. package/dist/components/date-picker/index.mjs +18 -0
  89. package/dist/components/descriptions/index.d.mts +18 -0
  90. package/dist/components/descriptions/index.mjs +42 -0
  91. package/dist/components/dialog/index.d.mts +9 -0
  92. package/dist/components/dialog/index.mjs +11 -0
  93. package/dist/components/download-trigger/index.d.mts +2 -0
  94. package/dist/components/download-trigger/index.mjs +2 -0
  95. package/dist/components/drawer/index.d.mts +9 -0
  96. package/dist/components/drawer/index.mjs +12 -0
  97. package/dist/components/dynamic-input/index.d.mts +30 -0
  98. package/dist/components/dynamic-input/index.mjs +116 -0
  99. package/dist/components/editable/index.d.mts +15 -0
  100. package/dist/components/editable/index.mjs +18 -0
  101. package/dist/components/ellipsis/index.d.mts +10 -0
  102. package/dist/components/ellipsis/index.mjs +29 -0
  103. package/dist/components/empty/index.d.mts +10 -0
  104. package/dist/components/empty/index.mjs +31 -0
  105. package/dist/components/field/index.d.mts +8 -0
  106. package/dist/components/field/index.mjs +11 -0
  107. package/dist/components/fieldset/index.d.mts +7 -0
  108. package/dist/components/fieldset/index.mjs +10 -0
  109. package/dist/components/file-upload/index.d.mts +17 -0
  110. package/dist/components/file-upload/index.mjs +18 -0
  111. package/dist/components/float-button/index.d.mts +61 -0
  112. package/dist/components/float-button/index.mjs +128 -0
  113. package/dist/components/floating-panel/index.d.mts +9 -0
  114. package/dist/components/floating-panel/index.mjs +12 -0
  115. package/dist/components/focus-trap/index.d.mts +2 -0
  116. package/dist/components/focus-trap/index.mjs +2 -0
  117. package/dist/components/form/index.d.mts +2 -0
  118. package/dist/components/form/index.mjs +110 -0
  119. package/dist/components/format/index.d.mts +9 -0
  120. package/dist/components/format/index.mjs +10 -0
  121. package/dist/components/frame/index.d.mts +10 -0
  122. package/dist/components/frame/index.mjs +12 -0
  123. package/dist/components/grid/index.d.mts +13 -0
  124. package/dist/components/grid/index.mjs +44 -0
  125. package/dist/components/highlight/index.d.mts +7 -0
  126. package/dist/components/highlight/index.mjs +11 -0
  127. package/dist/components/hover-card/index.d.mts +7 -0
  128. package/dist/components/hover-card/index.mjs +10 -0
  129. package/dist/components/icon/index.d.mts +19 -0
  130. package/dist/components/icon/index.mjs +53 -0
  131. package/dist/components/image/index.d.mts +17 -0
  132. package/dist/components/image/index.mjs +69 -0
  133. package/dist/components/image-cropper/index.d.mts +8 -0
  134. package/dist/components/image-cropper/index.mjs +11 -0
  135. package/dist/components/image-viewer/index.d.mts +19 -0
  136. package/dist/components/image-viewer/index.mjs +143 -0
  137. package/dist/components/input/index.d.mts +16 -0
  138. package/dist/components/input/index.mjs +42 -0
  139. package/dist/components/input-group/index.d.mts +18 -0
  140. package/dist/components/input-group/index.mjs +40 -0
  141. package/dist/components/json-tree-view/index.d.mts +7 -0
  142. package/dist/components/json-tree-view/index.mjs +10 -0
  143. package/dist/components/kbd/index.d.mts +6 -0
  144. package/dist/components/kbd/index.mjs +17 -0
  145. package/dist/components/layout/index.d.mts +60 -0
  146. package/dist/components/layout/index.mjs +192 -0
  147. package/dist/components/link/index.d.mts +10 -0
  148. package/dist/components/link/index.mjs +25 -0
  149. package/dist/components/list/index.d.mts +26 -0
  150. package/dist/components/list/index.mjs +92 -0
  151. package/dist/components/listbox/index.d.mts +17 -0
  152. package/dist/components/listbox/index.mjs +19 -0
  153. package/dist/components/marquee/index.d.mts +7 -0
  154. package/dist/components/marquee/index.mjs +10 -0
  155. package/dist/components/masonry/index.d.mts +11 -0
  156. package/dist/components/masonry/index.mjs +36 -0
  157. package/dist/components/mentions/index.d.mts +2 -0
  158. package/dist/components/mentions/index.mjs +3 -0
  159. package/dist/components/menu/index.d.mts +13 -0
  160. package/dist/components/menu/index.mjs +38 -0
  161. package/dist/components/menubar/index.d.mts +32 -0
  162. package/dist/components/menubar/index.mjs +82 -0
  163. package/dist/components/meter/index.d.mts +21 -0
  164. package/dist/components/meter/index.mjs +95 -0
  165. package/dist/components/navigation-menu/index.d.mts +8 -0
  166. package/dist/components/navigation-menu/index.mjs +11 -0
  167. package/dist/components/number-input/index.d.mts +15 -0
  168. package/dist/components/number-input/index.mjs +18 -0
  169. package/dist/components/page-header/index.d.mts +11 -0
  170. package/dist/components/page-header/index.mjs +34 -0
  171. package/dist/components/pagination/index.d.mts +17 -0
  172. package/dist/components/pagination/index.mjs +18 -0
  173. package/dist/components/password-input/index.d.mts +15 -0
  174. package/dist/components/password-input/index.mjs +18 -0
  175. package/dist/components/pin-input/index.d.mts +14 -0
  176. package/dist/components/pin-input/index.mjs +18 -0
  177. package/dist/components/popconfirm/index.d.mts +17 -0
  178. package/dist/components/popconfirm/index.mjs +78 -0
  179. package/dist/components/popover/index.d.mts +8 -0
  180. package/dist/components/popover/index.mjs +11 -0
  181. package/dist/components/presence/index.d.mts +2 -0
  182. package/dist/components/presence/index.mjs +2 -0
  183. package/dist/components/progress/index.d.mts +15 -0
  184. package/dist/components/progress/index.mjs +18 -0
  185. package/dist/components/progress-group/index.d.mts +22 -0
  186. package/dist/components/progress-group/index.mjs +77 -0
  187. package/dist/components/qr-code/index.d.mts +8 -0
  188. package/dist/components/qr-code/index.mjs +11 -0
  189. package/dist/components/radio-group/index.d.mts +15 -0
  190. package/dist/components/radio-group/index.mjs +18 -0
  191. package/dist/components/rating-group/index.d.mts +15 -0
  192. package/dist/components/rating-group/index.mjs +18 -0
  193. package/dist/components/scroll-area/index.d.mts +7 -0
  194. package/dist/components/scroll-area/index.mjs +10 -0
  195. package/dist/components/segment-group/index.d.mts +17 -0
  196. package/dist/components/segment-group/index.mjs +23 -0
  197. package/dist/components/select/index.d.mts +17 -0
  198. package/dist/components/select/index.mjs +18 -0
  199. package/dist/components/separator/index.d.mts +11 -0
  200. package/dist/components/separator/index.mjs +29 -0
  201. package/dist/components/signature-pad/index.d.mts +8 -0
  202. package/dist/components/signature-pad/index.mjs +11 -0
  203. package/dist/components/skeleton/index.d.mts +7 -0
  204. package/dist/components/skeleton/index.mjs +17 -0
  205. package/dist/components/slider/index.d.mts +15 -0
  206. package/dist/components/slider/index.mjs +18 -0
  207. package/dist/components/spinner/index.d.mts +9 -0
  208. package/dist/components/spinner/index.mjs +28 -0
  209. package/dist/components/split-button/index.d.mts +36 -0
  210. package/dist/components/split-button/index.mjs +123 -0
  211. package/dist/components/splitter/index.d.mts +7 -0
  212. package/dist/components/splitter/index.mjs +10 -0
  213. package/dist/components/stack/index.d.mts +11 -0
  214. package/dist/components/stack/index.mjs +47 -0
  215. package/dist/components/stat/index.d.mts +17 -0
  216. package/dist/components/stat/index.mjs +46 -0
  217. package/dist/components/steps/index.d.mts +18 -0
  218. package/dist/components/steps/index.mjs +18 -0
  219. package/dist/components/swap/index.d.mts +8 -0
  220. package/dist/components/swap/index.mjs +11 -0
  221. package/dist/components/switch/index.d.mts +15 -0
  222. package/dist/components/switch/index.mjs +18 -0
  223. package/dist/components/table/index.d.mts +77 -0
  224. package/dist/components/table/index.mjs +740 -0
  225. package/dist/components/tabs/index.d.mts +17 -0
  226. package/dist/components/tabs/index.mjs +18 -0
  227. package/dist/components/tags-input/index.d.mts +16 -0
  228. package/dist/components/tags-input/index.mjs +18 -0
  229. package/dist/components/textarea/index.d.mts +14 -0
  230. package/dist/components/textarea/index.mjs +37 -0
  231. package/dist/components/timeline/index.d.mts +9 -0
  232. package/dist/components/timeline/index.mjs +29 -0
  233. package/dist/components/timer/index.d.mts +8 -0
  234. package/dist/components/timer/index.mjs +11 -0
  235. package/dist/components/toast/index.d.mts +11 -0
  236. package/dist/components/toast/index.mjs +13 -0
  237. package/dist/components/toc/index.d.mts +7 -0
  238. package/dist/components/toc/index.mjs +10 -0
  239. package/dist/components/toggle/index.d.mts +7 -0
  240. package/dist/components/toggle/index.mjs +10 -0
  241. package/dist/components/toggle-group/index.d.mts +14 -0
  242. package/dist/components/toggle-group/index.mjs +18 -0
  243. package/dist/components/tooltip/index.d.mts +7 -0
  244. package/dist/components/tooltip/index.mjs +10 -0
  245. package/dist/components/tour/index.d.mts +11 -0
  246. package/dist/components/tour/index.mjs +13 -0
  247. package/dist/components/transfer/index.d.mts +24 -0
  248. package/dist/components/transfer/index.mjs +166 -0
  249. package/dist/components/tree-select/index.d.mts +28 -0
  250. package/dist/components/tree-select/index.mjs +245 -0
  251. package/dist/components/tree-view/index.d.mts +18 -0
  252. package/dist/components/tree-view/index.mjs +19 -0
  253. package/dist/components/typography/index.d.mts +11 -0
  254. package/dist/components/typography/index.mjs +34 -0
  255. package/dist/components/watermark/index.d.mts +17 -0
  256. package/dist/components/watermark/index.mjs +71 -0
  257. package/dist/index-B1xiJ5ki.d.mts +1811 -0
  258. package/dist/index-B4XS2n2y.d.mts +13411 -0
  259. package/dist/index-DDX7x8aT.d.mts +95 -0
  260. package/dist/index.d.mts +128 -15209
  261. package/dist/index.mjs +128 -6171
  262. package/dist/mentions-xbI6vJAP.mjs +257 -0
  263. package/package.json +77 -4
@@ -0,0 +1,75 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { Portal, createComponent, mergeProps } from "solid-js/web";
3
+ import { For, splitProps } from "solid-js";
4
+ import { useListCollection } from "@ark-ui/solid/collection";
5
+ import { Combobox } from "@ark-ui/solid/combobox";
6
+ //#region src/components/autocomplete/index.tsx
7
+ /**
8
+ * Free text with suggestions: the reader types anything, the list
9
+ * narrows to help, and both a pick and a custom value end up in the
10
+ * same `value`. A preset of the combobox machinery — same parts,
11
+ * same styling, one job. `items` seeds the suggestion list once;
12
+ * matching is a case-insensitive substring unless `filter` says
13
+ * otherwise.
14
+ */
15
+ function AutoComplete(props) {
16
+ injectComponentStyle("combobox");
17
+ const [own, rest] = splitProps(props, [
18
+ "value",
19
+ "items",
20
+ "placeholder",
21
+ "size",
22
+ "filter",
23
+ "onValueChange"
24
+ ]);
25
+ const { collection, filter } = useListCollection({
26
+ initialItems: own.items ?? [],
27
+ filter: (item, input) => own.filter ? own.filter(item, input) : item.toLowerCase().includes(input.toLowerCase())
28
+ });
29
+ return createComponent(Combobox.Root, mergeProps(rest, {
30
+ get collection() {
31
+ return collection();
32
+ },
33
+ get inputValue() {
34
+ return own.value;
35
+ },
36
+ get ["data-size"]() {
37
+ return own.size ?? "md";
38
+ },
39
+ allowCustomValue: true,
40
+ onValueChange: (details) => {
41
+ const [first] = details.value;
42
+ if (first != null) own.onValueChange?.(first);
43
+ },
44
+ onInputValueChange: (details) => {
45
+ filter(details.inputValue);
46
+ own.onValueChange?.(details.inputValue);
47
+ },
48
+ positioning: { sameWidth: true },
49
+ get children() {
50
+ return [createComponent(Combobox.Control, { get children() {
51
+ return createComponent(Combobox.Input, { get placeholder() {
52
+ return own.placeholder;
53
+ } });
54
+ } }), createComponent(Portal, { get children() {
55
+ return createComponent(Combobox.Positioner, { get children() {
56
+ return createComponent(Combobox.Content, { get children() {
57
+ return [createComponent(Combobox.Empty, { children: "No matches" }), createComponent(For, {
58
+ get each() {
59
+ return collection().items;
60
+ },
61
+ children: (item) => createComponent(Combobox.Item, {
62
+ item,
63
+ get children() {
64
+ return createComponent(Combobox.ItemText, { children: item });
65
+ }
66
+ })
67
+ })];
68
+ } });
69
+ } });
70
+ } })];
71
+ }
72
+ }));
73
+ }
74
+ //#endregion
75
+ export { AutoComplete };
@@ -0,0 +1,20 @@
1
+ import { ComponentProps } from "solid-js";
2
+ import { Avatar as Avatar$1 } from "@ark-ui/solid/avatar";
3
+ //#region src/components/avatar/index.d.ts
4
+ /** Avatar, dressed in the paper-and-ink system: a circular seal on
5
+ * inset paper that holds initials until the image loads over them.
6
+ * `size` picks a control-height rung for the seal — the core styles
7
+ * re-point `--bs-avatar-size` per rung, and scenes can still retune the
8
+ * variable directly. */
9
+ export type AvatarSize = "sm" | "md" | "lg";
10
+ export interface AvatarProps extends ComponentProps<typeof Avatar$1.Root> {
11
+ /** Seal diameter: the small, medium, or large control rung. The
12
+ * default (large) stands as tall as the biggest control so an avatar
13
+ * rides a row without stretching it. */
14
+ size?: AvatarSize;
15
+ }
16
+ declare function AvatarRoot(props: AvatarProps): import("solid-js").JSX.Element;
17
+ export declare const Avatar: typeof Avatar$1 & {
18
+ Root: typeof AvatarRoot;
19
+ };
20
+ //#endregion
@@ -0,0 +1,15 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ import { Avatar as Avatar$1 } from "@ark-ui/solid/avatar";
5
+ //#region src/components/avatar/index.tsx
6
+ function AvatarRoot(props) {
7
+ const [own, rest] = splitProps(props, ["size"]);
8
+ return createComponent(Avatar$1.Root, mergeProps(rest, { get ["data-size"]() {
9
+ return own.size;
10
+ } }));
11
+ }
12
+ const Avatar = Object.assign({}, Avatar$1, { Root: AvatarRoot });
13
+ injectComponentStyle("avatar");
14
+ //#endregion
15
+ export { Avatar };
@@ -0,0 +1,11 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/avatar-group/index.d.ts
3
+ /** Avatars overlapping one row, each rimmed in the ground so the pile
4
+ * stays legible. */
5
+ export interface AvatarGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
6
+ /** One register for every seal: falls onto data-size for the
7
+ * stylesheet to re-point the avatars' measure. */
8
+ size?: "sm" | "md" | "lg";
9
+ }
10
+ export declare function AvatarGroup(props: AvatarGroupProps): JSX.Element;
11
+ //#endregion
@@ -0,0 +1,22 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/avatar-group/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<div>`);
6
+ function AvatarGroup(props) {
7
+ injectComponentStyle("avatar-group");
8
+ const [own, rest] = splitProps(props, ["size"]);
9
+ return (() => {
10
+ var _el$ = _tmpl$();
11
+ spread(_el$, mergeProps(rest, {
12
+ "data-scope": "avatar-group",
13
+ "data-part": "root",
14
+ get ["data-size"]() {
15
+ return own.size;
16
+ }
17
+ }), false, false);
18
+ return _el$;
19
+ })();
20
+ }
21
+ //#endregion
22
+ export { AvatarGroup };
@@ -0,0 +1,29 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/back-top/index.d.ts
3
+ export interface BackTopProps extends JSX.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(props: BackTopProps): JSX.Element;
29
+ //#endregion
@@ -0,0 +1,89 @@
1
+ import { Button } from "../button/index.mjs";
2
+ import { injectComponentStyle } from "@bysages/core";
3
+ import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
4
+ import { createSignal, onCleanup, onMount, splitProps } from "solid-js";
5
+ //#region src/components/back-top/index.tsx
6
+ var _tmpl$ = /*#__PURE__*/ template(`<div data-scope=back-top data-part=root>`);
7
+ var _tmpl$2 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.75 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path d="m6 14 6-6 6 6">`);
8
+ /**
9
+ * A way home: after the page has scrolled past `threshold`, a small
10
+ * floating control rises at the page's corner and returns the reader to
11
+ * the top. The scroll itself stays native — `window.scrollTo` defers to
12
+ * the stylesheet's `scroll-behavior: smooth`, which reduced motion turns
13
+ * back into an instant jump (a moored control asks the media query
14
+ * directly, since a scroller of its own has no stylesheet to defer to).
15
+ * The button stays mounted either way so the entrance is a transition,
16
+ * never a pop.
17
+ *
18
+ * The control itself is the shared `Button` (outline, square) — the
19
+ * paper, hairline and halo are its; this family owns only the floating
20
+ * and the entrance.
21
+ */
22
+ function BackTop(props) {
23
+ injectComponentStyle("back-top");
24
+ const [own, rest] = splitProps(props, [
25
+ "threshold",
26
+ "label",
27
+ "scrollEl"
28
+ ]);
29
+ const [visible, setVisible] = createSignal(false);
30
+ const scroller = () => own.scrollEl?.() ?? null;
31
+ const onScroll = () => {
32
+ const el = scroller();
33
+ setVisible((el ? el.scrollTop : window.scrollY) > (own.threshold ?? 400));
34
+ };
35
+ const toTop = () => {
36
+ const el = scroller();
37
+ if (!el) {
38
+ window.scrollTo({ top: 0 });
39
+ return;
40
+ }
41
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
42
+ el.scrollTo({
43
+ top: 0,
44
+ behavior: reduce ? "auto" : "smooth"
45
+ });
46
+ };
47
+ onMount(() => {
48
+ const el = scroller();
49
+ onScroll();
50
+ if (el) el.addEventListener("scroll", onScroll, { passive: true });
51
+ else window.addEventListener("scroll", onScroll, { passive: true });
52
+ });
53
+ onCleanup(() => {
54
+ const el = scroller();
55
+ if (el) el.removeEventListener("scroll", onScroll);
56
+ else window.removeEventListener("scroll", onScroll);
57
+ });
58
+ return (() => {
59
+ var _el$ = _tmpl$();
60
+ spread(_el$, mergeProps({ get ["data-state"]() {
61
+ return visible() ? "shown" : "hidden";
62
+ } }, () => scroller() ? { "data-container": "" } : {}), false, true);
63
+ insert(_el$, createComponent(Button, mergeProps(rest, {
64
+ variant: "outline",
65
+ square: true,
66
+ size: "lg",
67
+ get ["aria-label"]() {
68
+ return own.label ?? "Back to top";
69
+ },
70
+ get ["aria-hidden"]() {
71
+ return visible() ? void 0 : "true";
72
+ },
73
+ get tabindex() {
74
+ return visible() ? 0 : -1;
75
+ },
76
+ onClick: toTop,
77
+ get children() {
78
+ return rest.children ?? chevronUp();
79
+ }
80
+ })));
81
+ return _el$;
82
+ })();
83
+ }
84
+ /** The single glyph a way-home control needs: one stroke pointing up. */
85
+ function chevronUp() {
86
+ return _tmpl$2();
87
+ }
88
+ //#endregion
89
+ export { BackTop };
@@ -0,0 +1,10 @@
1
+ import { JSX } from "solid-js";
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 JSX.HTMLAttributes<HTMLSpanElement> {
6
+ tone?: "ink" | "info" | "success" | "warning" | "danger";
7
+ variant?: "solid" | "subtle" | "outline";
8
+ }
9
+ export declare function Badge(props: BadgeProps): JSX.Element;
10
+ //#endregion
@@ -0,0 +1,25 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/badge/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<span>`);
6
+ function Badge(props) {
7
+ injectComponentStyle("badge");
8
+ const [own, rest] = splitProps(props, ["tone", "variant"]);
9
+ return (() => {
10
+ var _el$ = _tmpl$();
11
+ spread(_el$, mergeProps(rest, {
12
+ "data-scope": "badge",
13
+ "data-part": "root",
14
+ get ["data-tone"]() {
15
+ return own.tone ?? "ink";
16
+ },
17
+ get ["data-variant"]() {
18
+ return own.variant ?? "solid";
19
+ }
20
+ }), false, false);
21
+ return _el$;
22
+ })();
23
+ }
24
+ //#endregion
25
+ export { Badge };
@@ -0,0 +1,24 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/banner/index.d.ts
3
+ export type BannerStatus = "ink" | "info" | "success" | "warning" | "danger";
4
+ export interface BannerRootProps extends JSX.HTMLAttributes<HTMLDivElement> {
5
+ status?: BannerStatus;
6
+ }
7
+ /** A page-level notice, spoken across the full measure: a wash of the
8
+ * status pigment, one heavier hairline on the leading edge, and room
9
+ * for actions and a quiet close. Ink is the neutral register; the four
10
+ * semantic pigments are fixed. */
11
+ declare function Root(props: BannerRootProps): JSX.Element;
12
+ /** The quiet close: a plain square-cut button; dismissal stays the
13
+ * consumer's state. */
14
+ declare function Close(props: JSX.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
15
+ export declare const Banner: typeof Root & {
16
+ Root: typeof Root;
17
+ Icon: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
18
+ Body: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
19
+ Title: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
20
+ Description: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
21
+ Actions: (props: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Element;
22
+ Close: typeof Close;
23
+ };
24
+ //#endregion
@@ -0,0 +1,71 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/banner/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<div>`);
6
+ var _tmpl$2 = /*#__PURE__*/ template(`<button><svg viewBox="0 0 16 16"fill=none aria-hidden=true><path d="M4 4l8 8M12 4l-8 8"stroke=currentColor stroke-width=1.5 stroke-linecap=round>`);
7
+ /** A page-level notice, spoken across the full measure: a wash of the
8
+ * status pigment, one heavier hairline on the leading edge, and room
9
+ * for actions and a quiet close. Ink is the neutral register; the four
10
+ * semantic pigments are fixed. */
11
+ function Root(props) {
12
+ const [own, rest] = splitProps(props, ["status"]);
13
+ const status = own.status ?? "ink";
14
+ return (() => {
15
+ var _el$ = _tmpl$();
16
+ spread(_el$, mergeProps(rest, {
17
+ "role": status === "ink" ? void 0 : "status",
18
+ "data-scope": "banner",
19
+ "data-part": "root",
20
+ "data-status": status
21
+ }), false, false);
22
+ return _el$;
23
+ })();
24
+ }
25
+ function part(name, tag) {
26
+ function Component(props) {
27
+ return createComponent(tag, mergeProps(props, {
28
+ "data-scope": "banner",
29
+ get ["data-part"]() {
30
+ return name.toLowerCase();
31
+ }
32
+ }));
33
+ }
34
+ return Component;
35
+ }
36
+ const Icon = part("Icon", "span");
37
+ const Body = part("Body", "div");
38
+ const Title = part("Title", "p");
39
+ const Description = part("Description", "p");
40
+ const Actions = part("Actions", "div");
41
+ /** The quiet close: a plain square-cut button; dismissal stays the
42
+ * consumer's state. */
43
+ function Close(props) {
44
+ const [own, rest] = splitProps(props, ["type"]);
45
+ return (() => {
46
+ var _el$2 = _tmpl$2();
47
+ spread(_el$2, mergeProps(rest, {
48
+ get type() {
49
+ return own.type ?? "button";
50
+ },
51
+ get ["aria-label"]() {
52
+ return rest["aria-label"] ?? "Dismiss";
53
+ },
54
+ "data-scope": "banner",
55
+ "data-part": "close"
56
+ }), false, true);
57
+ return _el$2;
58
+ })();
59
+ }
60
+ const Banner = Object.assign(Root, {
61
+ Root,
62
+ Icon,
63
+ Body,
64
+ Title,
65
+ Description,
66
+ Actions,
67
+ Close
68
+ });
69
+ injectComponentStyle("banner");
70
+ //#endregion
71
+ export { Banner };
@@ -0,0 +1,11 @@
1
+ import { Component, JSX } from "solid-js";
2
+ //#region src/components/breadcrumb/index.d.ts
3
+ export declare const Breadcrumb: Component<Record<string, unknown>> & {
4
+ Root: Component<Record<string, unknown>>;
5
+ List: Component<Record<string, unknown>>;
6
+ Item: Component<Record<string, unknown>>;
7
+ Link: Component<Record<string, unknown>>;
8
+ Current: Component<Record<string, unknown>>;
9
+ Separator: Component<JSX.HTMLAttributes<HTMLSpanElement>>;
10
+ };
11
+ //#endregion
@@ -0,0 +1,43 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { createComponent, mergeProps, spread, template } from "solid-js/web";
3
+ import { mergeProps as mergeProps$1 } from "solid-js";
4
+ //#region src/components/breadcrumb/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<span>`);
6
+ /** A trail of waymarks: Root wraps the nav, List the ordered trail, and
7
+ * each Item carries a Link — or the Current page — parted by a quiet
8
+ * Separator. Links take href and the rest through attributes. */
9
+ function part(name, tag, extra = {}) {
10
+ return ((props) => {
11
+ return createComponent(tag, mergeProps(extra, props, {
12
+ "data-scope": "breadcrumb",
13
+ get ["data-part"]() {
14
+ return name.toLowerCase();
15
+ }
16
+ }));
17
+ });
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 = (props) => (() => {
25
+ var _el$ = _tmpl$();
26
+ spread(_el$, mergeProps(() => mergeProps$1({ children: "/" }, props), {
27
+ "aria-hidden": "true",
28
+ "data-scope": "breadcrumb",
29
+ "data-part": "separator"
30
+ }), false, false);
31
+ return _el$;
32
+ })();
33
+ const Breadcrumb = Object.assign(Root, {
34
+ Root,
35
+ List,
36
+ Item,
37
+ Link,
38
+ Current,
39
+ Separator
40
+ });
41
+ injectComponentStyle("breadcrumb");
42
+ //#endregion
43
+ export { Breadcrumb };
@@ -0,0 +1,15 @@
1
+ import { JSX } from "solid-js";
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. The react package's asChild has
6
+ * no solid equivalent — compose a control around `<Button>` instead. */
7
+ export interface ButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ variant?: "solid" | "outline" | "ghost" | "subtle";
9
+ tone?: "ink" | "info" | "success" | "warning" | "danger";
10
+ size?: "sm" | "md" | "lg";
11
+ /** Icon-only: the silhouette squares to the control height. */
12
+ square?: boolean;
13
+ }
14
+ export declare function Button(props: ButtonProps): JSX.Element;
15
+ //#endregion
@@ -0,0 +1,45 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/button/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<button>`);
6
+ function Button(props) {
7
+ injectComponentStyle("button");
8
+ const [own, rest] = splitProps(props, [
9
+ "variant",
10
+ "tone",
11
+ "size",
12
+ "square",
13
+ "type",
14
+ "disabled"
15
+ ]);
16
+ return (() => {
17
+ var _el$ = _tmpl$();
18
+ spread(_el$, mergeProps(rest, {
19
+ get type() {
20
+ return own.type ?? "button";
21
+ },
22
+ get disabled() {
23
+ return own.disabled;
24
+ },
25
+ "data-scope": "button",
26
+ "data-part": "root",
27
+ get ["data-variant"]() {
28
+ return own.variant ?? "solid";
29
+ },
30
+ get ["data-tone"]() {
31
+ return own.tone ?? "ink";
32
+ },
33
+ get ["data-size"]() {
34
+ return own.size ?? "md";
35
+ },
36
+ get ["data-square"]() {
37
+ return own.square ? "true" : void 0;
38
+ },
39
+ "data-motion": "ink-ripple lit"
40
+ }), false, false);
41
+ return _el$;
42
+ })();
43
+ }
44
+ //#endregion
45
+ export { Button };
@@ -0,0 +1,23 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/button-group/index.d.ts
3
+ export interface ButtonGroupProps extends JSX.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
+ }
13
+ /**
14
+ * Buttons fused into one control: the group owns only the joinery, so
15
+ * members keep every variant they were given — a solid action can sit
16
+ * beside an outline one and the seam still reads. Selection belongs to
17
+ * the toggle group; this is layout alone.
18
+ */
19
+ export declare function ButtonGroupRoot(props: ButtonGroupProps): JSX.Element;
20
+ export declare const ButtonGroup: typeof ButtonGroupRoot & {
21
+ Root: typeof ButtonGroupRoot;
22
+ };
23
+ //#endregion
@@ -0,0 +1,40 @@
1
+ import { injectComponentStyle } from "@bysages/core";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/button-group/index.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<div>`);
6
+ /**
7
+ * Buttons fused into one control: the group owns only the joinery, so
8
+ * members keep every variant they were given — a solid action can sit
9
+ * beside an outline one and the seam still reads. Selection belongs to
10
+ * the toggle group; this is layout alone.
11
+ */
12
+ function ButtonGroupRoot(props) {
13
+ injectComponentStyle("button-group");
14
+ const [own, rest] = splitProps(props, [
15
+ "orientation",
16
+ "size",
17
+ "radius"
18
+ ]);
19
+ return (() => {
20
+ var _el$ = _tmpl$();
21
+ spread(_el$, mergeProps(rest, {
22
+ "role": "group",
23
+ "data-scope": "button-group",
24
+ "data-part": "root",
25
+ get ["data-orientation"]() {
26
+ return own.orientation ?? "horizontal";
27
+ },
28
+ get ["data-size"]() {
29
+ return own.size;
30
+ },
31
+ get ["data-radius"]() {
32
+ return own.radius;
33
+ }
34
+ }), false, false);
35
+ return _el$;
36
+ })();
37
+ }
38
+ const ButtonGroup = Object.assign(ButtonGroupRoot, { Root: ButtonGroupRoot });
39
+ //#endregion
40
+ export { ButtonGroup, ButtonGroupRoot };
@@ -0,0 +1,17 @@
1
+ import { JSX } from "solid-js";
2
+ import { DatePickerRootProps } from "@ark-ui/solid/date-picker";
3
+ //#region src/components/calendar/index.d.ts
4
+ export interface CalendarProps extends JSX.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(props: CalendarProps): JSX.Element;
17
+ //#endregion