@bysages/solid 0.4.0 → 0.4.2

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 (194) hide show
  1. package/dist/{ai-response-D2uINBIi.mjs → ai-response-CJ-uEAgj.mjs} +1 -1
  2. package/dist/components/accordion/index.mjs +1 -1
  3. package/dist/components/affix/index.mjs +3 -3
  4. package/dist/components/ai/index.d.mts +1 -1
  5. package/dist/components/ai/index.mjs +2 -2
  6. package/dist/components/ai-action/index.mjs +1 -1
  7. package/dist/components/ai-attachments/index.mjs +1 -1
  8. package/dist/components/ai-message/index.mjs +1 -1
  9. package/dist/components/ai-prompt-input/index.mjs +38 -36
  10. package/dist/components/ai-reasoning/index.mjs +1 -1
  11. package/dist/components/ai-response/index.mjs +1 -1
  12. package/dist/components/ai-source/index.mjs +1 -1
  13. package/dist/components/ai-suggestion/index.mjs +1 -1
  14. package/dist/components/ai-tool/index.mjs +1 -1
  15. package/dist/components/alert/index.mjs +1 -1
  16. package/dist/components/angle-slider/index.d.mts +15 -1
  17. package/dist/components/angle-slider/index.mjs +58 -3
  18. package/dist/components/aspect-ratio/index.mjs +1 -1
  19. package/dist/components/autocomplete/index.mjs +9 -3
  20. package/dist/components/avatar/index.mjs +1 -1
  21. package/dist/components/avatar-group/index.mjs +1 -1
  22. package/dist/components/back-top/index.mjs +1 -1
  23. package/dist/components/badge/index.mjs +1 -1
  24. package/dist/components/banner/index.mjs +1 -1
  25. package/dist/components/bento/index.mjs +1 -1
  26. package/dist/components/block-ui/index.mjs +1 -1
  27. package/dist/components/breadcrumb/index.mjs +1 -1
  28. package/dist/components/browser/index.mjs +1 -1
  29. package/dist/components/button/index.mjs +1 -1
  30. package/dist/components/button-group/index.mjs +1 -1
  31. package/dist/components/calendar/index.d.mts +19 -7
  32. package/dist/components/calendar/index.mjs +213 -139
  33. package/dist/components/card/index.mjs +1 -1
  34. package/dist/components/carousel/index.d.mts +15 -1
  35. package/dist/components/carousel/index.mjs +69 -5
  36. package/dist/components/cascade-select/index.mjs +2 -2
  37. package/dist/components/checkbox/index.d.mts +16 -1
  38. package/dist/components/checkbox/index.mjs +54 -3
  39. package/dist/components/checkbox-group/index.d.mts +10 -3
  40. package/dist/components/checkbox-group/index.mjs +3 -3
  41. package/dist/components/chip/index.d.mts +1 -1
  42. package/dist/components/chip/index.mjs +1 -1
  43. package/dist/components/clipboard/index.d.mts +14 -1
  44. package/dist/components/clipboard/index.mjs +58 -3
  45. package/dist/components/collapsible/index.mjs +1 -1
  46. package/dist/components/color-picker/index.mjs +1 -1
  47. package/dist/components/combobox/index.mjs +1 -1
  48. package/dist/components/command/index.mjs +1 -1
  49. package/dist/components/comment/index.mjs +1 -1
  50. package/dist/components/container/index.mjs +1 -1
  51. package/dist/components/data-view/index.mjs +1 -1
  52. package/dist/components/date-input/index.d.mts +16 -2
  53. package/dist/components/date-input/index.mjs +52 -3
  54. package/dist/components/date-picker/index.d.mts +27 -2
  55. package/dist/components/date-picker/index.mjs +153 -4
  56. package/dist/components/deferred-content/index.mjs +1 -1
  57. package/dist/components/descriptions/index.mjs +1 -1
  58. package/dist/components/dialog/index.mjs +1 -1
  59. package/dist/components/dock/index.mjs +1 -1
  60. package/dist/components/drawer/index.mjs +1 -1
  61. package/dist/components/dynamic-input/index.mjs +2 -2
  62. package/dist/components/editable/index.d.mts +17 -1
  63. package/dist/components/editable/index.mjs +81 -3
  64. package/dist/components/ellipsis/index.mjs +1 -1
  65. package/dist/components/empty/index.mjs +1 -1
  66. package/dist/components/field/index.d.mts +16 -1
  67. package/dist/components/field/index.mjs +53 -5
  68. package/dist/components/fieldset/index.d.mts +15 -3
  69. package/dist/components/fieldset/index.mjs +47 -5
  70. package/dist/components/file-upload/index.d.mts +21 -1
  71. package/dist/components/file-upload/index.mjs +66 -3
  72. package/dist/components/float-button/index.mjs +1 -1
  73. package/dist/components/floating-panel/index.d.mts +15 -3
  74. package/dist/components/floating-panel/index.mjs +113 -5
  75. package/dist/components/form/index.d.mts +44 -2
  76. package/dist/components/form/index.mjs +1 -1
  77. package/dist/components/grid/index.mjs +1 -1
  78. package/dist/components/highlight/index.mjs +1 -1
  79. package/dist/components/hover-card/index.mjs +1 -1
  80. package/dist/components/icon/index.mjs +1 -1
  81. package/dist/components/image/index.mjs +1 -1
  82. package/dist/components/image-cropper/index.d.mts +8 -1
  83. package/dist/components/image-cropper/index.mjs +43 -5
  84. package/dist/components/image-viewer/index.mjs +1 -1
  85. package/dist/components/input/index.mjs +1 -1
  86. package/dist/components/input-group/index.mjs +1 -1
  87. package/dist/components/json-tree-view/index.d.mts +11 -2
  88. package/dist/components/json-tree-view/index.mjs +17 -2
  89. package/dist/components/kbd/index.mjs +1 -1
  90. package/dist/components/layout/index.mjs +1 -1
  91. package/dist/components/link/index.mjs +1 -1
  92. package/dist/components/list/index.mjs +1 -1
  93. package/dist/components/listbox/index.d.mts +21 -1
  94. package/dist/components/listbox/index.mjs +59 -4
  95. package/dist/components/marquee/index.d.mts +12 -1
  96. package/dist/components/marquee/index.mjs +46 -5
  97. package/dist/components/masonry/index.mjs +1 -1
  98. package/dist/components/media-player/index.mjs +1 -1
  99. package/dist/components/mentions/index.mjs +1 -1
  100. package/dist/components/menu/index.mjs +1 -1
  101. package/dist/components/menubar/index.mjs +1 -1
  102. package/dist/components/meter/index.mjs +1 -1
  103. package/dist/components/navigation-menu/index.d.mts +17 -1
  104. package/dist/components/navigation-menu/index.mjs +66 -6
  105. package/dist/components/number-input/index.d.mts +20 -1
  106. package/dist/components/number-input/index.mjs +72 -3
  107. package/dist/components/order-list/index.mjs +1 -1
  108. package/dist/components/page-header/index.mjs +1 -1
  109. package/dist/components/pagination/index.d.mts +22 -2
  110. package/dist/components/pagination/index.mjs +105 -6
  111. package/dist/components/password-input/index.d.mts +18 -1
  112. package/dist/components/password-input/index.mjs +57 -3
  113. package/dist/components/pin-input/index.d.mts +18 -1
  114. package/dist/components/pin-input/index.mjs +55 -3
  115. package/dist/components/popconfirm/index.mjs +1 -1
  116. package/dist/components/popover/index.mjs +1 -1
  117. package/dist/components/progress/index.d.mts +19 -1
  118. package/dist/components/progress/index.mjs +106 -7
  119. package/dist/components/progress-group/index.mjs +1 -1
  120. package/dist/components/qr-code/index.d.mts +8 -1
  121. package/dist/components/qr-code/index.mjs +22 -5
  122. package/dist/components/radio-group/index.d.mts +23 -1
  123. package/dist/components/radio-group/index.mjs +66 -3
  124. package/dist/components/rating-group/index.d.mts +15 -1
  125. package/dist/components/rating-group/index.mjs +52 -3
  126. package/dist/components/result/index.mjs +1 -1
  127. package/dist/components/scroll-area/index.d.mts +11 -3
  128. package/dist/components/scroll-area/index.mjs +37 -5
  129. package/dist/components/segment-group/index.d.mts +27 -4
  130. package/dist/components/segment-group/index.mjs +66 -7
  131. package/dist/components/select/index.mjs +1 -1
  132. package/dist/components/separator/index.mjs +1 -1
  133. package/dist/components/signature-pad/index.d.mts +16 -1
  134. package/dist/components/signature-pad/index.mjs +64 -5
  135. package/dist/components/skeleton/index.mjs +1 -1
  136. package/dist/components/slider/index.d.mts +20 -1
  137. package/dist/components/slider/index.mjs +67 -3
  138. package/dist/components/spinner/index.mjs +1 -1
  139. package/dist/components/split-button/index.mjs +1 -1
  140. package/dist/components/splitter/index.d.mts +15 -1
  141. package/dist/components/splitter/index.mjs +58 -5
  142. package/dist/components/spotlight/index.mjs +1 -1
  143. package/dist/components/stack/index.mjs +1 -1
  144. package/dist/components/stat/index.mjs +1 -1
  145. package/dist/components/steps/index.d.mts +5 -1
  146. package/dist/components/steps/index.mjs +10 -3
  147. package/dist/components/swap/index.d.mts +11 -3
  148. package/dist/components/swap/index.mjs +35 -5
  149. package/dist/components/switch/index.d.mts +16 -1
  150. package/dist/components/switch/index.mjs +48 -3
  151. package/dist/components/table/index.d.mts +2 -0
  152. package/dist/components/table/index.mjs +36 -14
  153. package/dist/components/tabs/index.mjs +1 -1
  154. package/dist/components/tag/index.d.mts +29 -0
  155. package/dist/components/tag/index.mjs +108 -0
  156. package/dist/components/tags-input/index.d.mts +18 -1
  157. package/dist/components/tags-input/index.mjs +83 -3
  158. package/dist/components/terminal/index.mjs +1 -1
  159. package/dist/components/textarea/index.mjs +1 -1
  160. package/dist/components/timeline/index.mjs +1 -1
  161. package/dist/components/timer/index.d.mts +12 -1
  162. package/dist/components/timer/index.mjs +57 -5
  163. package/dist/components/toast/index.d.mts +10 -5
  164. package/dist/components/toast/index.mjs +38 -6
  165. package/dist/components/toc/index.d.mts +2 -11
  166. package/dist/components/toc/index.mjs +1 -1
  167. package/dist/components/toggle/index.d.mts +8 -1
  168. package/dist/components/toggle/index.mjs +27 -5
  169. package/dist/components/toggle-group/index.d.mts +23 -1
  170. package/dist/components/toggle-group/index.mjs +58 -4
  171. package/dist/components/toolbar/index.mjs +1 -1
  172. package/dist/components/tooltip/index.mjs +1 -1
  173. package/dist/components/tour/index.mjs +1 -1
  174. package/dist/components/transfer/index.mjs +2 -2
  175. package/dist/components/tree-select/index.mjs +2 -2
  176. package/dist/components/tree-view/index.d.mts +32 -2
  177. package/dist/components/tree-view/index.mjs +94 -5
  178. package/dist/components/typography/index.mjs +1 -1
  179. package/dist/components/user/index.mjs +1 -1
  180. package/dist/components/virtual-list/index.mjs +1 -1
  181. package/dist/components/watermark/index.mjs +1 -1
  182. package/dist/{image-viewer-B9A5lXsk.mjs → image-viewer-19s75Hz_.mjs} +1 -1
  183. package/dist/index-BU5U5w04.d.mts +35 -0
  184. package/dist/{index-nFXK_8hJ.d.mts → index-DVc1L_zt.d.mts} +138 -89
  185. package/dist/index.d.mts +44 -43
  186. package/dist/index.mjs +9 -8
  187. package/dist/{input-CPAJdwDb.mjs → input-BL3N3L8g.mjs} +1 -1
  188. package/dist/{media-player-BC8D_d29.mjs → media-player-yF7KVUxM.mjs} +2 -2
  189. package/dist/{mentions-CeG5u8Qm.mjs → mentions-DKUG7eHt.mjs} +1 -1
  190. package/dist/{select-7YjMSBGx.mjs → select-DI7pFspF.mjs} +1 -1
  191. package/dist/toc-DRHr8_eD.mjs +88 -0
  192. package/package.json +10 -82
  193. package/dist/index-B1-quIrl.d.mts +0 -1815
  194. package/dist/toc-DYKaKQ_X.mjs +0 -31
