@bysages/react 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/dist/{ai-response-BfKTmtCt.mjs → ai-response-nhDOlELQ.mjs} +4 -2
  2. package/dist/chevron-a2nIZKN4.mjs +6 -0
  3. package/dist/components/accordion/index.d.mts +22 -4
  4. package/dist/components/accordion/index.mjs +32 -2
  5. package/dist/components/affix/index.d.mts +4 -1
  6. package/dist/components/affix/index.mjs +6 -4
  7. package/dist/components/ai/index.d.mts +1 -1
  8. package/dist/components/ai/index.mjs +6 -4
  9. package/dist/components/ai-action/index.d.mts +4 -1
  10. package/dist/components/ai-action/index.mjs +4 -2
  11. package/dist/components/ai-attachments/index.d.mts +10 -4
  12. package/dist/components/ai-attachments/index.mjs +17 -45
  13. package/dist/components/ai-message/index.d.mts +4 -1
  14. package/dist/components/ai-message/index.mjs +4 -2
  15. package/dist/components/ai-prompt-input/index.d.mts +5 -2
  16. package/dist/components/ai-prompt-input/index.mjs +11 -15
  17. package/dist/components/ai-reasoning/index.d.mts +4 -1
  18. package/dist/components/ai-reasoning/index.mjs +5 -3
  19. package/dist/components/ai-response/index.d.mts +4 -1
  20. package/dist/components/ai-response/index.mjs +1 -1
  21. package/dist/components/ai-source/index.d.mts +8 -2
  22. package/dist/components/ai-source/index.mjs +6 -3
  23. package/dist/components/ai-suggestion/index.d.mts +4 -1
  24. package/dist/components/ai-suggestion/index.mjs +4 -2
  25. package/dist/components/ai-tool/index.d.mts +4 -1
  26. package/dist/components/ai-tool/index.mjs +5 -3
  27. package/dist/components/alert/index.d.mts +2 -0
  28. package/dist/components/alert/index.mjs +12 -19
  29. package/dist/components/angle-slider/index.d.mts +19 -2
  30. package/dist/components/angle-slider/index.mjs +32 -9
  31. package/dist/components/aspect-ratio/index.d.mts +4 -1
  32. package/dist/components/aspect-ratio/index.mjs +4 -2
  33. package/dist/components/autocomplete/index.d.mts +3 -1
  34. package/dist/components/autocomplete/index.mjs +15 -3
  35. package/dist/components/avatar/index.d.mts +2 -2
  36. package/dist/components/avatar/index.mjs +10 -3
  37. package/dist/components/avatar-group/index.d.mts +4 -1
  38. package/dist/components/avatar-group/index.mjs +4 -2
  39. package/dist/components/back-top/index.d.mts +7 -1
  40. package/dist/components/back-top/index.mjs +13 -18
  41. package/dist/components/badge/index.d.mts +4 -1
  42. package/dist/components/badge/index.mjs +4 -2
  43. package/dist/components/banner/index.mjs +3 -12
  44. package/dist/components/bento/index.mjs +1 -1
  45. package/dist/components/block-ui/index.d.mts +4 -1
  46. package/dist/components/block-ui/index.mjs +4 -2
  47. package/dist/components/breadcrumb/index.mjs +1 -1
  48. package/dist/components/browser/index.mjs +1 -1
  49. package/dist/components/button/index.d.mts +4 -1
  50. package/dist/components/button/index.mjs +4 -2
  51. package/dist/components/button-group/index.mjs +1 -1
  52. package/dist/components/calendar/index.d.mts +3 -1
  53. package/dist/components/calendar/index.mjs +10 -11
  54. package/dist/components/card/index.mjs +1 -1
  55. package/dist/components/carousel/index.d.mts +21 -1
  56. package/dist/components/carousel/index.mjs +44 -3
  57. package/dist/components/cascade-select/index.d.mts +6 -1
  58. package/dist/components/cascade-select/index.mjs +13 -36
  59. package/dist/components/checkbox/index.d.mts +20 -2
  60. package/dist/components/checkbox/index.mjs +29 -9
  61. package/dist/components/checkbox-group/index.d.mts +8 -6
  62. package/dist/components/checkbox-group/index.mjs +45 -49
  63. package/dist/components/chip/index.d.mts +4 -1
  64. package/dist/components/chip/index.mjs +4 -2
  65. package/dist/components/client-only/index.d.mts +7 -2
  66. package/dist/components/client-only/index.mjs +5 -1
  67. package/dist/components/clipboard/index.d.mts +17 -4
  68. package/dist/components/clipboard/index.mjs +34 -6
  69. package/dist/components/collapsible/index.d.mts +16 -4
  70. package/dist/components/collapsible/index.mjs +26 -2
  71. package/dist/components/color-picker/index.d.mts +20 -4
  72. package/dist/components/color-picker/index.mjs +57 -15
  73. package/dist/components/combobox/index.d.mts +27 -1
  74. package/dist/components/combobox/index.mjs +63 -6
  75. package/dist/components/command/index.d.mts +4 -1
  76. package/dist/components/command/index.mjs +8 -2
  77. package/dist/components/comment/index.d.mts +4 -1
  78. package/dist/components/comment/index.mjs +4 -2
  79. package/dist/components/config-provider/index.d.mts +4 -1
  80. package/dist/components/config-provider/index.mjs +3 -1
  81. package/dist/components/container/index.d.mts +4 -1
  82. package/dist/components/container/index.mjs +4 -2
  83. package/dist/components/data-view/index.d.mts +4 -1
  84. package/dist/components/data-view/index.mjs +4 -2
  85. package/dist/components/date-input/index.d.mts +19 -4
  86. package/dist/components/date-input/index.mjs +34 -10
  87. package/dist/components/date-picker/index.d.mts +21 -4
  88. package/dist/components/date-picker/index.mjs +59 -12
  89. package/dist/components/deferred-content/index.d.mts +4 -1
  90. package/dist/components/deferred-content/index.mjs +4 -2
  91. package/dist/components/descriptions/index.d.mts +10 -2
  92. package/dist/components/descriptions/index.mjs +14 -9
  93. package/dist/components/dialog/index.d.mts +18 -5
  94. package/dist/components/dialog/index.mjs +44 -2
  95. package/dist/components/dock/index.mjs +1 -1
  96. package/dist/components/download-trigger/index.d.mts +7 -2
  97. package/dist/components/download-trigger/index.mjs +5 -1
  98. package/dist/components/drawer/index.d.mts +18 -6
  99. package/dist/components/drawer/index.mjs +41 -2
  100. package/dist/components/dynamic-input/index.d.mts +4 -1
  101. package/dist/components/dynamic-input/index.mjs +11 -19
  102. package/dist/components/editable/index.d.mts +28 -7
  103. package/dist/components/editable/index.mjs +44 -5
  104. package/dist/components/ellipsis/index.d.mts +4 -1
  105. package/dist/components/ellipsis/index.mjs +4 -2
  106. package/dist/components/empty/index.mjs +1 -1
  107. package/dist/components/field/index.d.mts +30 -5
  108. package/dist/components/field/index.mjs +37 -4
  109. package/dist/components/fieldset/index.d.mts +19 -4
  110. package/dist/components/fieldset/index.mjs +29 -4
  111. package/dist/components/file-upload/index.d.mts +29 -9
  112. package/dist/components/file-upload/index.mjs +47 -11
  113. package/dist/components/float-button/index.mjs +1 -1
  114. package/dist/components/floating-panel/index.d.mts +18 -6
  115. package/dist/components/floating-panel/index.mjs +56 -2
  116. package/dist/components/focus-trap/index.d.mts +7 -2
  117. package/dist/components/focus-trap/index.mjs +5 -1
  118. package/dist/components/form/index.d.mts +1 -1
  119. package/dist/components/form/index.mjs +6 -3
  120. package/dist/components/frame/index.d.mts +4 -8
  121. package/dist/components/frame/index.mjs +13 -1
  122. package/dist/components/grid/index.d.mts +4 -1
  123. package/dist/components/grid/index.mjs +4 -2
  124. package/dist/components/highlight/index.d.mts +3 -5
  125. package/dist/components/highlight/index.mjs +7 -2
  126. package/dist/components/hover-card/index.d.mts +20 -4
  127. package/dist/components/hover-card/index.mjs +33 -2
  128. package/dist/components/icon/index.d.mts +10 -8
  129. package/dist/components/icon/index.mjs +6 -4
  130. package/dist/components/image/index.d.mts +5 -2
  131. package/dist/components/image/index.mjs +15 -30
  132. package/dist/components/image-cropper/index.d.mts +13 -2
  133. package/dist/components/image-cropper/index.mjs +35 -3
  134. package/dist/components/image-viewer/index.d.mts +2 -24
  135. package/dist/components/image-viewer/index.mjs +3 -113
  136. package/dist/components/input/index.d.mts +3 -1
  137. package/dist/components/input/index.mjs +1 -1
  138. package/dist/components/input-group/index.mjs +1 -1
  139. package/dist/components/json-tree-view/index.d.mts +17 -1
  140. package/dist/components/json-tree-view/index.mjs +27 -6
  141. package/dist/components/kbd/index.d.mts +4 -1
  142. package/dist/components/kbd/index.mjs +4 -2
  143. package/dist/components/layout/index.d.mts +25 -7
  144. package/dist/components/layout/index.mjs +158 -64
  145. package/dist/components/link/index.d.mts +4 -1
  146. package/dist/components/link/index.mjs +4 -2
  147. package/dist/components/list/index.mjs +1 -1
  148. package/dist/components/listbox/index.d.mts +22 -1
  149. package/dist/components/listbox/index.mjs +37 -5
  150. package/dist/components/marquee/index.d.mts +18 -1
  151. package/dist/components/marquee/index.mjs +35 -3
  152. package/dist/components/masonry/index.d.mts +4 -1
  153. package/dist/components/masonry/index.mjs +4 -2
  154. package/dist/components/media-player/index.d.mts +2 -0
  155. package/dist/components/media-player/index.mjs +2 -0
  156. package/dist/components/mentions/index.d.mts +1 -1
  157. package/dist/components/mentions/index.mjs +1 -1
  158. package/dist/components/menu/index.d.mts +29 -11
  159. package/dist/components/menu/index.mjs +35 -13
  160. package/dist/components/menubar/index.d.mts +3 -1
  161. package/dist/components/menubar/index.mjs +7 -2
  162. package/dist/components/meter/index.mjs +1 -1
  163. package/dist/components/navigation-menu/index.d.mts +25 -1
  164. package/dist/components/navigation-menu/index.mjs +37 -2
  165. package/dist/components/number-input/index.d.mts +28 -6
  166. package/dist/components/number-input/index.mjs +34 -9
  167. package/dist/components/order-list/index.d.mts +4 -1
  168. package/dist/components/order-list/index.mjs +27 -25
  169. package/dist/components/page-header/index.mjs +1 -1
  170. package/dist/components/pagination/index.d.mts +23 -3
  171. package/dist/components/pagination/index.mjs +58 -13
  172. package/dist/components/password-input/index.d.mts +24 -6
  173. package/dist/components/password-input/index.mjs +32 -9
  174. package/dist/components/pin-input/index.d.mts +23 -5
  175. package/dist/components/pin-input/index.mjs +30 -8
  176. package/dist/components/popconfirm/index.d.mts +9 -5
  177. package/dist/components/popconfirm/index.mjs +24 -19
  178. package/dist/components/popover/index.d.mts +2 -8
  179. package/dist/components/popover/index.mjs +45 -5
  180. package/dist/components/presence/index.d.mts +10 -2
  181. package/dist/components/presence/index.mjs +6 -1
  182. package/dist/components/progress/index.d.mts +18 -3
  183. package/dist/components/progress/index.mjs +35 -10
  184. package/dist/components/progress-group/index.d.mts +4 -1
  185. package/dist/components/progress-group/index.mjs +5 -3
  186. package/dist/components/qr-code/index.d.mts +14 -1
  187. package/dist/components/qr-code/index.mjs +27 -3
  188. package/dist/components/radio-group/index.d.mts +27 -2
  189. package/dist/components/radio-group/index.mjs +33 -9
  190. package/dist/components/rating-group/index.d.mts +20 -3
  191. package/dist/components/rating-group/index.mjs +27 -9
  192. package/dist/components/result/index.d.mts +1 -1
  193. package/dist/components/result/index.mjs +3 -3
  194. package/dist/components/scroll-area/index.d.mts +14 -1
  195. package/dist/components/scroll-area/index.mjs +33 -3
  196. package/dist/components/segment-group/index.d.mts +28 -2
  197. package/dist/components/segment-group/index.mjs +35 -8
  198. package/dist/components/select/index.d.mts +2 -2
  199. package/dist/components/select/index.mjs +1 -1
  200. package/dist/components/separator/index.d.mts +4 -1
  201. package/dist/components/separator/index.mjs +4 -2
  202. package/dist/components/signature-pad/index.d.mts +25 -5
  203. package/dist/components/signature-pad/index.mjs +38 -4
  204. package/dist/components/skeleton/index.d.mts +4 -1
  205. package/dist/components/skeleton/index.mjs +4 -2
  206. package/dist/components/slider/index.d.mts +21 -2
  207. package/dist/components/slider/index.mjs +32 -9
  208. package/dist/components/spinner/index.d.mts +4 -1
  209. package/dist/components/spinner/index.mjs +4 -2
  210. package/dist/components/split-button/index.d.mts +3 -1
  211. package/dist/components/split-button/index.mjs +13 -18
  212. package/dist/components/splitter/index.d.mts +17 -4
  213. package/dist/components/splitter/index.mjs +36 -2
  214. package/dist/components/spotlight/index.d.mts +4 -1
  215. package/dist/components/spotlight/index.mjs +4 -2
  216. package/dist/components/stack/index.d.mts +4 -1
  217. package/dist/components/stack/index.mjs +7 -5
  218. package/dist/components/stat/index.mjs +1 -1
  219. package/dist/components/steps/index.d.mts +26 -6
  220. package/dist/components/steps/index.mjs +27 -12
  221. package/dist/components/swap/index.d.mts +11 -5
  222. package/dist/components/swap/index.mjs +31 -4
  223. package/dist/components/switch/index.d.mts +20 -2
  224. package/dist/components/switch/index.mjs +28 -9
  225. package/dist/components/table/index.d.mts +4 -1
  226. package/dist/components/table/index.mjs +38 -60
  227. package/dist/components/tabs/index.d.mts +24 -2
  228. package/dist/components/tabs/index.mjs +26 -10
  229. package/dist/components/tags-input/index.d.mts +33 -8
  230. package/dist/components/tags-input/index.mjs +42 -10
  231. package/dist/components/terminal/index.d.mts +4 -1
  232. package/dist/components/terminal/index.mjs +4 -2
  233. package/dist/components/textarea/index.d.mts +4 -1
  234. package/dist/components/textarea/index.mjs +4 -2
  235. package/dist/components/timeline/index.mjs +1 -1
  236. package/dist/components/timer/index.d.mts +18 -1
  237. package/dist/components/timer/index.mjs +52 -3
  238. package/dist/components/toast/index.d.mts +3 -6
  239. package/dist/components/toast/index.mjs +23 -3
  240. package/dist/components/toc/index.d.mts +19 -5
  241. package/dist/components/toc/index.mjs +32 -6
  242. package/dist/components/toggle/index.d.mts +11 -4
  243. package/dist/components/toggle/index.mjs +22 -2
  244. package/dist/components/toggle-group/index.d.mts +26 -2
  245. package/dist/components/toggle-group/index.mjs +32 -7
  246. package/dist/components/toolbar/index.d.mts +4 -1
  247. package/dist/components/toolbar/index.mjs +4 -2
  248. package/dist/components/tooltip/index.d.mts +17 -4
  249. package/dist/components/tooltip/index.mjs +29 -2
  250. package/dist/components/tour/index.d.mts +18 -9
  251. package/dist/components/tour/index.mjs +45 -3
  252. package/dist/components/transfer/index.d.mts +3 -1
  253. package/dist/components/transfer/index.mjs +15 -27
  254. package/dist/components/tree-select/index.d.mts +3 -1
  255. package/dist/components/tree-select/index.mjs +12 -23
  256. package/dist/components/tree-view/index.d.mts +22 -2
  257. package/dist/components/tree-view/index.mjs +51 -9
  258. package/dist/components/typography/index.d.mts +4 -0
  259. package/dist/components/typography/index.mjs +2 -1
  260. package/dist/components/user/index.d.mts +4 -1
  261. package/dist/components/user/index.mjs +4 -2
  262. package/dist/components/virtual-list/index.d.mts +4 -1
  263. package/dist/components/virtual-list/index.mjs +11 -13
  264. package/dist/components/watermark/index.d.mts +4 -1
  265. package/dist/components/watermark/index.mjs +5 -3
  266. package/dist/family-DE_GQeeM.mjs +9 -0
  267. package/dist/icon-BALgGtNK.mjs +18 -0
  268. package/dist/id-C37UYLwJ.mjs +13 -0
  269. package/dist/image-viewer-B-hKFkEw.mjs +141 -0
  270. package/dist/{index-Dn5mHf1g.d.mts → index-B4twHAQC.d.mts} +194 -106
  271. package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
  272. package/dist/index-BcRdWGY-.d.mts +115 -0
  273. package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
  274. package/dist/index-Dj8S4eyJ.d.mts +41 -0
  275. package/dist/index-Eu-Bttta.d.mts +24 -0
  276. package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
  277. package/dist/index.d.mts +36 -35
  278. package/dist/index.mjs +11 -10
  279. package/dist/{input-2oezH-dY.mjs → input-BDpQ0e6G.mjs} +4 -2
  280. package/dist/media-player-DjVvo1_7.mjs +554 -0
  281. package/dist/{mentions-DMIBCBOd.mjs → mentions-BwnyvdXz.mjs} +75 -43
  282. package/dist/select-i9UZsQCU.mjs +121 -0
  283. package/package.json +9 -81
  284. package/dist/chevron-BeHvt46K.mjs +0 -17
  285. package/dist/glyph-VI989p8H.mjs +0 -14
  286. package/dist/select-eAHutw56.mjs +0 -70
