@bysages/solid 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +16 -2
  2. package/dist/{ai-response-B_586r27.mjs → ai-response-slzE03wh.mjs} +19 -17
  3. package/dist/chevron-D5RzcayK.mjs +9 -0
  4. package/dist/components/affix/index.mjs +15 -17
  5. package/dist/components/ai/index.d.mts +1 -1
  6. package/dist/components/ai/index.mjs +21 -22
  7. package/dist/components/ai-action/index.mjs +2 -2
  8. package/dist/components/ai-attachments/index.mjs +52 -38
  9. package/dist/components/ai-message/index.mjs +11 -13
  10. package/dist/components/ai-prompt-input/index.mjs +81 -55
  11. package/dist/components/ai-reasoning/index.mjs +10 -6
  12. package/dist/components/ai-response/index.mjs +1 -1
  13. package/dist/components/ai-source/index.mjs +23 -23
  14. package/dist/components/ai-suggestion/index.mjs +1 -1
  15. package/dist/components/ai-tool/index.mjs +29 -17
  16. package/dist/components/alert/index.mjs +37 -42
  17. package/dist/components/angle-slider/index.mjs +2 -2
  18. package/dist/components/aspect-ratio/index.mjs +14 -16
  19. package/dist/components/autocomplete/index.mjs +8 -3
  20. package/dist/components/avatar/index.d.mts +3 -0
  21. package/dist/components/avatar/index.mjs +10 -5
  22. package/dist/components/avatar-group/index.mjs +11 -13
  23. package/dist/components/back-top/index.mjs +31 -27
  24. package/dist/components/badge/index.mjs +14 -16
  25. package/dist/components/banner/index.mjs +26 -28
  26. package/dist/components/bento/index.d.mts +24 -0
  27. package/dist/components/bento/index.mjs +51 -0
  28. package/dist/components/block-ui/index.d.mts +12 -0
  29. package/dist/components/block-ui/index.mjs +43 -0
  30. package/dist/components/breadcrumb/index.mjs +12 -10
  31. package/dist/components/browser/index.d.mts +21 -0
  32. package/dist/components/browser/index.mjs +87 -0
  33. package/dist/components/button/index.mjs +27 -29
  34. package/dist/components/button-group/index.mjs +18 -20
  35. package/dist/components/calendar/index.mjs +141 -129
  36. package/dist/components/card/index.mjs +2 -2
  37. package/dist/components/cascade-select/index.mjs +167 -121
  38. package/dist/components/checkbox/index.mjs +2 -2
  39. package/dist/components/checkbox-group/index.mjs +53 -55
  40. package/dist/components/chip/index.mjs +22 -20
  41. package/dist/components/clipboard/index.mjs +2 -2
  42. package/dist/components/color-picker/index.mjs +2 -2
  43. package/dist/components/combobox/index.mjs +2 -2
  44. package/dist/components/command/index.mjs +83 -59
  45. package/dist/components/comment/index.mjs +77 -62
  46. package/dist/components/config-provider/index.d.mts +4 -1
  47. package/dist/components/config-provider/index.mjs +13 -9
  48. package/dist/components/container/index.mjs +14 -16
  49. package/dist/components/data-view/index.d.mts +18 -0
  50. package/dist/components/data-view/index.mjs +116 -0
  51. package/dist/components/date-input/index.mjs +2 -2
  52. package/dist/components/date-picker/index.mjs +2 -2
  53. package/dist/components/deferred-content/index.d.mts +16 -0
  54. package/dist/components/deferred-content/index.mjs +52 -0
  55. package/dist/components/descriptions/index.d.mts +9 -1
  56. package/dist/components/descriptions/index.mjs +43 -16
  57. package/dist/components/dock/index.d.mts +22 -0
  58. package/dist/components/dock/index.mjs +64 -0
  59. package/dist/components/dynamic-input/index.mjs +75 -68
  60. package/dist/components/editable/index.mjs +2 -2
  61. package/dist/components/ellipsis/index.mjs +17 -19
  62. package/dist/components/empty/index.mjs +2 -2
  63. package/dist/components/file-upload/index.d.mts +7 -1
  64. package/dist/components/file-upload/index.mjs +13 -3
  65. package/dist/components/float-button/index.mjs +42 -39
  66. package/dist/components/form/index.d.mts +1 -1
  67. package/dist/components/form/index.mjs +52 -37
  68. package/dist/components/grid/index.mjs +19 -21
  69. package/dist/components/icon/index.d.mts +9 -4
  70. package/dist/components/icon/index.mjs +37 -36
  71. package/dist/components/image/index.d.mts +4 -0
  72. package/dist/components/image/index.mjs +50 -43
  73. package/dist/components/image-viewer/index.d.mts +4 -0
  74. package/dist/components/image-viewer/index.mjs +54 -37
  75. package/dist/components/input/index.d.mts +3 -0
  76. package/dist/components/input/index.mjs +1 -41
  77. package/dist/components/input-group/index.mjs +14 -18
  78. package/dist/components/json-tree-view/index.d.mts +5 -2
  79. package/dist/components/json-tree-view/index.mjs +25 -2
  80. package/dist/components/kbd/index.mjs +8 -10
  81. package/dist/components/layout/index.mjs +81 -77
  82. package/dist/components/link/index.mjs +12 -13
  83. package/dist/components/list/index.d.mts +2 -1
  84. package/dist/components/list/index.mjs +62 -48
  85. package/dist/components/listbox/index.mjs +2 -2
  86. package/dist/components/masonry/index.mjs +15 -17
  87. package/dist/components/mentions/index.mjs +1 -1
  88. package/dist/components/menu/index.mjs +2 -2
  89. package/dist/components/menubar/index.mjs +59 -57
  90. package/dist/components/meter/index.mjs +41 -41
  91. package/dist/components/number-input/index.mjs +2 -2
  92. package/dist/components/order-list/index.d.mts +21 -0
  93. package/dist/components/order-list/index.mjs +168 -0
  94. package/dist/components/page-header/index.mjs +2 -2
  95. package/dist/components/pagination/index.mjs +2 -2
  96. package/dist/components/password-input/index.mjs +2 -2
  97. package/dist/components/pin-input/index.mjs +2 -2
  98. package/dist/components/popconfirm/index.mjs +19 -12
  99. package/dist/components/progress/index.mjs +2 -2
  100. package/dist/components/progress-group/index.mjs +65 -58
  101. package/dist/components/radio-group/index.mjs +2 -2
  102. package/dist/components/rating-group/index.mjs +2 -2
  103. package/dist/components/result/index.d.mts +22 -0
  104. package/dist/components/result/index.mjs +66 -0
  105. package/dist/components/select/index.d.mts +2 -17
  106. package/dist/components/select/index.mjs +2 -18
  107. package/dist/components/separator/index.mjs +17 -19
  108. package/dist/components/skeleton/index.mjs +8 -10
  109. package/dist/components/slider/index.mjs +2 -2
  110. package/dist/components/spinner/index.mjs +17 -17
  111. package/dist/components/split-button/index.mjs +88 -83
  112. package/dist/components/spotlight/index.d.mts +11 -0
  113. package/dist/components/spotlight/index.mjs +38 -0
  114. package/dist/components/stack/index.mjs +20 -22
  115. package/dist/components/stat/index.mjs +12 -14
  116. package/dist/components/steps/index.d.mts +6 -1
  117. package/dist/components/steps/index.mjs +9 -3
  118. package/dist/components/switch/index.mjs +2 -2
  119. package/dist/components/table/index.mjs +323 -214
  120. package/dist/components/tabs/index.d.mts +2 -0
  121. package/dist/components/tabs/index.mjs +10 -5
  122. package/dist/components/tags-input/index.mjs +2 -2
  123. package/dist/components/terminal/index.d.mts +17 -0
  124. package/dist/components/terminal/index.mjs +86 -0
  125. package/dist/components/textarea/index.mjs +8 -8
  126. package/dist/components/timeline/index.d.mts +9 -3
  127. package/dist/components/timeline/index.mjs +18 -3
  128. package/dist/components/toc/index.d.mts +2 -7
  129. package/dist/components/toc/index.mjs +1 -9
  130. package/dist/components/toggle-group/index.mjs +2 -2
  131. package/dist/components/toolbar/index.d.mts +17 -0
  132. package/dist/components/toolbar/index.mjs +46 -0
  133. package/dist/components/transfer/index.mjs +126 -107
  134. package/dist/components/tree-select/index.mjs +36 -25
  135. package/dist/components/tree-view/index.d.mts +8 -1
  136. package/dist/components/tree-view/index.mjs +29 -3
  137. package/dist/components/typography/index.mjs +2 -2
  138. package/dist/components/user/index.d.mts +19 -0
  139. package/dist/components/user/index.mjs +68 -0
  140. package/dist/components/virtual-list/index.d.mts +17 -0
  141. package/dist/components/virtual-list/index.mjs +72 -0
  142. package/dist/components/watermark/index.mjs +19 -13
  143. package/dist/index-DdsnfV4f.d.mts +16 -0
  144. package/dist/{index-B4XS2n2y.d.mts → index-IfofF-SW.d.mts} +718 -3773
  145. package/dist/index-YPUiqD3n.d.mts +42 -0
  146. package/dist/index.d.mts +17 -4
  147. package/dist/index.mjs +22 -9
  148. package/dist/input-DoFQ7RXh.mjs +78 -0
  149. package/dist/{mentions-xbI6vJAP.mjs → mentions-f5Js_2W7.mjs} +76 -70
  150. package/dist/select-CX6OuQlU.mjs +123 -0
  151. package/dist/toc-CZmYEaQR.mjs +21 -0
  152. package/dist/use-component-messages-C4SCVYjD.mjs +17 -0
  153. package/package.json +28 -7
  154. package/dist/chevron-GWEoEYdO.mjs +0 -9