@@ -1,8 +1,8 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
3
  import { createComponent, mergeProps } from "@solidjs/web";
5
- import { splitProps } from "solid-js";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
+ import { Show, splitProps } from "solid-js";
6
6
  import { Slider as Slider$1 } from "@ark-ui/solid/slider";
7
7
  //#region src/components/slider/index.tsx
8
8
  function SliderRoot(props) {
@@ -17,7 +17,71 @@ function SliderRoot(props) {
17
17
  }
18
18
  }));
19
19
  }
20
- const Slider = defineFamily(SliderRoot, {
20
+ /** The common single-value slider; ranges and markers stay on the anatomy. */
21
+ function SliderFacade(props) {
22
+ injectComponentStyle("slider");
23
+ return createComponent(SliderRoot, mergeProps({
24
+ get size() {
25
+ return props.size ?? "md";
26
+ },
27
+ get disabled() {
28
+ return props.disabled;
29
+ },
30
+ get invalid() {
31
+ return props.invalid;
32
+ },
33
+ get readOnly() {
34
+ return props.readOnly;
35
+ },
36
+ get min() {
37
+ return props.min ?? 0;
38
+ },
39
+ get max() {
40
+ return props.max ?? 100;
41
+ },
42
+ get step() {
43
+ return props.step ?? 1;
44
+ },
45
+ get orientation() {
46
+ return props.orientation ?? "horizontal";
47
+ },
48
+ get defaultValue() {
49
+ return [props.defaultValue ?? 50];
50
+ }
51
+ }, () => {
52
+ return props.value === void 0 ? {} : { value: [props.value] };
53
+ }, {
54
+ onValueChange: (details) => props.onValueChange?.(details.value.at(0) ?? props.min ?? 0),
55
+ get children() {
56
+ return [
57
+ createComponent(Show, {
58
+ get when() {
59
+ return props.label;
60
+ },
61
+ get children() {
62
+ return createComponent(Slider$1.Label, { get children() {
63
+ return props.label;
64
+ } });
65
+ }
66
+ }),
67
+ createComponent(Slider$1.ValueText, {}),
68
+ createComponent(Slider$1.Control, { get children() {
69
+ return [createComponent(Slider$1.Track, { get children() {
70
+ return createComponent(Slider$1.Range, {});
71
+ } }), createComponent(Slider$1.Thumb, {
72
+ index: 0,
73
+ get children() {
74
+ return createComponent(Slider$1.HiddenInput, { get required() {
75
+ return props.required;
76
+ } });
77
+ }
78
+ })];
79
+ } })
80
+ ];
81
+ }
82
+ }));
83
+ }
84
+ const Slider = defineFamily(SliderFacade, {
21
85
  ...Slider$1,
22
86
  Root: SliderRoot
23
87
  });
@@ -1,7 +1,7 @@
1
1
  import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
2
2
  import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
3
  import { spread, template } from "@solidjs/web";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
5
  import { splitProps } from "solid-js";
6
6
  //#region src/components/spinner/index.tsx
7
7
  var _tmpl$ = /* @__PURE__ */ template(`<span><svg viewBox="0 0 24 24"fill=none aria-hidden=true><circle cx=12 cy=12 r=9 stroke=currentColor stroke-opacity=0.2 stroke-width=2.5></circle><path d="M21 12a9 9 0 0 0-9-9"stroke=currentColor stroke-width=2.5 stroke-linecap=round>`);
@@ -4,8 +4,8 @@ import { t as useElementId } from "../../id-2ygNzPHF.mjs";
4
4
  import { Button } from "../button/index.mjs";
5
5
  import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
6
6
  import { Menu as Menu$1 } from "../menu/index.mjs";
7
- import { injectComponentStyle } from "@bysages/core";
8
7
  import { createComponent, insert, spread, template } from "@solidjs/web";
8
+ import { injectComponentStyle } from "@bysages/core/styling";
9
9
  import { For, splitProps } from "solid-js";
10
10
  import { Portal } from "solid-js/web";
11
11
  import { Menu } from "@ark-ui/solid/menu";
@@ -5,7 +5,21 @@ import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
5
5
  * a hairline and a small paper-seal thumb answers the hand. The API is
6
6
  * Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
7
7
  declare function SplitterRoot(props: ComponentProps<typeof Splitter$1.Root>): import("solid-js").JSX.Element;
8
- export declare const Splitter: typeof SplitterRoot & Omit<typeof Splitter$1, "Root"> & {
8
+ export type SplitterItem = {
9
+ id: string;
10
+ label: string;
11
+ };
12
+ export interface SplitterFacadeProps {
13
+ items: SplitterItem[];
14
+ defaultValue?: number[];
15
+ value?: number[];
16
+ orientation?: "horizontal" | "vertical";
17
+ onValueChange?: (value: number[]) => void;
18
+ }
19
+ /** The complete equal-height splitter; collapsed panels and custom panel
20
+ * bodies stay on the anatomy. */
21
+ declare function SplitterFacade(props: SplitterFacadeProps): import("solid-js").JSX.Element;
22
+ export declare const Splitter: typeof SplitterFacade & Omit<typeof Splitter$1, "Root"> & {
9
23
  Root: typeof SplitterRoot;
10
24
  };
11
25
  //#endregion
@@ -1,19 +1,72 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
- import { createComponent, mergeProps } from "solid-js";
3
+ import { createComponent, mergeProps } from "@solidjs/web";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
+ import { For, Show, createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
5
6
  import { Splitter as Splitter$1 } from "@ark-ui/solid/splitter";
6
- //#region src/components/splitter/index.ts
7
+ //#region src/components/splitter/index.tsx
7
8
  /** Ark's Splitter, dressed in the paper-and-ink system: panels divide on
8
9
  * a hairline and a small paper-seal thumb answers the hand. The API is
9
10
  * Ark's own — Root, Panel, ResizeTrigger, ResizeTriggerIndicator. */
10
11
  function SplitterRoot(props) {
11
12
  const id = useElementId("splitter", () => props.id);
12
- return createComponent(Splitter$1.Root, mergeProps(props, { get id() {
13
+ return createComponent$1(Splitter$1.Root, mergeProps$1(props, { get id() {
13
14
  return id();
14
15
  } }));
15
16
  }
16
- const Splitter = defineFamily(SplitterRoot, {
17
+ /** The complete equal-height splitter; collapsed panels and custom panel
18
+ * bodies stay on the anatomy. */
19
+ function SplitterFacade(props) {
20
+ injectComponentStyle("splitter");
21
+ const panels = () => props.items.map((item) => ({ id: item.id }));
22
+ return createComponent(SplitterRoot, mergeProps({
23
+ get orientation() {
24
+ return props.orientation ?? "horizontal";
25
+ },
26
+ get panels() {
27
+ return panels();
28
+ },
29
+ get defaultSize() {
30
+ return props.defaultValue;
31
+ }
32
+ }, () => {
33
+ return props.value === void 0 ? {} : { size: props.value };
34
+ }, {
35
+ onResize: (size) => props.onValueChange?.(size.size),
36
+ get children() {
37
+ return createComponent(For, {
38
+ get each() {
39
+ return props.items;
40
+ },
41
+ children: (item, index) => {
42
+ const next = () => props.items.at(index() + 1);
43
+ return [createComponent(Splitter$1.Panel, {
44
+ get id() {
45
+ return item.id;
46
+ },
47
+ get children() {
48
+ return item.label;
49
+ }
50
+ }), createComponent(Show, {
51
+ get when() {
52
+ return next();
53
+ },
54
+ children: (nextItem) => createComponent(Splitter$1.ResizeTrigger, {
55
+ get id() {
56
+ return `${item.id}:${nextItem().id}`;
57
+ },
58
+ "aria-label": "Resize panels",
59
+ get children() {
60
+ return createComponent(Splitter$1.ResizeTriggerIndicator, {});
61
+ }
62
+ })
63
+ })];
64
+ }
65
+ });
66
+ }
67
+ }));
68
+ }
69
+ const Splitter = defineFamily(SplitterFacade, {
17
70
  ...Splitter$1,
18
71
  Root: SplitterRoot
19
72
  });
@@ -1,6 +1,6 @@
1
1
  import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
2
  import { insert, spread, template } from "@solidjs/web";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
4
  import { splitProps } from "solid-js";
5
5
  //#region src/components/spotlight/index.tsx
6
6
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
@@ -1,6 +1,6 @@
1
1
  import { n as withSelfRoot } from "../../family-Cmd8HEyK.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
2
  import { spread, template } from "@solidjs/web";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
4
  import { splitProps } from "solid-js";
5
5
  //#region src/components/stack/index.tsx
6
6
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
@@ -1,5 +1,5 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
1
  import { createComponent, mergeProps, spread, template } from "@solidjs/web";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
3
  import { splitProps } from "solid-js";
4
4
  //#region src/components/stat/index.tsx
5
5
  var _tmpl$ = /* @__PURE__ */ template(`<span>`);
@@ -8,11 +8,13 @@ import { Steps as Steps$1, StepsRootProps } from "@ark-ui/solid/steps";
8
8
  * PrevTrigger, NextTrigger, Progress. Indicator and Separator carry
9
9
  * data-complete / data-current / data-incomplete.
10
10
  */
11
- type StepsRootProps$1 = StepsRootProps & StepsOwnProps;
12
11
  type StepsOwnProps = {
13
12
  /** One rung of the control-height ladder every indicator stands on. */
14
13
  size?: "sm" | "md" | "lg";
14
+ /** Default renders numbered seals; dot reduces each step to a bead. */
15
+ variant?: "default" | "dot";
15
16
  };
17
+ type StepsRootProps$1 = StepsRootProps & StepsOwnProps;
16
18
  declare function StepsRoot(props: StepsRootProps$1): import("solid-js").JSX.Element;
17
19
  type StepsItem = {
18
20
  title: string;
@@ -25,6 +27,8 @@ export interface StepsFacadeProps {
25
27
  orientation?: "horizontal" | "vertical";
26
28
  /** One rung of the control-height ladder every indicator stands on. */
27
29
  size?: "sm" | "md" | "lg";
30
+ /** Default renders numbered seals; dot reduces each step to a bead. */
31
+ variant?: "default" | "dot";
28
32
  class?: string;
29
33
  onStepChange?: (step: number) => void;
30
34
  }
@@ -1,12 +1,12 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
3
  import { createComponent, memo, mergeProps } from "@solidjs/web";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
5
  import { For, splitProps } from "solid-js";
6
6
  import { Steps as Steps$1 } from "@ark-ui/solid/steps";
7
7
  //#region src/components/steps/index.tsx
8
8
  function StepsRoot(props) {
9
- const [own, rest] = splitProps(props, ["size"]);
9
+ const [own, rest] = splitProps(props, ["size", "variant"]);
10
10
  const id = useElementId("steps", () => rest.id);
11
11
  return createComponent(Steps$1.Root, mergeProps(rest, {
12
12
  get id() {
@@ -14,11 +14,17 @@ function StepsRoot(props) {
14
14
  },
15
15
  get "data-size"() {
16
16
  return own.size ?? "md";
17
+ },
18
+ get "data-variant"() {
19
+ return memo(() => {
20
+ return own.variant === "dot";
21
+ })() ? own.variant : void 0;
17
22
  }
18
23
  }));
19
24
  }
20
25
  function StepsFacade(props) {
21
26
  injectComponentStyle("steps");
27
+ const variant = props.variant ?? "default";
22
28
  return createComponent(StepsRoot, mergeProps({
23
29
  get "class"() {
24
30
  return props.class;
@@ -26,6 +32,7 @@ function StepsFacade(props) {
26
32
  get size() {
27
33
  return props.size ?? "md";
28
34
  },
35
+ variant,
29
36
  get count() {
30
37
  return props.items.length;
31
38
  },
@@ -56,7 +63,7 @@ function StepsFacade(props) {
56
63
  get children() {
57
64
  return [createComponent(Steps$1.Trigger, { get children() {
58
65
  return [createComponent(Steps$1.Indicator, { get children() {
59
- return String(index() + 1);
66
+ return variant === "dot" ? null : String(index() + 1);
60
67
  } }), memo(() => {
61
68
  return item.title;
62
69
  })];
@@ -1,12 +1,20 @@
1
- import { ComponentProps } from "solid-js";
1
+ import { ComponentProps, JSX } from "solid-js";
2
2
  import { Swap as Swap$1 } from "@ark-ui/solid/swap";
3
3
  //#region src/components/swap/index.d.ts
4
4
  /** Ark's Swap, dressed in the paper-and-ink system: two impressions
5
5
  * occupying one seal, the arriving one growing into place on the spring
6
6
  * while the departing one shrinks away. The API is Ark's own — Root,
7
7
  * Indicator (type="on" | "off"), RootProvider. */
8
- declare function SwapRoot(props: ComponentProps<typeof Swap$1.Root>): import("solid-js").JSX.Element;
9
- export declare const Swap: typeof SwapRoot & Omit<typeof Swap$1, "Root"> & {
8
+ declare function SwapRoot(props: ComponentProps<typeof Swap$1.Root>): JSX.Element;
9
+ export interface SwapFacadeProps {
10
+ swap?: boolean;
11
+ on?: JSX.Element;
12
+ off?: JSX.Element;
13
+ }
14
+ /** The one-tag path for the default check/cross impression; custom
15
+ * transitions and indicators stay on the anatomy with `on`/`off` props. */
16
+ declare function SwapFacade(props: SwapFacadeProps): JSX.Element;
17
+ export declare const Swap: typeof SwapFacade & Omit<typeof Swap$1, "Root"> & {
10
18
  Root: typeof SwapRoot;
11
19
  };
12
20
  //#endregion
@@ -1,20 +1,50 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
+ import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
2
3
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
- import { createComponent, mergeProps } from "solid-js";
4
+ import { createComponent } from "@solidjs/web";
5
+ import { injectComponentStyle } from "@bysages/core/styling";
6
+ import { createComponent as createComponent$1, mergeProps as mergeProps$1 } from "solid-js";
5
7
  import { Swap as Swap$1 } from "@ark-ui/solid/swap";
6
- //#region src/components/swap/index.ts
8
+ //#region src/components/swap/index.tsx
7
9
  /** Ark's Swap, dressed in the paper-and-ink system: two impressions
8
10
  * occupying one seal, the arriving one growing into place on the spring
9
11
  * while the departing one shrinks away. The API is Ark's own — Root,
10
12
  * Indicator (type="on" | "off"), RootProvider. */
11
13
  function SwapRoot(props) {
12
14
  const id = useElementId("swap", () => props.id);
13
- return createComponent(Swap$1.Root, mergeProps(props, { get id() {
15
+ return createComponent$1(Swap$1.Root, mergeProps$1(props, { get id() {
14
16
  return id();
15
17
  } }));
16
18
  }
17
- const Swap = defineFamily(SwapRoot, {
19
+ /** The one-tag path for the default check/cross impression; custom
20
+ * transitions and indicators stay on the anatomy with `on`/`off` props. */
21
+ function SwapFacade(props) {
22
+ return createComponent(SwapRoot, {
23
+ get swap() {
24
+ return props.swap ?? false;
25
+ },
26
+ get children() {
27
+ return [createComponent(Swap$1.Indicator, {
28
+ type: "on",
29
+ get children() {
30
+ return props.on ?? iconNode("check", {
31
+ width: "14",
32
+ height: "14"
33
+ });
34
+ }
35
+ }), createComponent(Swap$1.Indicator, {
36
+ type: "off",
37
+ get children() {
38
+ return props.off ?? iconNode("x", {
39
+ width: "14",
40
+ height: "14"
41
+ });
42
+ }
43
+ })];
44
+ }
45
+ });
46
+ }
47
+ const Swap = defineFamily(SwapFacade, {
18
48
  ...Swap$1,
19
49
  Root: SwapRoot
20
50
  });
@@ -9,7 +9,22 @@ type SwitchOwnProps = {
9
9
  size?: "sm" | "md" | "lg";
10
10
  };
11
11
  declare function SwitchRoot(props: SwitchRootProps & SwitchOwnProps): import("solid-js").JSX.Element;
12
- export declare const Switch: typeof SwitchRoot & Omit<typeof Switch$1, "Root"> & {
12
+ /** The complete switch behind one on/off state and its label. */
13
+ export interface SwitchFacadeProps {
14
+ checked?: boolean;
15
+ defaultValue?: boolean;
16
+ label?: string;
17
+ disabled?: boolean;
18
+ invalid?: boolean;
19
+ required?: boolean;
20
+ readOnly?: boolean;
21
+ /** One rung for the thumb; the track travels with it. */
22
+ size?: "sm" | "md" | "lg";
23
+ onCheckedChange?: (checked: boolean) => void;
24
+ }
25
+ declare function SwitchFacade(props: SwitchFacadeProps): import("solid-js").JSX.Element;
26
+ type SwitchParts = Omit<typeof Switch$1, "Root"> & {
13
27
  Root: typeof SwitchRoot;
14
28
  };
29
+ export declare const Switch: typeof SwitchFacade & SwitchParts;
15
30
  //#endregion
@@ -1,8 +1,8 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
3
  import { createComponent, mergeProps } from "@solidjs/web";
5
- import { splitProps } from "solid-js";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
+ import { Show, splitProps } from "solid-js";
6
6
  import { Switch as Switch$1 } from "@ark-ui/solid/switch";
7
7
  //#region src/components/switch/index.tsx
8
8
  function SwitchRoot(props) {
@@ -17,7 +17,52 @@ function SwitchRoot(props) {
17
17
  }
18
18
  }));
19
19
  }
20
- const Switch = defineFamily(SwitchRoot, {
20
+ function SwitchFacade(props) {
21
+ injectComponentStyle("switch");
22
+ return createComponent(SwitchRoot, mergeProps({
23
+ get size() {
24
+ return props.size ?? "md";
25
+ },
26
+ get disabled() {
27
+ return props.disabled;
28
+ },
29
+ get invalid() {
30
+ return props.invalid;
31
+ },
32
+ get readOnly() {
33
+ return props.readOnly;
34
+ },
35
+ get required() {
36
+ return props.required;
37
+ },
38
+ get defaultChecked() {
39
+ return props.defaultValue ?? false;
40
+ }
41
+ }, () => {
42
+ return props.checked === void 0 ? {} : { checked: props.checked };
43
+ }, {
44
+ onCheckedChange: (details) => props.onCheckedChange?.(details.checked),
45
+ get children() {
46
+ return [
47
+ createComponent(Switch$1.Control, { get children() {
48
+ return createComponent(Switch$1.Thumb, {});
49
+ } }),
50
+ createComponent(Show, {
51
+ get when() {
52
+ return props.label;
53
+ },
54
+ get children() {
55
+ return createComponent(Switch$1.Label, { get children() {
56
+ return props.label;
57
+ } });
58
+ }
59
+ }),
60
+ createComponent(Switch$1.HiddenInput, {})
61
+ ];
62
+ }
63
+ }));
64
+ }
65
+ const Switch = defineFamily(SwitchFacade, {
21
66
  ...Switch$1,
22
67
  Root: SwitchRoot
23
68
  });
@@ -58,6 +58,8 @@ export interface DataTableProps {
58
58
  pageSizeOptions?: number[];
59
59
  /** Keep the (optional) footer row pinned to the viewport bottom. */
60
60
  stickyFooter?: boolean;
61
+ /** Band every other body row so wide measures keep the eye on line. */
62
+ striped?: boolean;
61
63
  initialSorting?: SortingState;
62
64
  globalFilterPlaceholder?: string;
63
65
  emptyText?: string;
@@ -3,9 +3,9 @@ import { r as iconNode } from "../../icon-DTqmJCd5.mjs";
3
3
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
4
4
  import { n as useComponentMessages, t as formatComponentMessage } from "../../use-component-messages-C4SCVYjD.mjs";
5
5
  import { Pagination } from "../pagination/index.mjs";
6
- import { t as Select$1 } from "../../select-7YjMSBGx.mjs";
7
- import { injectComponentStyle } from "@bysages/core";
6
+ import { t as Select$1 } from "../../select-DI7pFspF.mjs";
8
7
  import { addEvent, createComponent, delegateEvents, effect, insert, memo, readShallow, ref, setAttribute, setStyleProperty, spread, style, template } from "@solidjs/web";
8
+ import { injectComponentStyle } from "@bysages/core/styling";
9
9
  import { For, createMemo, createSignal, onCleanup, onMount } from "solid-js";
10
10
  import { createListCollection } from "@ark-ui/solid/select";
11
11
  import { FlexRender, cellSpanningFeature, columnFilteringFeature, columnOrderingFeature, columnPinningFeature, columnSizingFeature, columnVisibilityFeature, createColumnHelper, createExpandedRowModel, createFilteredRowModel, createPaginatedRowModel, createSortedRowModel, createTable, 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 } from "@tanstack/solid-table";
@@ -174,6 +174,7 @@ const DataTable = withSelfRoot(function DataTable(props) {
174
174
  });
175
175
  const [viewport, setViewport] = createSignal(null);
176
176
  const rows = createMemo(() => table.getRowModel().rows);
177
+ const [mounted, setMounted] = createSignal(false);
177
178
  /** The declared row height is the density-scale baseline; the live
178
179
  * scale comes off the document so the virtual window matches what CSS
179
180
  * actually renders. It is read once and re-read only when the density
@@ -208,6 +209,25 @@ const DataTable = withSelfRoot(function DataTable(props) {
208
209
  });
209
210
  const virtual = () => props.virtual && !props.merge;
210
211
  const mergeMode = () => !props.virtual && !!props.merge;
212
+ onMount(() => setMounted(true));
213
+ const virtualRows = () => {
214
+ if (mounted()) return virtualizer.getVirtualItems();
215
+ if (!virtual()) return [];
216
+ const fallback = Math.max(1, Math.ceil(320 / baseRowHeight()));
217
+ return rows().slice(0, fallback).map((row, index) => {
218
+ const start = index * baseRowHeight();
219
+ const size = baseRowHeight();
220
+ return {
221
+ key: row.id ?? index,
222
+ index,
223
+ start,
224
+ end: start + size,
225
+ size,
226
+ lane: 0
227
+ };
228
+ });
229
+ };
230
+ const totalSize = () => mounted() ? virtualizer.getTotalSize() : rows().length * baseRowHeight();
211
231
  /** Column ids of the visible leaves, for pin-seam bookkeeping. */
212
232
  const leafIds = createMemo(() => table.getAllLeafColumns().map((c) => c.id));
213
233
  const expandHostId = createMemo(() => {
@@ -650,7 +670,7 @@ const DataTable = withSelfRoot(function DataTable(props) {
650
670
  return () => {
651
671
  return _c$3() ? createComponent(For, {
652
672
  get each() {
653
- return virtualizer.getVirtualItems();
673
+ return virtualRows();
654
674
  },
655
675
  children: (item) => renderRow(rows()[item.index], item)
656
676
  }) : createComponent(For, {
@@ -846,19 +866,21 @@ const DataTable = withSelfRoot(function DataTable(props) {
846
866
  effect(() => {
847
867
  return {
848
868
  e: props.reorderable || void 0,
849
- t: `calc(${baseRowHeight()}px * var(--bs-density-scale, 1))`,
850
- a: colsTemplate(),
851
- o: mergeMode() || void 0,
852
- i: virtual() || void 0,
853
- n: readShallow(virtual() ? { "--bs-table-virtual-total": `${virtualizer.getTotalSize()}px` } : void 0)
869
+ t: props.striped || void 0,
870
+ a: `calc(${baseRowHeight()}px * var(--bs-density-scale, 1))`,
871
+ o: colsTemplate(),
872
+ i: mergeMode() || void 0,
873
+ n: virtual() || void 0,
874
+ s: readShallow(virtual() ? { "--bs-table-virtual-total": `${totalSize()}px` } : void 0)
854
875
  };
855
- }, ({ e, t, a, o, i, n }, _p$) => {
876
+ }, ({ e, t, a, o, i, n, s }, _p$) => {
856
877
  e !== _p$?.e && setAttribute(_el$11, "data-reorderable", e);
857
- t !== _p$?.t && setStyleProperty(_el$11, "--bs-table-row-height", t);
858
- a !== _p$?.a && setStyleProperty(_el$13, "--bs-table-cols", a);
859
- o !== _p$?.o && setAttribute(_el$15, "data-merge", o);
860
- i !== _p$?.i && setAttribute(_el$15, "data-virtual", i);
861
- style(_el$15, n, _p$?.n);
878
+ t !== _p$?.t && setAttribute(_el$11, "data-striped", t);
879
+ a !== _p$?.a && setStyleProperty(_el$11, "--bs-table-row-height", a);
880
+ o !== _p$?.o && setStyleProperty(_el$13, "--bs-table-cols", o);
881
+ i !== _p$?.i && setAttribute(_el$15, "data-merge", i);
882
+ n !== _p$?.n && setAttribute(_el$15, "data-virtual", n);
883
+ style(_el$15, s, _p$?.s);
862
884
  });
863
885
  return _el$11;
864
886
  });
@@ -1,7 +1,7 @@
1
1
  import { t as defineFamily } from "../../family-Cmd8HEyK.mjs";
2
2
  import { t as useElementId } from "../../id-2ygNzPHF.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
3
  import { createComponent, mergeProps } from "@solidjs/web";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
5
  import { For, splitProps } from "solid-js";
6
6
  import { Tabs as Tabs$1 } from "@ark-ui/solid/tabs";
7
7
  //#region src/components/tabs/index.tsx
@@ -0,0 +1,29 @@
1
+ import { JSX } from "solid-js";
2
+ //#region src/components/tag/index.d.ts
3
+ type TagTone = "ink" | "primary" | "success" | "warning" | "danger" | "info";
4
+ type TagVariant = "solid" | "outline" | "subtle";
5
+ export interface TagProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "ref"> {
6
+ /** The pigment the tag is inked with; ink is the solemn default,
7
+ * and the fixed pigments speak for their meaning. */
8
+ tone?: TagTone;
9
+ /** How the tag rests: a solid fill, an outline shell, a subtle
10
+ * wash. The pressed state always reads as solid. */
11
+ variant?: TagVariant;
12
+ /** Render the tag as a pressed button the consumer can toggle. */
13
+ checkable?: boolean;
14
+ /** The pressed state held from outside; omit it and the tag keeps
15
+ * its own state from `defaultValue`. */
16
+ checked?: boolean;
17
+ defaultValue?: boolean;
18
+ /** Render the quiet removal seal. */
19
+ closable?: boolean;
20
+ disabled?: boolean;
21
+ /** Reports the next pressed state from a checkable tag. */
22
+ onValueChange?: (checked: boolean) => void;
23
+ /** Reports a dismissal from the removal seal. */
24
+ onClose?: () => void;
25
+ }
26
+ export declare const Tag: ((props: TagProps) => JSX.Element) & {
27
+ Root: (props: TagProps) => JSX.Element;
28
+ };
29
+ //#endregion