@@ -1,25 +1,67 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
3
- import { ColorPicker as ColorPicker$1 } from "@ark-ui/react/color-picker";
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { ColorPicker as ColorPicker$1, parseColor } from "@ark-ui/react/color-picker";
4
6
  //#region src/components/color-picker/index.tsx
5
- function ColorPickerRoot({ size = "md", ...rest }) {
7
+ function ColorPickerRoot(props) {
8
+ injectComponentStyle("color-picker");
9
+ const id = useElementId("color-picker", props);
10
+ const { size = "md", ...rest } = props;
6
11
  return /* @__PURE__ */ jsx(ColorPicker$1.Root, {
7
12
  ...rest,
13
+ id,
8
14
  "data-size": size
9
15
  });
10
16
  }
11
- /** Ark's ColorPicker, dressed in the paper-and-ink system: a seal-sized swatch
12
- * on the paper, opening into an area and channel sliders where pigment is
13
- * picked. The API is Ark's own — Root, Label, Control, Trigger, Positioner,
14
- * Content, Area, AreaThumb, AreaBackground, ValueText, ValueSwatch,
15
- * ChannelSlider, ChannelSliderLabel, ChannelSliderTrack, ChannelSliderThumb,
16
- * ChannelSliderValueText, ChannelInput, TransparencyGrid, SwatchGroup,
17
- * SwatchTrigger, SwatchIndicator, Swatch, EyeDropperTrigger, FormatTrigger,
18
- * FormatSelect, HiddenInput, Context. */
19
- const ColorPicker = {
17
+ /** The complete picker behind one color: the hex input rides beside the
18
+ * swatch trigger, while the popup carries the area and hue/alpha tracks.
19
+ * Saved swatches and format switches remain anatomy work. */
20
+ function ColorPickerFacade(props) {
21
+ const { value, defaultValue, disabled, invalid, required, label, size = "md", className, style, onValueChange } = props;
22
+ const toColor = (color) => typeof color === "string" ? parseColor(color) : color;
23
+ return /* @__PURE__ */ jsxs(ColorPickerRoot, {
24
+ size,
25
+ defaultValue: toColor(defaultValue),
26
+ value: toColor(value),
27
+ disabled,
28
+ invalid,
29
+ required,
30
+ className,
31
+ style,
32
+ onValueChange: (event) => onValueChange?.(event.value),
33
+ children: [
34
+ label ? /* @__PURE__ */ jsx(ColorPicker$1.Label, { children: label }) : null,
35
+ /* @__PURE__ */ jsxs(ColorPicker$1.Control, { children: [/* @__PURE__ */ jsx(ColorPicker$1.ChannelInput, { channel: "hex" }), /* @__PURE__ */ jsxs(ColorPicker$1.Trigger, { children: [/* @__PURE__ */ jsx(ColorPicker$1.TransparencyGrid, {}), /* @__PURE__ */ jsx(ColorPicker$1.ValueSwatch, {})] })] }),
36
+ /* @__PURE__ */ jsx(ColorPicker$1.Positioner, { children: /* @__PURE__ */ jsxs(ColorPicker$1.Content, { children: [/* @__PURE__ */ jsxs(ColorPicker$1.Area, { children: [/* @__PURE__ */ jsx(ColorPicker$1.AreaBackground, {}), /* @__PURE__ */ jsx(ColorPicker$1.AreaThumb, {})] }), /* @__PURE__ */ jsxs("div", {
37
+ "data-scope": "color-picker",
38
+ "data-part": "channel-controls",
39
+ children: [/* @__PURE__ */ jsx(ColorPicker$1.EyeDropperTrigger, { children: iconNode("pipette", {
40
+ width: 14,
41
+ height: 14
42
+ }) }), /* @__PURE__ */ jsxs("div", {
43
+ "data-scope": "color-picker",
44
+ "data-part": "channel-sliders",
45
+ children: [/* @__PURE__ */ jsxs(ColorPicker$1.ChannelSlider, {
46
+ channel: "hue",
47
+ children: [/* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderTrack, {}), /* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderThumb, {})]
48
+ }), /* @__PURE__ */ jsxs(ColorPicker$1.ChannelSlider, {
49
+ channel: "alpha",
50
+ children: [
51
+ /* @__PURE__ */ jsx(ColorPicker$1.TransparencyGrid, {}),
52
+ /* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderTrack, {}),
53
+ /* @__PURE__ */ jsx(ColorPicker$1.ChannelSliderThumb, {})
54
+ ]
55
+ })]
56
+ })]
57
+ })] }) }),
58
+ /* @__PURE__ */ jsx(ColorPicker$1.HiddenInput, {})
59
+ ]
60
+ });
61
+ }
62
+ const ColorPicker = Object.assign(ColorPickerFacade, {
20
63
  ...ColorPicker$1,
21
64
  Root: ColorPickerRoot
22
- };
23
- injectComponentStyle("color-picker");
65
+ });
24
66
  //#endregion
25
67
  export { ColorPicker };
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from "react";
1
2
  import { CollectionItem } from "@ark-ui/react/collection";
2
3
  import { Combobox as Combobox$1, ComboboxRootComponentProps } from "@ark-ui/react/combobox";
3
4
  //#region src/components/combobox/index.d.ts
@@ -11,7 +12,32 @@ type ComboboxOwnProps = {
11
12
  size?: "sm" | "md" | "lg";
12
13
  };
13
14
  declare function ComboboxRoot<T extends CollectionItem>(props: ComboboxRootComponentProps<T, ComboboxOwnProps>): import("react").JSX.Element;
14
- export declare const Combobox: Omit<typeof Combobox$1, "Root"> & {
15
+ type ComboboxOption = {
16
+ label: string;
17
+ value: string;
18
+ };
19
+ type ComboboxFacadeValue = string | string[];
20
+ type ComboboxFacadeProps = {
21
+ value?: ComboboxFacadeValue;
22
+ defaultValue?: ComboboxFacadeValue;
23
+ options: ComboboxOption[];
24
+ multiple?: boolean;
25
+ /** Show the clear-value control when the machine allows it. */
26
+ clearable?: boolean;
27
+ disabled?: boolean;
28
+ invalid?: boolean;
29
+ required?: boolean;
30
+ label?: string;
31
+ placeholder?: string;
32
+ size?: "sm" | "md" | "lg";
33
+ className?: string;
34
+ style?: CSSProperties;
35
+ onValueChange?: (value?: ComboboxFacadeValue) => void;
36
+ };
37
+ /** The complete combobox behind one model value: options become the vessel's
38
+ * rows while typing, clearing, and selection stay on the common field path. */
39
+ declare function ComboboxFacade(props: ComboboxFacadeProps): import("react").JSX.Element;
40
+ export declare const Combobox: typeof ComboboxFacade & Omit<typeof Combobox$1, "Root"> & {
15
41
  Root: typeof ComboboxRoot;
16
42
  };
17
43
  //#endregion
@@ -1,18 +1,75 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
3
- import { Combobox as Combobox$1 } from "@ark-ui/react/combobox";
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { Combobox as Combobox$1, createListCollection } from "@ark-ui/react/combobox";
4
6
  //#region src/components/combobox/index.tsx
5
7
  function ComboboxRoot(props) {
8
+ injectComponentStyle("combobox");
9
+ const id = useElementId("combobox", props);
6
10
  const { size = "md", ...rest } = props;
7
11
  return /* @__PURE__ */ jsx(Combobox$1.Root, {
8
12
  ...rest,
13
+ id,
9
14
  "data-size": size
10
15
  });
11
16
  }
12
- const Combobox = {
17
+ function toComboboxValue(value) {
18
+ if (value === void 0) return void 0;
19
+ return Array.isArray(value) ? value : [value];
20
+ }
21
+ function fromComboboxValue(value, multiple) {
22
+ return multiple ? value : value.at(0);
23
+ }
24
+ /** The complete combobox behind one model value: options become the vessel's
25
+ * rows while typing, clearing, and selection stay on the common field path. */
26
+ function ComboboxFacade(props) {
27
+ const { value, defaultValue, options, multiple, clearable = true, disabled, invalid, required, label, placeholder, size = "md", className, style, onValueChange } = props;
28
+ const collection = createListCollection({ items: options });
29
+ return /* @__PURE__ */ jsxs(ComboboxRoot, {
30
+ size,
31
+ collection,
32
+ defaultValue: toComboboxValue(defaultValue),
33
+ value: toComboboxValue(value),
34
+ disabled,
35
+ invalid,
36
+ multiple,
37
+ placeholder,
38
+ required,
39
+ lazyMount: true,
40
+ unmountOnExit: true,
41
+ className,
42
+ style,
43
+ onValueChange: (event) => onValueChange?.(fromComboboxValue(event.value, multiple)),
44
+ children: [
45
+ label ? /* @__PURE__ */ jsx(Combobox$1.Label, { children: label }) : null,
46
+ /* @__PURE__ */ jsxs(Combobox$1.Control, { children: [
47
+ /* @__PURE__ */ jsx(Combobox$1.Input, {
48
+ placeholder,
49
+ "aria-label": label ? void 0 : placeholder
50
+ }),
51
+ clearable ? /* @__PURE__ */ jsx(Combobox$1.ClearTrigger, { children: iconNode("x", {
52
+ width: 14,
53
+ height: 14
54
+ }) }) : null,
55
+ /* @__PURE__ */ jsx(Combobox$1.Trigger, { children: iconNode("chevron-down", {
56
+ width: 16,
57
+ height: 16
58
+ }) })
59
+ ] }),
60
+ /* @__PURE__ */ jsx(Combobox$1.Positioner, { children: /* @__PURE__ */ jsxs(Combobox$1.Content, { children: [/* @__PURE__ */ jsx(Combobox$1.Empty, { children: "No results found" }), /* @__PURE__ */ jsx(Combobox$1.List, { children: collection.items.map((item) => /* @__PURE__ */ jsxs(Combobox$1.Item, {
61
+ item,
62
+ children: [/* @__PURE__ */ jsx(Combobox$1.ItemText, { children: item.label }), /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: iconNode("check", {
63
+ width: 14,
64
+ height: 14
65
+ }) })]
66
+ }, item.value)) })] }) })
67
+ ]
68
+ });
69
+ }
70
+ const Combobox = Object.assign(ComboboxFacade, {
13
71
  ...Combobox$1,
14
72
  Root: ComboboxRoot
15
- };
16
- injectComponentStyle("combobox");
73
+ });
17
74
  //#endregion
18
75
  export { Combobox };
@@ -1,3 +1,4 @@
1
+ import { Dialog } from "../dialog/index.mjs";
1
2
  //#region src/components/command/index.d.ts
2
3
  export interface CommandEntry {
3
4
  label: string;
@@ -17,6 +18,7 @@ export interface CommandEntry {
17
18
  * grafts onto the sheet's list.
18
19
  */
19
20
  export interface CommandProps {
21
+ id?: string;
20
22
  /** The commands on offer, grouped as they arrive. */
21
23
  items?: CommandEntry[];
22
24
  placeholder?: string;
@@ -39,5 +41,6 @@ export interface CommandProps {
39
41
  /** Reports the field's live text. */
40
42
  onInputValueChange?: (value: string) => void;
41
43
  }
42
- export declare function Command({ items, placeholder, open, autoFilter, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange }: CommandProps): import("react").JSX.Element;
44
+ declare function CommandImpl({ items, placeholder, open, autoFilter, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange, id }: CommandProps): import("react").JSX.Element;
45
+ export declare const Command: typeof CommandImpl & typeof Dialog;
43
46
  //#endregion
@@ -1,5 +1,7 @@
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
2
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
+ import { Dialog as Dialog$1 } from "../dialog/index.mjs";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
3
5
  import { jsx, jsxs } from "react/jsx-runtime";
4
6
  import { useEffect, useState } from "react";
5
7
  import { Portal } from "@ark-ui/react/portal";
@@ -7,9 +9,10 @@ import { useListCollection } from "@ark-ui/react/collection";
7
9
  import { Combobox } from "@ark-ui/react/combobox";
8
10
  import { Dialog } from "@ark-ui/react/dialog";
9
11
  //#region src/components/command/index.tsx
10
- function Command({ items = [], placeholder, open, autoFilter = true, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange }) {
12
+ function CommandImpl({ items = [], placeholder, open, autoFilter = true, inputValue, emptyText, onSelect, onOpenChange, onInputValueChange, id }) {
11
13
  injectComponentStyle("command");
12
14
  injectComponentStyle("dialog");
15
+ const hostId = useElementId("command", { id });
13
16
  const messages = useComponentMessages();
14
17
  const resolvedPlaceholder = placeholder ?? messages.command.search;
15
18
  const resolvedEmptyText = emptyText ?? messages.command.noMatches;
@@ -66,6 +69,7 @@ function Command({ items = [], placeholder, open, autoFilter = true, inputValue,
66
69
  })
67
70
  }, entry.value);
68
71
  return /* @__PURE__ */ jsx(Dialog.Root, {
72
+ id: `${hostId}:dialog`,
69
73
  open: currentOpen,
70
74
  onOpenChange: (details) => setOpen(details.open),
71
75
  children: /* @__PURE__ */ jsxs(Portal, { children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {}), /* @__PURE__ */ jsx(Dialog.Positioner, {
@@ -80,6 +84,7 @@ function Command({ items = [], placeholder, open, autoFilter = true, inputValue,
80
84
  "data-part": "content",
81
85
  "aria-label": messages.command.palette,
82
86
  children: /* @__PURE__ */ jsxs(Combobox.Root, {
87
+ id: `${hostId}:combobox`,
83
88
  collection,
84
89
  inputValue,
85
90
  open: listOpen,
@@ -139,5 +144,6 @@ function Command({ items = [], placeholder, open, autoFilter = true, inputValue,
139
144
  })] })
140
145
  });
141
146
  }
147
+ const Command = Object.assign(CommandImpl, Dialog$1);
142
148
  //#endregion
143
149
  export { Command };
@@ -13,5 +13,8 @@ export interface CommentProps extends HTMLAttributes<HTMLElement> {
13
13
  /** The row of answers beneath the ink. */
14
14
  actions?: ReactNode;
15
15
  }
16
- export declare function Comment({ author, datetime, avatar, actions, children, ...rest }: CommentProps): import("react").JSX.Element;
16
+ declare function CommentImpl({ author, datetime, avatar, actions, children, ...rest }: CommentProps): import("react").JSX.Element;
17
+ export declare const Comment: typeof CommentImpl & {
18
+ Root: typeof CommentImpl;
19
+ };
17
20
  //#endregion
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx, jsxs } from "react/jsx-runtime";
3
4
  //#region src/components/comment/index.tsx
4
- function Comment({ author, datetime, avatar, actions, children, ...rest }) {
5
+ function CommentImpl({ author, datetime, avatar, actions, children, ...rest }) {
5
6
  injectComponentStyle("comment");
6
7
  return /* @__PURE__ */ jsxs("article", {
7
8
  ...rest,
@@ -43,5 +44,6 @@ function Comment({ author, datetime, avatar, actions, children, ...rest }) {
43
44
  })]
44
45
  });
45
46
  }
47
+ const Comment = withSelfRoot(CommentImpl);
46
48
  //#endregion
47
49
  export { Comment };
@@ -45,5 +45,8 @@ export interface ConfigProviderProps extends HTMLAttributes<HTMLDivElement> {
45
45
  * descendants through `useConfig`, so interactive behavior (formatting,
46
46
  * messages) and visual theming stay one decision.
47
47
  */
48
- export declare function ConfigProvider({ density, scene, accent, dir, locale, messages, children, ...rest }: ConfigProviderProps): import("react").JSX.Element;
48
+ declare function ConfigProviderImpl({ density, scene, accent, dir, locale, messages, children, ...rest }: ConfigProviderProps): import("react").JSX.Element;
49
+ export declare const ConfigProvider: typeof ConfigProviderImpl & {
50
+ Root: typeof ConfigProviderImpl;
51
+ };
49
52
  //#endregion
@@ -1,3 +1,4 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import { createContext, useContext } from "react";
3
4
  //#region src/components/config-provider/index.tsx
@@ -15,7 +16,7 @@ function useConfig() {
15
16
  * descendants through `useConfig`, so interactive behavior (formatting,
16
17
  * messages) and visual theming stay one decision.
17
18
  */
18
- function ConfigProvider({ density, scene, accent, dir, locale, messages, children, ...rest }) {
19
+ function ConfigProviderImpl({ density, scene, accent, dir, locale, messages, children, ...rest }) {
19
20
  return /* @__PURE__ */ jsx(ConfigContextImpl.Provider, {
20
21
  value: {
21
22
  density,
@@ -38,5 +39,6 @@ function ConfigProvider({ density, scene, accent, dir, locale, messages, childre
38
39
  })
39
40
  });
40
41
  }
42
+ const ConfigProvider = withSelfRoot(ConfigProviderImpl);
41
43
  //#endregion
42
44
  export { ConfigProvider, useConfig };
@@ -9,5 +9,8 @@ export interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
9
9
  * than the measure. */
10
10
  padding?: boolean;
11
11
  }
12
- export declare function Container({ size, padding, ...rest }: ContainerProps): import("react").JSX.Element;
12
+ declare function ContainerImpl({ size, padding, ...rest }: ContainerProps): import("react").JSX.Element;
13
+ export declare const Container: typeof ContainerImpl & {
14
+ Root: typeof ContainerImpl;
15
+ };
13
16
  //#endregion
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/container/index.tsx
4
- function Container({ size = "readable", padding = true, ...rest }) {
5
+ function ContainerImpl({ size = "readable", padding = true, ...rest }) {
5
6
  injectComponentStyle("container");
6
7
  return /* @__PURE__ */ jsx("div", {
7
8
  ...rest,
@@ -11,5 +12,6 @@ function Container({ size = "readable", padding = true, ...rest }) {
11
12
  "data-padding": padding ? "" : void 0
12
13
  });
13
14
  }
15
+ const Container = withSelfRoot(ContainerImpl);
14
16
  //#endregion
15
17
  export { Container };
@@ -14,5 +14,8 @@ export interface DataViewProps extends HTMLAttributes<HTMLDivElement> {
14
14
  * renderItem, the view lays the records out as a ledger or a lattice
15
15
  * and — when a page size is given — pages them with the pagination
16
16
  * family's own parts rather than a second implementation. */
17
- export declare function DataView({ items, layout, pageSize, renderItem, header, ...rest }: DataViewProps): import("react").JSX.Element;
17
+ declare function DataViewImpl({ items, layout, pageSize, renderItem, header, ...rest }: DataViewProps): import("react").JSX.Element;
18
+ export declare const DataView: typeof DataViewImpl & {
19
+ Root: typeof DataViewImpl;
20
+ };
18
21
  //#endregion
@@ -1,6 +1,7 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
3
  import { Pagination } from "../pagination/index.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { useState } from "react";
6
7
  //#region src/components/data-view/index.tsx
@@ -8,7 +9,7 @@ import { useState } from "react";
8
9
  * renderItem, the view lays the records out as a ledger or a lattice
9
10
  * and — when a page size is given — pages them with the pagination
10
11
  * family's own parts rather than a second implementation. */
11
- function DataView({ items, layout = "list", pageSize, renderItem, header, ...rest }) {
12
+ function DataViewImpl({ items, layout = "list", pageSize, renderItem, header, ...rest }) {
12
13
  injectComponentStyle("data-view");
13
14
  const [page, setPage] = useState(1);
14
15
  const messages = useComponentMessages();
@@ -62,5 +63,6 @@ function DataView({ items, layout = "list", pageSize, renderItem, header, ...res
62
63
  ]
63
64
  });
64
65
  }
66
+ const DataView = withSelfRoot(DataViewImpl);
65
67
  //#endregion
66
68
  export { DataView };
@@ -1,16 +1,31 @@
1
- import { ComponentProps } from "react";
2
- import { DateInput as DateInput$1, DateInputFocusChangeDetails, DateInputValueChangeDetails } from "@ark-ui/react/date-input";
1
+ import { CSSProperties, ComponentProps } from "react";
2
+ import { DateInput as DateInput$1, DateInputDateValue, DateInputFocusChangeDetails, DateInputValueChangeDetails } from "@ark-ui/react/date-input";
3
3
  //#region src/components/date-input/index.d.ts
4
4
  type DateInputRootProps = ComponentProps<typeof DateInput$1.Root> & {
5
5
  /** One rung of the control-height ladder for the segmented field. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function DateInputRoot({ size, ...rest }: DateInputRootProps): import("react").JSX.Element;
8
+ declare function DateInputRoot(props: DateInputRootProps): import("react").JSX.Element;
9
9
  /** Ark's DateInput, dressed in the paper-and-ink system: a segmented
10
10
  * field where the focused segment takes the flat ink fill. The API is
11
11
  * Ark's own — Root, Label, Control, SegmentGroup, Segment, SegmentContext,
12
12
  * HiddenInput. */
13
- export declare const DateInput: Omit<typeof DateInput$1, "Root"> & {
13
+ type DateInputFacadeValue = DateInputDateValue | DateInputDateValue[];
14
+ type DateInputFacadeProps = {
15
+ value?: DateInputFacadeValue;
16
+ defaultValue?: DateInputFacadeValue;
17
+ disabled?: boolean;
18
+ invalid?: boolean;
19
+ required?: boolean;
20
+ label?: string;
21
+ size?: "sm" | "md" | "lg";
22
+ className?: string;
23
+ style?: CSSProperties;
24
+ onValueChange?: (value: DateInputDateValue[]) => void;
25
+ };
26
+ /** The complete segmented date field behind one model value. */
27
+ declare function DateInputFacade(props: DateInputFacadeProps): import("react").JSX.Element;
28
+ export declare const DateInput: typeof DateInputFacade & Omit<typeof DateInput$1, "Root"> & {
14
29
  Root: typeof DateInputRoot;
15
30
  };
16
31
  //#endregion
@@ -1,21 +1,45 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
1
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
3
4
  import { DateInput as DateInput$1 } from "@ark-ui/react/date-input";
4
5
  //#region src/components/date-input/index.tsx
5
- function DateInputRoot({ size = "md", ...rest }) {
6
+ function DateInputRoot(props) {
7
+ injectComponentStyle("date-input");
8
+ const id = useElementId("date-input", props);
9
+ const { size = "md", ...rest } = props;
6
10
  return /* @__PURE__ */ jsx(DateInput$1.Root, {
7
11
  ...rest,
12
+ id,
8
13
  "data-size": size
9
14
  });
10
15
  }
11
- /** Ark's DateInput, dressed in the paper-and-ink system: a segmented
12
- * field where the focused segment takes the flat ink fill. The API is
13
- * Ark's own — Root, Label, Control, SegmentGroup, Segment, SegmentContext,
14
- * HiddenInput. */
15
- const DateInput = {
16
+ function toDateInputValue(value) {
17
+ if (value === void 0) return void 0;
18
+ return Array.isArray(value) ? value : [value];
19
+ }
20
+ /** The complete segmented date field behind one model value. */
21
+ function DateInputFacade(props) {
22
+ const { value, defaultValue, disabled, invalid, required, label, size = "md", className, style, onValueChange } = props;
23
+ return /* @__PURE__ */ jsxs(DateInputRoot, {
24
+ size,
25
+ defaultValue: toDateInputValue(defaultValue),
26
+ value: toDateInputValue(value),
27
+ disabled,
28
+ invalid,
29
+ required,
30
+ className,
31
+ style,
32
+ onValueChange: (event) => onValueChange?.(event.value),
33
+ children: [
34
+ label ? /* @__PURE__ */ jsx(DateInput$1.Label, { children: label }) : null,
35
+ /* @__PURE__ */ jsx(DateInput$1.Control, { children: /* @__PURE__ */ jsx(DateInput$1.SegmentGroup, { children: /* @__PURE__ */ jsx(DateInput$1.SegmentContext, { children: (segmentProps) => /* @__PURE__ */ jsx(DateInput$1.Segment, { segment: segmentProps }) }) }) }),
36
+ /* @__PURE__ */ jsx(DateInput$1.HiddenInput, {})
37
+ ]
38
+ });
39
+ }
40
+ const DateInput = Object.assign(DateInputFacade, {
16
41
  ...DateInput$1,
17
42
  Root: DateInputRoot
18
- };
19
- injectComponentStyle("date-input");
43
+ });
20
44
  //#endregion
21
45
  export { DateInput };
@@ -1,18 +1,35 @@
1
- import { ComponentProps } from "react";
2
- import { DatePicker as DatePicker$1, DatePickerFocusChangeDetails, DatePickerOpenChangeDetails, DatePickerValueChangeDetails, DatePickerViewChangeDetails, DatePickerVisibleRangeChangeDetails } from "@ark-ui/react/date-picker";
1
+ import { CSSProperties, ComponentProps } from "react";
2
+ import { DatePicker as DatePicker$1, DatePickerFocusChangeDetails, DatePickerOpenChangeDetails, DatePickerValueChangeDetails, DatePickerViewChangeDetails, DatePickerVisibleRangeChangeDetails, DateValue } from "@ark-ui/react/date-picker";
3
3
  //#region src/components/date-picker/index.d.ts
4
4
  type DatePickerRootProps$1 = ComponentProps<typeof DatePicker$1.Root> & {
5
5
  /** One rung of the control-height ladder for the field row. */
6
6
  size?: "sm" | "md" | "lg";
7
7
  };
8
- declare function DatePickerRoot({ size, ...rest }: DatePickerRootProps$1): import("react").JSX.Element;
8
+ declare function DatePickerRoot(props: DatePickerRootProps$1): import("react").JSX.Element;
9
9
  /** Ark's DatePicker, dressed in the paper-and-ink system: the popup
10
10
  * dissolves in on elevation, selected days take the flat ink fill, and
11
11
  * range middles run subtle with cut corners. The API is Ark's own —
12
12
  * Root, Label, Control, Input, Trigger, ClearTrigger, Positioner,
13
13
  * Content, View, ViewControl, ViewTrigger, RangeText, PrevTrigger,
14
14
  * NextTrigger, Table*, MonthSelect, YearSelect, PresetTrigger. */
15
- export declare const DatePicker: Omit<typeof DatePicker$1, "Root"> & {
15
+ type DatePickerFacadeValue = DateValue | DateValue[];
16
+ type DatePickerFacadeProps = {
17
+ value?: DatePickerFacadeValue;
18
+ defaultValue?: DatePickerFacadeValue;
19
+ disabled?: boolean;
20
+ invalid?: boolean;
21
+ required?: boolean;
22
+ label?: string;
23
+ placeholder?: string;
24
+ size?: "sm" | "md" | "lg";
25
+ className?: string;
26
+ style?: CSSProperties;
27
+ onValueChange?: (value: DateValue[]) => void;
28
+ };
29
+ /** The complete picker behind one date: the field opens a single day grid,
30
+ * while ranges, multiple selection, and custom views remain anatomy work. */
31
+ declare function DatePickerFacade(props: DatePickerFacadeProps): import("react").JSX.Element;
32
+ export declare const DatePicker: typeof DatePickerFacade & Omit<typeof DatePicker$1, "Root"> & {
16
33
  Root: typeof DatePickerRoot;
17
34
  };
18
35
  //#endregion
@@ -1,23 +1,70 @@
1
- import { injectComponentStyle } from "@bysages/core";
2
- import { jsx } from "react/jsx-runtime";
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
5
  import { DatePicker as DatePicker$1 } from "@ark-ui/react/date-picker";
4
6
  //#region src/components/date-picker/index.tsx
5
- function DatePickerRoot({ size = "md", ...rest }) {
7
+ function DatePickerRoot(props) {
8
+ injectComponentStyle("date-picker");
9
+ const id = useElementId("date-picker", props);
10
+ const { size = "md", ...rest } = props;
6
11
  return /* @__PURE__ */ jsx(DatePicker$1.Root, {
7
12
  ...rest,
13
+ id,
8
14
  "data-size": size
9
15
  });
10
16
  }
11
- /** Ark's DatePicker, dressed in the paper-and-ink system: the popup
12
- * dissolves in on elevation, selected days take the flat ink fill, and
13
- * range middles run subtle with cut corners. The API is Ark's own —
14
- * Root, Label, Control, Input, Trigger, ClearTrigger, Positioner,
15
- * Content, View, ViewControl, ViewTrigger, RangeText, PrevTrigger,
16
- * NextTrigger, Table*, MonthSelect, YearSelect, PresetTrigger. */
17
- const DatePicker = {
17
+ function toDatePickerValue(value) {
18
+ if (value === void 0) return void 0;
19
+ return Array.isArray(value) ? value : [value];
20
+ }
21
+ /** The complete picker behind one date: the field opens a single day grid,
22
+ * while ranges, multiple selection, and custom views remain anatomy work. */
23
+ function DatePickerFacade(props) {
24
+ const { value, defaultValue, disabled, invalid, required, label, placeholder, size = "md", className, style, onValueChange } = props;
25
+ return /* @__PURE__ */ jsxs(DatePickerRoot, {
26
+ size,
27
+ defaultValue: toDatePickerValue(defaultValue),
28
+ value: toDatePickerValue(value),
29
+ disabled,
30
+ invalid,
31
+ placeholder,
32
+ required,
33
+ className,
34
+ style,
35
+ onValueChange: (event) => onValueChange?.(event.value),
36
+ children: [
37
+ label ? /* @__PURE__ */ jsx(DatePicker$1.Label, { children: label }) : null,
38
+ /* @__PURE__ */ jsxs(DatePicker$1.Control, { children: [/* @__PURE__ */ jsx(DatePicker$1.Input, { "aria-label": label ? void 0 : placeholder }), /* @__PURE__ */ jsx(DatePicker$1.Trigger, { children: iconNode("calendar", {
39
+ width: 16,
40
+ height: 16
41
+ }) })] }),
42
+ /* @__PURE__ */ jsx(DatePicker$1.Positioner, { children: /* @__PURE__ */ jsx(DatePicker$1.Content, { children: /* @__PURE__ */ jsx(DatePicker$1.View, {
43
+ view: "day",
44
+ children: /* @__PURE__ */ jsx(DatePicker$1.Context, { children: (dp) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(DatePicker$1.ViewControl, { children: [
45
+ /* @__PURE__ */ jsx(DatePicker$1.PrevTrigger, { children: iconNode("chevron-left", {
46
+ width: 14,
47
+ height: 14
48
+ }) }),
49
+ /* @__PURE__ */ jsx(DatePicker$1.ViewTrigger, { children: /* @__PURE__ */ jsx(DatePicker$1.RangeText, {}) }),
50
+ /* @__PURE__ */ jsx(DatePicker$1.NextTrigger, { children: iconNode("chevron-right", {
51
+ width: 14,
52
+ height: 14
53
+ }) })
54
+ ] }), /* @__PURE__ */ jsxs(DatePicker$1.Table, { children: [/* @__PURE__ */ jsx(DatePicker$1.TableHead, { children: /* @__PURE__ */ jsx(DatePicker$1.TableRow, { children: dp.weekDays.map((day, index) => /* @__PURE__ */ jsx(DatePicker$1.TableHeader, {
55
+ "aria-label": day.long,
56
+ children: day.narrow
57
+ }, index)) }) }), /* @__PURE__ */ jsx(DatePicker$1.TableBody, { children: dp.weeks.map((week, index) => /* @__PURE__ */ jsx(DatePicker$1.TableRow, { children: week.map((day, dayIndex) => /* @__PURE__ */ jsx(DatePicker$1.TableCell, {
58
+ value: day,
59
+ children: /* @__PURE__ */ jsx(DatePicker$1.TableCellTrigger, { children: day.day })
60
+ }, dayIndex)) }, index)) })] })] }) })
61
+ }) }) })
62
+ ]
63
+ });
64
+ }
65
+ const DatePicker = Object.assign(DatePickerFacade, {
18
66
  ...DatePicker$1,
19
67
  Root: DatePickerRoot
20
- };
21
- injectComponentStyle("date-picker");
68
+ });
22
69
  //#endregion
23
70
  export { DatePicker };
@@ -12,5 +12,8 @@ export interface DeferredContentProps extends HTMLAttributes<HTMLDivElement> {
12
12
  * tree until the placeholder scrolls near the viewport, then mounts
13
13
  * once and stays. The placeholder is drawn by the caller, so the late
14
14
  * arrival costs no layout shift it cannot predict. */
15
- export declare function DeferredContent({ threshold, placeholder, children, ...rest }: DeferredContentProps): import("react").JSX.Element;
15
+ declare function DeferredContentImpl({ threshold, placeholder, children, ...rest }: DeferredContentProps): import("react").JSX.Element;
16
+ export declare const DeferredContent: typeof DeferredContentImpl & {
17
+ Root: typeof DeferredContentImpl;
18
+ };
16
19
  //#endregion