@@ -1,12 +1,13 @@
1
1
  import { Button } from "../button/index.mjs";
2
- import { Input } from "../input/index.mjs";
2
+ import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
3
+ import { t as Input } from "../../input-DoFQ7RXh.mjs";
3
4
  import { injectComponentStyle } from "@bysages/core";
4
- import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
5
+ import { createComponent, insert, memo, spread, template } from "@solidjs/web";
5
6
  import { Index, splitProps } from "solid-js";
6
7
  //#region src/components/dynamic-input/index.tsx
7
- var _tmpl$ = /*#__PURE__*/ template(`<div><div data-scope=dynamic-input data-part=add>`);
8
- var _tmpl$2 = /*#__PURE__*/ template(`<div data-scope=dynamic-input data-part=row>`);
9
- var _tmpl$3 = /*#__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="M18 6 6 18M6 6l12 12">`);
8
+ var _tmpl$ = /* @__PURE__ */ template(`<div><div data-scope=dynamic-input data-part=add>`);
9
+ var _tmpl$2 = /* @__PURE__ */ template(`<div data-scope=dynamic-input data-part=row><!><!>`);
10
+ var _tmpl$3 = /* @__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="M18 6 6 18M6 6l12 12">`);
10
11
  /**
11
12
  * A column of entry rows: one Input per line, each with a quiet remove
12
13
  * seal, and an add row at the tail. The list is controlled — every edit
@@ -16,6 +17,7 @@ var _tmpl$3 = /*#__PURE__*/ template(`<svg width=16 height=16 viewBox="0 0 24 24
16
17
  * emptied itself would leave the reader no place to type.
17
18
  */
18
19
  function DynamicInput(props) {
20
+ const messages = useComponentMessages();
19
21
  injectComponentStyle("dynamic-input");
20
22
  const [own, rest] = splitProps(props, [
21
23
  "value",
@@ -44,69 +46,74 @@ function DynamicInput(props) {
44
46
  };
45
47
  const canRemove = () => values().length > Math.max(own.min ?? 0, 1);
46
48
  const canAdd = () => own.max === void 0 || values().length < own.max;
47
- return (() => {
48
- var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
49
- spread(_el$, mergeProps(rest, {
50
- "data-scope": "dynamic-input",
51
- "data-part": "root"
52
- }), false, true);
53
- insert(_el$, createComponent(Index, {
54
- get each() {
55
- return values();
56
- },
57
- children: (value, index) => (() => {
58
- var _el$3 = _tmpl$2();
59
- insert(_el$3, createComponent(Input, {
60
- get value() {
61
- return value();
62
- },
63
- get placeholder() {
64
- return own.placeholder;
65
- },
66
- get disabled() {
67
- return own.disabled;
68
- },
69
- get invalid() {
70
- return own.invalid;
71
- },
72
- get size() {
73
- return own.size ?? "md";
74
- },
75
- onValueChange: (next) => update(index, next)
76
- }), null);
77
- insert(_el$3, createComponent(Button, {
78
- variant: "ghost",
79
- get size() {
80
- return own.size ?? "md";
81
- },
82
- square: true,
83
- get disabled() {
84
- return own.disabled || !canRemove();
85
- },
86
- "aria-label": `Remove entry ${index + 1}`,
87
- onClick: () => remove(index),
88
- get children() {
89
- return crossIcon();
90
- }
91
- }), null);
92
- return _el$3;
93
- })()
94
- }), _el$2);
95
- insert(_el$2, createComponent(Button, {
96
- variant: "ghost",
97
- get size() {
98
- return own.size ?? "md";
99
- },
100
- get disabled() {
101
- return own.disabled || !canAdd();
102
- },
103
- onClick: () => add(),
104
- get children() {
105
- return ["+", memo(() => own.addLabel ?? "Add entry")];
106
- }
107
- }));
108
- return _el$;
109
- })();
49
+ var _el$ = _tmpl$();
50
+ var _el$2 = _el$.firstChild;
51
+ spread(_el$, [rest, {
52
+ "data-scope": "dynamic-input",
53
+ "data-part": "root"
54
+ }], true);
55
+ insert(_el$, createComponent(Index, {
56
+ get each() {
57
+ return values();
58
+ },
59
+ children: (value, index) => (() => {
60
+ var _el$3 = _tmpl$2();
61
+ var _el$4 = _el$3.firstChild;
62
+ var _el$5 = _el$4.nextSibling;
63
+ insert(_el$3, createComponent(Input, {
64
+ get value() {
65
+ return value();
66
+ },
67
+ get placeholder() {
68
+ return own.placeholder;
69
+ },
70
+ get disabled() {
71
+ return own.disabled;
72
+ },
73
+ get invalid() {
74
+ return own.invalid;
75
+ },
76
+ get size() {
77
+ return own.size ?? "md";
78
+ },
79
+ onValueChange: (next) => update(index, next)
80
+ }), _el$4);
81
+ insert(_el$3, createComponent(Button, {
82
+ variant: "ghost",
83
+ get size() {
84
+ return own.size ?? "md";
85
+ },
86
+ square: true,
87
+ get disabled() {
88
+ return own.disabled || !canRemove();
89
+ },
90
+ get "aria-label"() {
91
+ return `${messages().dynamicEntry.remove} ${index + 1}`;
92
+ },
93
+ onClick: () => remove(index),
94
+ get children() {
95
+ return crossIcon();
96
+ }
97
+ }), _el$5);
98
+ return _el$3;
99
+ })()
100
+ }), _el$2);
101
+ insert(_el$2, createComponent(Button, {
102
+ variant: "ghost",
103
+ get size() {
104
+ return own.size ?? "md";
105
+ },
106
+ get disabled() {
107
+ return own.disabled || !canAdd();
108
+ },
109
+ onClick: () => add(),
110
+ get children() {
111
+ return ["+", memo(() => {
112
+ return own.addLabel ?? "Add entry";
113
+ })];
114
+ }
115
+ }));
116
+ return _el$;
110
117
  }
111
118
  /** The one glyph a remove seal needs: a single crossing stroke. */
112
119
  function crossIcon() {
@@ -1,11 +1,11 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { createComponent, mergeProps } from "solid-js/web";
2
+ import { createComponent, mergeProps } from "@solidjs/web";
3
3
  import { splitProps } from "solid-js";
4
4
  import { Editable as Editable$1 } from "@ark-ui/solid/editable";
5
5
  //#region src/components/editable/index.tsx
6
6
  function EditableRoot(props) {
7
7
  const [own, rest] = splitProps(props, ["size"]);
8
- return createComponent(Editable$1.Root, mergeProps(rest, { get ["data-size"]() {
8
+ return createComponent(Editable$1.Root, mergeProps(rest, { get "data-size"() {
9
9
  return own.size ?? "md";
10
10
  } }));
11
11
  }
@@ -1,29 +1,27 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { mergeProps, spread, template } from "solid-js/web";
2
+ import { spread, template } from "@solidjs/web";
3
3
  import { splitProps } from "solid-js";
4
4
  //#region src/components/ellipsis/index.tsx
5
- var _tmpl$ = /*#__PURE__*/ template(`<span>`);
5
+ var _tmpl$ = /* @__PURE__ */ template(`<span>`);
6
6
  function Ellipsis(props) {
7
7
  injectComponentStyle("ellipsis");
8
8
  const [own, rest] = splitProps(props, ["lines"]);
9
9
  const multiline = () => (own.lines ?? 1) > 1;
10
- return (() => {
11
- var _el$ = _tmpl$();
12
- spread(_el$, mergeProps(rest, {
13
- get style() {
14
- return {
15
- ...rest.style,
16
- ...multiline() ? { "--bs-ellipsis-lines": String(own.lines) } : {}
17
- };
18
- },
19
- "data-scope": "ellipsis",
20
- "data-part": "root",
21
- get ["data-multiline"]() {
22
- return multiline() ? "" : void 0;
23
- }
24
- }), false, false);
25
- return _el$;
26
- })();
10
+ var _el$ = _tmpl$();
11
+ spread(_el$, [rest, {
12
+ get style() {
13
+ return {
14
+ ...rest.style,
15
+ ...multiline() ? { "--bs-ellipsis-lines": String(own.lines) } : {}
16
+ };
17
+ },
18
+ "data-scope": "ellipsis",
19
+ "data-part": "root",
20
+ get "data-multiline"() {
21
+ return multiline() ? "" : void 0;
22
+ }
23
+ }], false);
24
+ return _el$;
27
25
  }
28
26
  //#endregion
29
27
  export { Ellipsis };
@@ -1,5 +1,5 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { createComponent, mergeProps } from "solid-js/web";
2
+ import { createComponent, mergeProps } from "@solidjs/web";
3
3
  //#region src/components/empty/index.tsx
4
4
  /** An empty state: the page holds its breath. Root centers the column,
5
5
  * Visual carries the mark, Title and Description carry the ink, Actions
@@ -8,7 +8,7 @@ function part(name, tag) {
8
8
  return ((props) => {
9
9
  return createComponent(tag, mergeProps(props, {
10
10
  "data-scope": "empty",
11
- get ["data-part"]() {
11
+ get "data-part"() {
12
12
  return name.toLowerCase();
13
13
  }
14
14
  }));
@@ -1,5 +1,10 @@
1
+ import { ComponentProps } from "solid-js";
1
2
  import { FileUpload as FileUpload$1, FileUploadRootProps } from "@ark-ui/solid/file-upload";
2
3
  //#region src/components/file-upload/index.d.ts
4
+ /** The inner trigger repeats the click binding the dropzone already
5
+ * owns: keyboard users enter through the dropzone, so the button
6
+ * leaves the tab order and the semantic tree entirely. */
7
+ declare function FileUploadTrigger(props: ComponentProps<typeof FileUpload$1.Trigger>): import("solid-js").JSX.Element;
3
8
  /** Ark's FileUpload, dressed in the paper-and-ink system: a dashed
4
9
  * dropzone that floods with subtle light on drag-over, and accepted files
5
10
  * as loose hairline slips. The API is Ark's own — Root, Label, Trigger,
@@ -11,7 +16,8 @@ type FileUploadOwnProps = {
11
16
  size?: "sm" | "md" | "lg";
12
17
  };
13
18
  declare function FileUploadRoot(props: FileUploadRootProps & FileUploadOwnProps): import("solid-js").JSX.Element;
14
- export declare const FileUpload: Omit<typeof FileUpload$1, "Root"> & {
19
+ export declare const FileUpload: Omit<typeof FileUpload$1, "Root" | "Trigger"> & {
15
20
  Root: typeof FileUploadRoot;
21
+ Trigger: typeof FileUploadTrigger;
16
22
  };
17
23
  //#endregion
@@ -1,17 +1,27 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { createComponent, mergeProps } from "solid-js/web";
2
+ import { createComponent, mergeProps } from "@solidjs/web";
3
3
  import { splitProps } from "solid-js";
4
4
  import { FileUpload as FileUpload$1 } from "@ark-ui/solid/file-upload";
5
5
  //#region src/components/file-upload/index.tsx
6
+ /** The inner trigger repeats the click binding the dropzone already
7
+ * owns: keyboard users enter through the dropzone, so the button
8
+ * leaves the tab order and the semantic tree entirely. */
9
+ function FileUploadTrigger(props) {
10
+ return createComponent(FileUpload$1.Trigger, mergeProps(props, {
11
+ tabindex: -1,
12
+ "aria-hidden": "true"
13
+ }));
14
+ }
6
15
  function FileUploadRoot(props) {
7
16
  const [own, rest] = splitProps(props, ["size"]);
8
- return createComponent(FileUpload$1.Root, mergeProps(rest, { get ["data-size"]() {
17
+ return createComponent(FileUpload$1.Root, mergeProps(rest, { get "data-size"() {
9
18
  return own.size ?? "md";
10
19
  } }));
11
20
  }
12
21
  const FileUpload = {
13
22
  ...FileUpload$1,
14
- Root: FileUploadRoot
23
+ Root: FileUploadRoot,
24
+ Trigger: FileUploadTrigger
15
25
  };
16
26
  injectComponentStyle("file-upload");
17
27
  //#endregion
@@ -1,10 +1,11 @@
1
1
  import { Button } from "../button/index.mjs";
2
+ import { n as useComponentMessages } from "../../use-component-messages-C4SCVYjD.mjs";
2
3
  import { injectComponentStyle } from "@bysages/core";
3
- import { createComponent, insert, mergeProps, spread, template } from "solid-js/web";
4
+ import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
4
5
  import { createContext, createSignal, splitProps, useContext } from "solid-js";
5
6
  //#region src/components/float-button/index.tsx
6
- var _tmpl$ = /*#__PURE__*/ template(`<div>`);
7
- var _tmpl$2 = /*#__PURE__*/ template(`<div><span data-scope=float-button data-part=item-label aria-hidden=true>`);
7
+ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
8
+ var _tmpl$2 = /* @__PURE__ */ template(`<div><span data-scope=float-button data-part=item-label aria-hidden=true>`);
8
9
  /** Solid context for {@link FloatButtonContext}, exported so a custom
9
10
  * part can read the group's state with `useContext`. */
10
11
  const FloatButtonContextKey = createContext();
@@ -40,16 +41,16 @@ function FloatButtonRoot(props) {
40
41
  value: context,
41
42
  get children() {
42
43
  var _el$ = _tmpl$();
43
- spread(_el$, mergeProps(rest, {
44
+ spread(_el$, [rest, {
44
45
  "data-scope": "float-button",
45
46
  "data-part": "root",
46
- get ["data-placement"]() {
47
+ get "data-placement"() {
47
48
  return own.placement ?? "bottom-end";
48
49
  },
49
- get ["data-state"]() {
50
+ get "data-state"() {
50
51
  return open() ? "open" : "closed";
51
52
  }
52
- }), false, false);
53
+ }], false);
53
54
  return _el$;
54
55
  }
55
56
  });
@@ -62,6 +63,7 @@ const STEP_DOWN = {
62
63
  function FloatButtonTrigger(props) {
63
64
  const [own, rest] = splitProps(props, ["label", "children"]);
64
65
  const context = useContext(FloatButtonContextKey);
66
+ const messages = useComponentMessages();
65
67
  return createComponent(Button, mergeProps(rest, {
66
68
  variant: "solid",
67
69
  square: true,
@@ -69,10 +71,10 @@ function FloatButtonTrigger(props) {
69
71
  return context?.size() ?? "lg";
70
72
  },
71
73
  onClick: () => context?.toggle(),
72
- get ["aria-label"]() {
73
- return own.label || "Actions";
74
+ get "aria-label"() {
75
+ return own.label || messages().floatButton.actions;
74
76
  },
75
- get ["aria-expanded"]() {
77
+ get "aria-expanded"() {
76
78
  return context?.open() ?? false;
77
79
  },
78
80
  get children() {
@@ -88,35 +90,36 @@ function FloatButtonItem(props) {
88
90
  "children"
89
91
  ]);
90
92
  const context = useContext(FloatButtonContextKey);
91
- return (() => {
92
- var _el$2 = _tmpl$2(), _el$3 = _el$2.firstChild;
93
- spread(_el$2, mergeProps(rest, {
94
- "data-scope": "float-button",
95
- "data-part": "item"
96
- }), false, true);
97
- insert(_el$2, createComponent(Button, {
98
- variant: "outline",
99
- square: true,
100
- get size() {
101
- return context ? STEP_DOWN[context.size()] : "md";
102
- },
103
- get disabled() {
104
- return own.disabled;
105
- },
106
- get ["aria-label"]() {
107
- return own.label;
108
- },
109
- onClick: (event) => {
110
- own.onClick?.(event);
111
- context?.close();
112
- },
113
- get children() {
114
- return own.children;
115
- }
116
- }), _el$3);
117
- insert(_el$3, () => own.label);
118
- return _el$2;
119
- })();
93
+ var _el$2 = _tmpl$2();
94
+ var _el$3 = _el$2.firstChild;
95
+ spread(_el$2, [rest, {
96
+ "data-scope": "float-button",
97
+ "data-part": "item"
98
+ }], true);
99
+ insert(_el$2, createComponent(Button, {
100
+ variant: "outline",
101
+ square: true,
102
+ get size() {
103
+ return context ? STEP_DOWN[context.size()] : "md";
104
+ },
105
+ get disabled() {
106
+ return own.disabled;
107
+ },
108
+ get "aria-label"() {
109
+ return own.label;
110
+ },
111
+ onClick: (event) => {
112
+ own.onClick?.(event);
113
+ context?.close();
114
+ },
115
+ get children() {
116
+ return own.children;
117
+ }
118
+ }), _el$3);
119
+ insert(_el$3, () => {
120
+ return own.label;
121
+ });
122
+ return _el$2;
120
123
  }
121
124
  const FloatButton = Object.assign(FloatButtonRoot, {
122
125
  Root: FloatButtonRoot,
@@ -1,2 +1,2 @@
1
1
  import { a as SolidFormApi, c as FormApi, i as FormProps, l as FieldApi, n as FormField, o as createField, r as FormFieldProps, s as createForm, t as Form } from "../../index-B1xiJ5ki.mjs";
2
- export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, type SolidFormApi, createField, createForm };
2
+ export { type FieldApi, Form, type FormApi, FormField, FormFieldProps, FormProps, type SolidFormApi, createField, createField as useField, createForm, createForm as useForm };
@@ -1,11 +1,11 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
2
+ import { claimElement, createComponent, insert, memo, mergeProps, spread, template } from "@solidjs/web";
3
3
  import { Show, createContext, splitProps, useContext } from "solid-js";
4
4
  import { Field } from "@ark-ui/solid/field";
5
5
  import { createField, createForm } from "@tanstack/solid-form";
6
6
  //#region src/components/form/index.tsx
7
- var _tmpl$ = /*#__PURE__*/ template(`<form>`);
8
- var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
7
+ var _tmpl$ = /* @__PURE__ */ template(`<form>`);
8
+ var _tmpl$2 = /* @__PURE__ */ template(`<div>`);
9
9
  const FormContext = createContext(null);
10
10
  /** A validator's complaint is a string or a Standard Schema issue; both
11
11
  * reduce to the sentence the field shows. */
@@ -25,15 +25,16 @@ function Form(props) {
25
25
  },
26
26
  get children() {
27
27
  var _el$ = _tmpl$();
28
- spread(_el$, mergeProps(rest, {
28
+ claimElement(_el$);
29
+ spread(_el$, [rest, {
29
30
  "data-scope": "form",
30
31
  "data-part": "root",
31
- "novalidate": true,
32
- "onSubmit": (event) => {
32
+ novalidate: true,
33
+ onSubmit: (event) => {
33
34
  event.preventDefault();
34
35
  own.form.handleSubmit();
35
36
  }
36
- }), false, false);
37
+ }], false);
37
38
  return _el$;
38
39
  }
39
40
  });
@@ -57,38 +58,52 @@ function FormField(props) {
57
58
  const meta = field().state.meta;
58
59
  return (meta.isTouched ? meta.errors ?? [] : [meta.errorMap?.onSubmit].flat().filter(Boolean)).map(errorText).filter(Boolean);
59
60
  };
60
- return (() => {
61
- var _el$2 = _tmpl$2();
62
- spread(_el$2, mergeProps(rest, { get ["data-form-field"]() {
63
- return own.name;
64
- } }), false, true);
65
- insert(_el$2, createComponent(Field.Root, {
66
- get invalid() {
67
- return own.invalid || errors().length > 0;
68
- },
69
- get required() {
70
- return own.required;
71
- },
72
- get disabled() {
73
- return own.disabled;
74
- },
75
- get children() {
76
- return [
77
- memo(() => memo(() => !!own.label)() ? createComponent(Field.Label, { get children() {
61
+ var _el$2 = _tmpl$2();
62
+ spread(_el$2, [rest, { get "data-form-field"() {
63
+ return own.name;
64
+ } }], true);
65
+ insert(_el$2, createComponent(Field.Root, {
66
+ get invalid() {
67
+ return own.invalid || errors().length > 0;
68
+ },
69
+ get required() {
70
+ return own.required;
71
+ },
72
+ get disabled() {
73
+ return own.disabled;
74
+ },
75
+ get children() {
76
+ return [
77
+ memo(() => {
78
+ return memo(() => {
79
+ return !!own.label;
80
+ })() ? createComponent(Field.Label, { get children() {
78
81
  return own.label;
79
- } }) : null),
80
- memo(() => memo(() => typeof own.children === "function")() ? own.children(field) : own.children),
81
- memo(() => memo(() => !!(own.hint && errors().length === 0))() ? createComponent(Field.HelperText, { get children() {
82
+ } }) : null;
83
+ }),
84
+ memo(() => {
85
+ return memo(() => {
86
+ return typeof own.children === "function";
87
+ })() ? own.children(field) : own.children;
88
+ }),
89
+ memo(() => {
90
+ return memo(() => {
91
+ return !!(own.hint && errors().length === 0);
92
+ })() ? createComponent(Field.HelperText, { get children() {
82
93
  return own.hint;
83
- } }) : null),
84
- memo(() => memo(() => errors().length > 0)() ? createComponent(Field.ErrorText, { get children() {
94
+ } }) : null;
95
+ }),
96
+ memo(() => {
97
+ return memo(() => {
98
+ return errors().length > 0;
99
+ })() ? createComponent(Field.ErrorText, { get children() {
85
100
  return errors()[0];
86
- } }) : null)
87
- ];
88
- }
89
- }));
90
- return _el$2;
91
- })();
101
+ } }) : null;
102
+ })
103
+ ];
104
+ }
105
+ }));
106
+ return _el$2;
92
107
  };
93
108
  return createComponent(Show, {
94
109
  get when() {
@@ -107,4 +122,4 @@ function FormField(props) {
107
122
  });
108
123
  }
109
124
  //#endregion
110
- export { Form, FormField, createField, createForm };
125
+ export { Form, FormField, createField, createField as useField, createForm, createForm as useForm };
@@ -1,8 +1,8 @@
1
1
  import { injectComponentStyle } from "@bysages/core";
2
- import { mergeProps, spread, template } from "solid-js/web";
2
+ import { spread, template } from "@solidjs/web";
3
3
  import { splitProps } from "solid-js";
4
4
  //#region src/components/grid/index.tsx
5
- var _tmpl$ = /*#__PURE__*/ template(`<div>`);
5
+ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
6
6
  /** The same named steps of the space ramp the stack uses — one
7
7
  * vocabulary of distance across the layout primitives. */
8
8
  const gapVars = {
@@ -20,25 +20,23 @@ function Grid(props) {
20
20
  "gap",
21
21
  "minChildWidth"
22
22
  ]);
23
- return (() => {
24
- var _el$ = _tmpl$();
25
- spread(_el$, mergeProps(rest, {
26
- get style() {
27
- return {
28
- ...rest.style,
29
- "--bs-grid-columns": String(own.columns ?? 12),
30
- "--bs-grid-gap": gapVars[own.gap ?? "md"] ?? gapVars.md,
31
- ...own.minChildWidth != null ? { "--bs-grid-min-child-width": own.minChildWidth } : {}
32
- };
33
- },
34
- "data-scope": "grid",
35
- "data-part": "root",
36
- get ["data-autofill"]() {
37
- return own.minChildWidth != null ? "" : void 0;
38
- }
39
- }), false, false);
40
- return _el$;
41
- })();
23
+ var _el$ = _tmpl$();
24
+ spread(_el$, [rest, {
25
+ get style() {
26
+ return {
27
+ ...rest.style,
28
+ "--bs-grid-columns": String(own.columns ?? 12),
29
+ "--bs-grid-gap": gapVars[own.gap ?? "md"] ?? gapVars.md,
30
+ ...own.minChildWidth != null ? { "--bs-grid-min-child-width": own.minChildWidth } : {}
31
+ };
32
+ },
33
+ "data-scope": "grid",
34
+ "data-part": "root",
35
+ get "data-autofill"() {
36
+ return own.minChildWidth != null ? "" : void 0;
37
+ }
38
+ }], false);
39
+ return _el$;
42
40
  }
43
41
  //#endregion
44
42
  export { Grid };
@@ -1,9 +1,11 @@
1
1
  import { JSX } from "solid-js";
2
+ import { IconifyIcon } from "@bysages/core/icons";
2
3
  //#region src/components/icon/index.d.ts
3
4
  /** The inkwell: a standard box that keeps any inline svg at its optical
4
5
  * measure and in the text's own ink — the icon carries no pigment and no
5
- * size of its own. Bring a glyph through `name` from the registry, or
6
- * bring your own; the well renders either. */
6
+ * size of its own. Bring a glyph through `glyph` (a direct registry
7
+ * import), through `name` from the whitelisted registry, or bring your
8
+ * own; the well renders either. */
7
9
  export interface IconProps extends JSX.HTMLAttributes<HTMLSpanElement> {
8
10
  /** Size steps follow the surrounding font size; `inherit` is the
9
11
  * default — one em of the text the icon sits in. */
@@ -11,8 +13,11 @@ export interface IconProps extends JSX.HTMLAttributes<HTMLSpanElement> {
11
13
  /** The accessible name. Without it the icon is presentation-only and
12
14
  * hidden from the accessibility tree. */
13
15
  label?: string;
14
- /** A glyph from the registry. Ignored when children are given — an
15
- * explicit glyph always wins over the registry. */
16
+ /** A glyph from the registry, imported directly. Ignored when children
17
+ * are given — an explicit glyph always wins. */
18
+ glyph?: IconifyIcon;
19
+ /** A registry name — only the whitelisted set the wrappers draw
20
+ * themselves. Ignored when `glyph` or children are given. */
16
21
  name?: string;
17
22
  }
18
23
  export declare function Icon(props: IconProps): JSX.Element;