@fangxinyan/lumina 0.6.1 → 0.6.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 (246) hide show
  1. package/dist/Alert.cjs +3 -3
  2. package/dist/Alert.js +2 -2
  3. package/dist/AutoComplete.cjs +5 -4
  4. package/dist/AutoComplete.d.cts +1 -1
  5. package/dist/AutoComplete.d.ts +1 -1
  6. package/dist/AutoComplete.js +4 -3
  7. package/dist/Badge-DPGLV3D3.css +22 -0
  8. package/dist/Badge.cjs +10 -0
  9. package/dist/Badge.d.cts +18 -0
  10. package/dist/Badge.d.ts +18 -0
  11. package/dist/Badge.js +1 -0
  12. package/dist/Button.cjs +3 -7
  13. package/dist/Button.d.cts +5 -10
  14. package/dist/Button.d.ts +5 -10
  15. package/dist/Button.js +2 -2
  16. package/dist/Calendar.cjs +3 -3
  17. package/dist/Calendar.js +2 -2
  18. package/dist/{Card-RG7ECXL2.css → Card-6RMVIHWX.css} +7 -13
  19. package/dist/Card.cjs +2 -6
  20. package/dist/Card.d.cts +7 -11
  21. package/dist/Card.d.ts +7 -11
  22. package/dist/Card.js +1 -1
  23. package/dist/{Cascader-VSYEKQCG.css → Cascader-C2DFSMKJ.css} +64 -0
  24. package/dist/Cascader.cjs +5 -3
  25. package/dist/Cascader.d.cts +18 -2
  26. package/dist/Cascader.d.ts +18 -2
  27. package/dist/Cascader.js +4 -2
  28. package/dist/{Checkbox-SKJATVSN.css → Checkbox-U5EUDSYS.css} +5 -35
  29. package/dist/Checkbox.cjs +3 -7
  30. package/dist/Checkbox.d.cts +1 -18
  31. package/dist/Checkbox.d.ts +1 -18
  32. package/dist/Checkbox.js +2 -2
  33. package/dist/Collapse-66U5YJFY.css +53 -0
  34. package/dist/Collapse.cjs +11 -0
  35. package/dist/Collapse.d.cts +32 -0
  36. package/dist/Collapse.d.ts +32 -0
  37. package/dist/Collapse.js +2 -0
  38. package/dist/CommandPalette.cjs +5 -4
  39. package/dist/CommandPalette.js +4 -3
  40. package/dist/Drawer.cjs +3 -3
  41. package/dist/Drawer.js +2 -2
  42. package/dist/Empty-DC2LPORC.css +28 -0
  43. package/dist/Empty.cjs +2 -10
  44. package/dist/Empty.d.cts +1 -62
  45. package/dist/Empty.d.ts +1 -62
  46. package/dist/Empty.js +1 -1
  47. package/dist/Form.d.cts +1 -1
  48. package/dist/Form.d.ts +1 -1
  49. package/dist/Icon.cjs +179 -3
  50. package/dist/Icon.d.cts +96 -3
  51. package/dist/Icon.d.ts +96 -3
  52. package/dist/Icon.js +1 -1
  53. package/dist/Image.cjs +4 -4
  54. package/dist/Image.js +2 -2
  55. package/dist/{Input-33CAH4O6.css → Input-3G4ONWNU.css} +15 -42
  56. package/dist/Input.cjs +6 -5
  57. package/dist/Input.d.cts +19 -23
  58. package/dist/Input.d.ts +19 -23
  59. package/dist/Input.js +3 -2
  60. package/dist/InputNumber.cjs +5 -4
  61. package/dist/InputNumber.d.cts +1 -1
  62. package/dist/InputNumber.d.ts +1 -1
  63. package/dist/InputNumber.js +4 -3
  64. package/dist/Message-2MZ3LFPU.css +45 -0
  65. package/dist/Message.cjs +23 -0
  66. package/dist/Message.d.cts +54 -0
  67. package/dist/Message.d.ts +54 -0
  68. package/dist/Message.js +2 -0
  69. package/dist/{Modal-XSDMU4XJ.css → Modal-2QNDW4SO.css} +27 -0
  70. package/dist/Modal.cjs +4 -4
  71. package/dist/Modal.d.cts +28 -4
  72. package/dist/Modal.d.ts +28 -4
  73. package/dist/Modal.js +3 -3
  74. package/dist/Pagination.cjs +7 -5
  75. package/dist/Pagination.js +6 -4
  76. package/dist/Popover.cjs +2 -2
  77. package/dist/Popover.d.cts +11 -3
  78. package/dist/Popover.d.ts +11 -3
  79. package/dist/Popover.js +1 -1
  80. package/dist/Radio-GVFDPAZM.css +97 -0
  81. package/dist/Radio.cjs +14 -0
  82. package/dist/Radio.d.cts +36 -0
  83. package/dist/Radio.d.ts +36 -0
  84. package/dist/Radio.js +1 -0
  85. package/dist/{Select-J3CCVFJ7.css → Select-JVBQAZBG.css} +7 -23
  86. package/dist/Select.cjs +6 -4
  87. package/dist/Select.d.cts +25 -4
  88. package/dist/Select.d.ts +25 -4
  89. package/dist/Select.js +5 -3
  90. package/dist/Skeleton-CVWH2VWN.css +40 -0
  91. package/dist/Skeleton.cjs +10 -0
  92. package/dist/Skeleton.d.cts +30 -0
  93. package/dist/Skeleton.d.ts +30 -0
  94. package/dist/Skeleton.js +1 -0
  95. package/dist/Spin-3GJNMSIH.css +94 -0
  96. package/dist/Spin.cjs +10 -0
  97. package/dist/Spin.d.cts +20 -0
  98. package/dist/Spin.d.ts +20 -0
  99. package/dist/Spin.js +1 -0
  100. package/dist/{Table-2LPTOUIR.css → Table-ATJJQLKU.css} +0 -53
  101. package/dist/Table.cjs +9 -11
  102. package/dist/Table.d.cts +2 -21
  103. package/dist/Table.d.ts +2 -21
  104. package/dist/Table.js +8 -6
  105. package/dist/TablePro-3XVHYLSL.css +45 -0
  106. package/dist/TablePro.cjs +19 -0
  107. package/dist/TablePro.d.cts +21 -0
  108. package/dist/TablePro.d.ts +21 -0
  109. package/dist/TablePro.js +10 -0
  110. package/dist/{Tabs-RHK6XAFF.css → Tabs-BLSNI2T5.css} +0 -34
  111. package/dist/Tabs.cjs +2 -6
  112. package/dist/Tabs.d.cts +1 -16
  113. package/dist/Tabs.d.ts +1 -16
  114. package/dist/Tabs.js +1 -1
  115. package/dist/Tag-LB3OOJAO.css +29 -0
  116. package/dist/Tag.cjs +3 -7
  117. package/dist/Tag.d.cts +1 -11
  118. package/dist/Tag.d.ts +1 -11
  119. package/dist/Tag.js +2 -2
  120. package/dist/Textarea-YNET7IBH.css +54 -0
  121. package/dist/Textarea.cjs +15 -0
  122. package/dist/Textarea.d.cts +25 -0
  123. package/dist/Textarea.d.ts +25 -0
  124. package/dist/Textarea.js +2 -0
  125. package/dist/{Timeline-RHZAZKZ7.css → Timeline-3ZHOHPXT.css} +2 -2
  126. package/dist/Timeline.cjs +3 -3
  127. package/dist/Timeline.d.cts +1 -1
  128. package/dist/Timeline.d.ts +1 -1
  129. package/dist/Timeline.js +2 -2
  130. package/dist/Tooltip.cjs +2 -2
  131. package/dist/Tooltip.d.cts +17 -4
  132. package/dist/Tooltip.d.ts +17 -4
  133. package/dist/Tooltip.js +1 -1
  134. package/dist/Typography.cjs +7 -7
  135. package/dist/Typography.js +2 -2
  136. package/dist/{chunk-6Y5WRCPW.js → chunk-33NCTOEB.js} +1 -1
  137. package/dist/{chunk-Q2KG6SQK.cjs → chunk-35ZGBAA3.cjs} +3 -3
  138. package/dist/{chunk-Y3ZSG3SJ.cjs → chunk-3AS5B7MQ.cjs} +11 -30
  139. package/dist/{chunk-X2U7EKCS.cjs → chunk-3YJU3D5S.cjs} +28 -5
  140. package/dist/chunk-45VJGBGN.js +25 -0
  141. package/dist/{chunk-3D77MQHO.js → chunk-46VXFTEC.js} +3 -3
  142. package/dist/{chunk-OFGDUCT7.cjs → chunk-4WTU5P3O.cjs} +3 -3
  143. package/dist/{chunk-5A3RT4KD.js → chunk-5TKC6IEN.js} +4 -55
  144. package/dist/{chunk-62GU4OHH.cjs → chunk-5WAXZJG5.cjs} +12 -19
  145. package/dist/chunk-6ACKL3WH.cjs +138 -0
  146. package/dist/{chunk-32HBMXXV.cjs → chunk-6LZ54NPO.cjs} +70 -74
  147. package/dist/{chunk-UXH5PH3S.js → chunk-7NGMQIST.js} +2 -2
  148. package/dist/{chunk-R6BIF3FF.js → chunk-AWXCSX6J.js} +5 -23
  149. package/dist/chunk-AXZ7ELMA.js +41 -0
  150. package/dist/{chunk-G2XK57I7.cjs → chunk-B2KEZQ6S.cjs} +5 -5
  151. package/dist/chunk-CEJ7VBR6.js +283 -0
  152. package/dist/{chunk-WRDKOSSM.js → chunk-CHMCL7AV.js} +1 -1
  153. package/dist/{chunk-EBNRZRWY.cjs → chunk-CUXV6QNN.cjs} +5 -5
  154. package/dist/{chunk-ULOJ5UEY.js → chunk-CXWEOAVU.js} +1 -1
  155. package/dist/{chunk-TWGQZX2R.js → chunk-DQTSTJ6O.js} +3 -18
  156. package/dist/chunk-EIY7KEJ3.cjs +132 -0
  157. package/dist/{chunk-OI3CWXT3.js → chunk-EJBHR2P5.js} +3 -3
  158. package/dist/chunk-ELNT3CFO.js +64 -0
  159. package/dist/{chunk-TGHBKKSS.js → chunk-EQEJTN3V.js} +3 -43
  160. package/dist/chunk-F6RYCBQG.js +25 -0
  161. package/dist/{chunk-N57NXCNC.cjs → chunk-FBVVRTX2.cjs} +3 -44
  162. package/dist/chunk-FFZ6OMZI.js +110 -0
  163. package/dist/{chunk-73RQBWWW.js → chunk-FJNWUELL.js} +2 -2
  164. package/dist/chunk-GENABQYA.cjs +47 -0
  165. package/dist/chunk-GMN74OEY.cjs +63 -0
  166. package/dist/chunk-GNEZQMKH.js +218 -0
  167. package/dist/{chunk-Y47YTYQ3.cjs → chunk-HPFQXYKG.cjs} +159 -8
  168. package/dist/{chunk-4WRE4HQP.js → chunk-HWFM4MAT.js} +18 -6
  169. package/dist/{chunk-GY3BSHHS.cjs → chunk-HZSIUOCN.cjs} +2 -55
  170. package/dist/{chunk-YRZGXXWA.js → chunk-JD7A6VM3.js} +11 -17
  171. package/dist/chunk-K2KYM7LW.cjs +28 -0
  172. package/dist/{chunk-PWW64ZWO.cjs → chunk-KD4YYIIO.cjs} +1 -32
  173. package/dist/chunk-KGSADAOD.cjs +170 -0
  174. package/dist/{chunk-6ODY6MGL.cjs → chunk-MQV2XN4B.cjs} +5 -5
  175. package/dist/{chunk-OVZTG5CP.cjs → chunk-MT7UWY6T.cjs} +2 -2
  176. package/dist/chunk-MUXP7ASL.js +26 -0
  177. package/dist/{chunk-EEMWQX3C.cjs → chunk-NTS5L4NQ.cjs} +3 -3
  178. package/dist/{chunk-WBK6XIDJ.js → chunk-OBEKX4VR.js} +2 -32
  179. package/dist/chunk-OF3SGLZY.js +385 -0
  180. package/dist/chunk-ON4DEDMI.js +113 -0
  181. package/dist/chunk-OQBDU5I2.cjs +104 -0
  182. package/dist/{chunk-FIO65XYG.cjs → chunk-OYMJVU66.cjs} +48 -37
  183. package/dist/{chunk-5M26OVVY.js → chunk-PH3YECMF.js} +1 -1
  184. package/dist/chunk-Q5SZIU7Z.cjs +47 -0
  185. package/dist/chunk-QGHYQCF3.cjs +240 -0
  186. package/dist/chunk-QKQHZIF3.cjs +86 -0
  187. package/dist/{chunk-KYEY2LIB.cjs → chunk-SKMP2A5O.cjs} +3 -3
  188. package/dist/{chunk-IW5LW6XS.js → chunk-TEEFR2FD.js} +28 -5
  189. package/dist/{chunk-GOBWKQCX.cjs → chunk-TEG7NJHS.cjs} +3 -3
  190. package/dist/{chunk-2MNAZRWE.cjs → chunk-TJII7BQ2.cjs} +261 -2
  191. package/dist/{chunk-3TWNBJFI.cjs → chunk-TZJH5HBT.cjs} +6 -6
  192. package/dist/{chunk-D46EM4EN.js → chunk-UMDGS4BP.js} +1 -1
  193. package/dist/chunk-USQ43DJ5.js +147 -0
  194. package/dist/{chunk-G2K6ETP4.cjs → chunk-UUHFKIWP.cjs} +18 -6
  195. package/dist/chunk-WGZ2KJTZ.js +81 -0
  196. package/dist/{chunk-RPFMQZA5.js → chunk-WKKSAGYH.js} +39 -28
  197. package/dist/{chunk-54YLXXS2.js → chunk-XD3JGL5O.js} +2 -2
  198. package/dist/{chunk-DPNDHNKK.js → chunk-XTIN5545.js} +68 -72
  199. package/dist/{chunk-LZU33BX6.cjs → chunk-ZIP7F4UF.cjs} +4 -20
  200. package/dist/index.cjs +312 -122
  201. package/dist/index.d.cts +23 -17
  202. package/dist/index.d.ts +23 -17
  203. package/dist/index.js +34 -28
  204. package/dist/styles.css +313 -192
  205. package/docs/llms/badge.md +3 -3
  206. package/docs/llms/button.md +7 -38
  207. package/docs/llms/card.md +6 -12
  208. package/docs/llms/cascader.md +19 -0
  209. package/docs/llms/{accordion.md → collapse.md} +13 -11
  210. package/docs/llms/drawer.md +1 -1
  211. package/docs/llms/form.md +1 -1
  212. package/docs/llms/input.md +25 -16
  213. package/docs/llms/message.md +63 -0
  214. package/docs/llms/modal.md +30 -0
  215. package/docs/llms/popover.md +18 -1
  216. package/docs/llms/radio.md +37 -1
  217. package/docs/llms/select.md +20 -0
  218. package/docs/llms/spin.md +59 -0
  219. package/docs/llms/table.md +3 -3
  220. package/docs/llms/tooltip.md +16 -3
  221. package/docs/llms.md +5 -5
  222. package/package.json +17 -52
  223. package/dist/Accordion-REMDCQUD.css +0 -44
  224. package/dist/Accordion.cjs +0 -11
  225. package/dist/Accordion.d.cts +0 -33
  226. package/dist/Accordion.d.ts +0 -33
  227. package/dist/Accordion.js +0 -2
  228. package/dist/Empty-NQ72W3D7.css +0 -160
  229. package/dist/Tag-FGDY3W7E.css +0 -51
  230. package/dist/Toast-YSACW3EM.css +0 -45
  231. package/dist/Toast.cjs +0 -15
  232. package/dist/Toast.d.cts +0 -26
  233. package/dist/Toast.d.ts +0 -26
  234. package/dist/Toast.js +0 -2
  235. package/dist/chunk-3XTHKAEY.js +0 -39
  236. package/dist/chunk-DOMYUGJY.js +0 -132
  237. package/dist/chunk-HBWO3QKW.js +0 -74
  238. package/dist/chunk-JVS5ZALZ.js +0 -123
  239. package/dist/chunk-LIGHV4RC.cjs +0 -121
  240. package/dist/chunk-MCTIA6RZ.js +0 -99
  241. package/dist/chunk-NC4YUEXM.cjs +0 -145
  242. package/dist/chunk-NJ6B22YJ.js +0 -170
  243. package/dist/chunk-W64ARHLJ.cjs +0 -62
  244. package/dist/chunk-ZFW6OYAO.cjs +0 -100
  245. package/docs/llms/spinner.md +0 -58
  246. package/docs/llms/toast.md +0 -51
@@ -6,22 +6,44 @@ import * as React from 'react';
6
6
  import { createPortal } from 'react-dom';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
 
9
+ var normalizePlacement = (placement) => {
10
+ const base = placement.startsWith("top") ? "top" : placement.startsWith("bottom") ? "bottom" : placement.startsWith("left") ? "left" : placement.startsWith("right") ? "right" : placement;
11
+ const alignCross = placement.endsWith("Left") || placement.endsWith("Top") ? "start" : placement.endsWith("Right") || placement.endsWith("Bottom") ? "end" : "center";
12
+ return { placement: base, alignCross };
13
+ };
9
14
  var Tooltip = React.forwardRef(({
10
15
  content,
16
+ title,
11
17
  placement = "top",
12
18
  children,
13
19
  delay = 250,
14
20
  disabled,
21
+ open: openProp,
22
+ defaultOpen = false,
23
+ onOpenChange,
24
+ visible,
25
+ onVisibleChange,
26
+ overlayClassName = "",
27
+ popupClassName = "",
15
28
  onMouseEnter,
16
29
  onMouseLeave,
17
30
  onFocus,
18
31
  onBlur,
19
32
  ...rest
20
33
  }, ref) => {
21
- const [show, setShow] = React.useState(false);
34
+ const [innerShow, setInnerShow] = React.useState(defaultOpen);
22
35
  const t = React.useRef();
36
+ const controlledShow = openProp ?? visible;
37
+ const show = controlledShow ?? innerShow;
38
+ const resolvedContent = content ?? title;
39
+ const disabledTooltip = disabled || resolvedContent == null || resolvedContent === "";
40
+ const setShow = React.useCallback((next) => {
41
+ if (controlledShow === void 0) setInnerShow(next);
42
+ onOpenChange?.(next);
43
+ onVisibleChange?.(next);
44
+ }, [controlledShow, onOpenChange, onVisibleChange]);
23
45
  const open = () => {
24
- if (disabled) return;
46
+ if (disabledTooltip) return;
25
47
  window.clearTimeout(t.current);
26
48
  t.current = window.setTimeout(() => setShow(true), delay);
27
49
  };
@@ -29,12 +51,13 @@ var Tooltip = React.forwardRef(({
29
51
  window.clearTimeout(t.current);
30
52
  setShow(false);
31
53
  };
54
+ const normalized = normalizePlacement(placement);
32
55
  const { triggerRef, floatingStyle, placement: resolved } = useFloating({
33
56
  open: show,
34
- placement,
57
+ placement: normalized.placement,
35
58
  panelWidth: 160,
36
59
  panelHeight: 32,
37
- alignCross: "center"
60
+ alignCross: normalized.alignCross
38
61
  });
39
62
  const setTriggerRef = React.useCallback(
40
63
  (node) => {
@@ -71,7 +94,7 @@ var Tooltip = React.forwardRef(({
71
94
  }
72
95
  ),
73
96
  show && typeof document !== "undefined" && createPortal(
74
- /* @__PURE__ */ jsx("span", { className: `tip ${resolved}`, style: floatingStyle, children: content }),
97
+ /* @__PURE__ */ jsx("span", { className: `tip ${resolved} ${overlayClassName} ${popupClassName}`, style: floatingStyle, children: resolvedContent }),
75
98
  document.body
76
99
  )
77
100
  ] });
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk32HBMXXV_cjs = require('./chunk-32HBMXXV.cjs');
3
+ var chunk6LZ54NPO_cjs = require('./chunk-6LZ54NPO.cjs');
4
4
  require('./tokens-BIIUTPKN.css');
5
5
  require('./shared-NJHRNLRH.css');
6
6
  require('./CommandPalette-T45DBMPY.css');
@@ -149,14 +149,14 @@ var CommandPalette = React__namespace.forwardRef(({
149
149
  ...rest,
150
150
  children: [
151
151
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "cmdp-search", children: /* @__PURE__ */ jsxRuntime.jsx(
152
- chunk32HBMXXV_cjs.Input,
152
+ chunk6LZ54NPO_cjs.Input,
153
153
  {
154
154
  ref: inputRef,
155
155
  size: "lg",
156
156
  leadingIcon: "search",
157
157
  placeholder,
158
158
  value: query,
159
- onChange: (v) => setQuery(v),
159
+ onValueChange: (v) => setQuery(v),
160
160
  onKeyDown: onKey,
161
161
  suffix: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "cmdp-kbd", children: "esc" })
162
162
  }
@@ -58,6 +58,7 @@ var paths = {
58
58
  ] }),
59
59
  heart: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" }) }),
60
60
  star: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) }),
61
+ starFilled: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z", fill: "currentColor", stroke: "none" }) }),
61
62
  home: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m3 10 9-7 9 7v10a2 2 0 0 1-2 2h-4v-7h-6v7H5a2 2 0 0 1-2-2z" }) }),
62
63
  folder: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }) }),
63
64
  file: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -164,7 +165,96 @@ var paths = {
164
165
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "10", cy: "9", r: "0.8", fill: "currentColor", stroke: "none" }),
165
166
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "14", cy: "9", r: "0.8", fill: "currentColor", stroke: "none" })
166
167
  ] }),
167
- code: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m16 18 6-6-6-6M8 6l-6 6 6 6" }) })
168
+ code: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m16 18 6-6-6-6M8 6l-6 6 6 6" }) }),
169
+ appstore: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1.5" }),
171
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1.5" }),
172
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1.5" }),
173
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1.5" })
174
+ ] }),
175
+ barChart: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 20V10M10 20V4M16 20v-7M22 20H2" }) }),
176
+ block: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
177
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 7h10v10H7z" }),
178
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 4h10v10H4z" })
179
+ ] }),
180
+ border: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "4", width: "16", height: "16", rx: "1.5" }) }),
181
+ caretDown: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m7 9 5 6 5-6z", fill: "currentColor", stroke: "none" }) }),
182
+ caretUp: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m7 15 5-6 5 6z", fill: "currentColor", stroke: "none" }) }),
183
+ checkCircle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
184
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
185
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m8 12 3 3 5-6" })
186
+ ] }),
187
+ checkCircleFilled: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
188
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
189
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m7.8 12.2 2.7 2.7 5.8-6", stroke: "var(--bg)", strokeWidth: "2.2", fill: "none" })
190
+ ] }),
191
+ clockCircleFilled: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
192
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10", fill: "currentColor", stroke: "none" }),
193
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 6.5v5.7l3.6 2.1", stroke: "var(--bg)", strokeWidth: "2.1", fill: "none" })
194
+ ] }),
195
+ closeCircle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
196
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
197
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 8l8 8M16 8l-8 8" })
198
+ ] }),
199
+ dashboard: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
200
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 13a8 8 0 1 1 16 0" }),
201
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 13l4-4" }),
202
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 17h10" })
203
+ ] }),
204
+ environment: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
205
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s7-5.2 7-12a7 7 0 0 0-14 0c0 6.8 7 12 7 12z" }),
206
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "10", r: "2.5" })
207
+ ] }),
208
+ exclamationCircle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
209
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
210
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 7v6M12 17h.01" })
211
+ ] }),
212
+ folderOpen: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
213
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 8a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v1" }),
214
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 18.5 5.2 11h17L20 20H5a2 2 0 0 1-2-1.5z" })
215
+ ] }),
216
+ loading: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
217
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-3-6.7" }),
218
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 3v6h-6" })
219
+ ] }),
220
+ minusCircle: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
221
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
222
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 12h8" })
223
+ ] }),
224
+ picture: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
225
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
226
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8.5", cy: "9", r: "1.7" }),
227
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m21 15-4.5-4.5L9 18" })
228
+ ] }),
229
+ reload: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
230
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-2.64-6.36" }),
231
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 3v6h-6" })
232
+ ] }),
233
+ robot: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
234
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "5", y: "8", width: "14", height: "11", rx: "3" }),
235
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 8V4M9 4h6M3 13h2M19 13h2" }),
236
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9.5", cy: "13", r: "1", fill: "currentColor", stroke: "none" }),
237
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "14.5", cy: "13", r: "1", fill: "currentColor", stroke: "none" }),
238
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 16h6" })
239
+ ] }),
240
+ swapRight: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 7h10M12 4l3 3-3 3M19 17H9M12 14l-3 3 3 3" }) }),
241
+ sync: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
242
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 7h-5V2" }),
243
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 17h5v5" }),
244
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 12a8 8 0 0 0-13.7-5.7L4 8" }),
245
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 12a8 8 0 0 0 13.7 5.7L20 16" })
246
+ ] }),
247
+ translate: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
248
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 5h8M8 3v2M6 9c1.4 2.6 3.4 4.4 6 5.5" }),
249
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 5c-.7 4-2.8 7-7 9" }),
250
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 20l4-10 4 10M15.4 16h5.2" })
251
+ ] }),
252
+ unorderedList: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
253
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 6h13M8 12h13M8 18h13" }),
254
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "4", cy: "6", r: "1", fill: "currentColor", stroke: "none" }),
255
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "4", cy: "12", r: "1", fill: "currentColor", stroke: "none" }),
256
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "4", cy: "18", r: "1", fill: "currentColor", stroke: "none" })
257
+ ] })
168
258
  };
169
259
  var Icon = React__namespace.forwardRef(
170
260
  ({ name, size = 16, stroke = 2, style, ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -187,7 +277,176 @@ var Icon = React__namespace.forwardRef(
187
277
  )
188
278
  );
189
279
  Icon.displayName = "Icon";
190
- var ICON_NAMES = ["search", "plus", "minus", "check", "x", "chevDown", "chevRight", "chevLeft", "chevUp", "arrowRight", "settings", "user", "bell", "mail", "heart", "star", "home", "folder", "file", "image", "play", "pause", "volume", "trash", "edit", "copy", "download", "upload", "info", "alert", "check2", "eye", "eyeOff", "sparkle", "moon", "sun", "palette", "layers", "grid", "list", "zap", "filter", "mic", "send", "calendar", "clock", "menu", "more", "sliders", "aim", "swap", "camera", "qq", "code"];
280
+ var ICON_NAMES = Object.keys(paths);
281
+ var NAMED_ICON_MAP = {
282
+ AimOutlined: "aim",
283
+ AppstoreOutlined: "appstore",
284
+ BarChartOutlined: "barChart",
285
+ BlockOutlined: "block",
286
+ BorderOutlined: "border",
287
+ CameraOutlined: "camera",
288
+ CaretDownOutlined: "caretDown",
289
+ CaretUpOutlined: "caretUp",
290
+ CheckCircleFilled: "checkCircleFilled",
291
+ CheckCircleOutlined: "checkCircle",
292
+ CheckOutlined: "check",
293
+ ClockCircleFilled: "clockCircleFilled",
294
+ CloseCircleOutlined: "closeCircle",
295
+ CloseOutlined: "x",
296
+ CopyOutlined: "copy",
297
+ DashboardOutlined: "dashboard",
298
+ DeleteOutlined: "trash",
299
+ DownOutlined: "chevDown",
300
+ EnvironmentOutlined: "environment",
301
+ ExclamationCircleOutlined: "exclamationCircle",
302
+ FolderOpenOutlined: "folderOpen",
303
+ LeftOutlined: "chevLeft",
304
+ LoadingOutlined: "loading",
305
+ MinusCircleOutlined: "minusCircle",
306
+ MinusOutlined: "minus",
307
+ PictureOutlined: "picture",
308
+ PlusOutlined: "plus",
309
+ QqOutlined: "qq",
310
+ ReloadOutlined: "reload",
311
+ RightOutlined: "chevRight",
312
+ RobotOutlined: "robot",
313
+ SearchOutlined: "search",
314
+ SettingOutlined: "settings",
315
+ StarFilled: "starFilled",
316
+ StarOutlined: "star",
317
+ SwapOutlined: "swap",
318
+ SwapRightOutlined: "swapRight",
319
+ SyncOutlined: "sync",
320
+ ThunderboltOutlined: "zap",
321
+ TranslationOutlined: "translate",
322
+ UnorderedListOutlined: "unorderedList",
323
+ UserOutlined: "user"
324
+ };
325
+ var resolveIconName = (name, fallback = "appstore") => NAMED_ICON_MAP[name] ?? fallback;
326
+ var createNamedIcon = (displayName, defaultSpin = false) => {
327
+ const iconName = NAMED_ICON_MAP[displayName];
328
+ const Component = React__namespace.forwardRef(
329
+ ({ spin, rotate, size = "1em", className = "", style, ...rest }, ref) => {
330
+ const shouldSpin = spin ?? defaultSpin;
331
+ const transform = rotate ? `${style?.transform ? `${style.transform} ` : ""}rotate(${rotate}deg)` : style?.transform;
332
+ return /* @__PURE__ */ jsxRuntime.jsx(
333
+ "span",
334
+ {
335
+ ref,
336
+ role: "img",
337
+ "aria-label": displayName,
338
+ className,
339
+ style: {
340
+ display: "inline-flex",
341
+ alignItems: "center",
342
+ justifyContent: "center",
343
+ lineHeight: 0,
344
+ verticalAlign: "-0.125em",
345
+ ...style,
346
+ ...transform ? { transform } : {}
347
+ },
348
+ ...rest,
349
+ children: /* @__PURE__ */ jsxRuntime.jsx(
350
+ Icon,
351
+ {
352
+ name: iconName,
353
+ size,
354
+ style: shouldSpin ? { animation: "spin 0.9s linear infinite" } : void 0
355
+ }
356
+ )
357
+ }
358
+ );
359
+ }
360
+ );
361
+ Component.displayName = displayName;
362
+ return Component;
363
+ };
364
+ var AimOutlined = createNamedIcon("AimOutlined");
365
+ var AppstoreOutlined = createNamedIcon("AppstoreOutlined");
366
+ var BarChartOutlined = createNamedIcon("BarChartOutlined");
367
+ var BlockOutlined = createNamedIcon("BlockOutlined");
368
+ var BorderOutlined = createNamedIcon("BorderOutlined");
369
+ var CameraOutlined = createNamedIcon("CameraOutlined");
370
+ var CaretDownOutlined = createNamedIcon("CaretDownOutlined");
371
+ var CaretUpOutlined = createNamedIcon("CaretUpOutlined");
372
+ var CheckCircleFilled = createNamedIcon("CheckCircleFilled");
373
+ var CheckCircleOutlined = createNamedIcon("CheckCircleOutlined");
374
+ var CheckOutlined = createNamedIcon("CheckOutlined");
375
+ var ClockCircleFilled = createNamedIcon("ClockCircleFilled");
376
+ var CloseCircleOutlined = createNamedIcon("CloseCircleOutlined");
377
+ var CloseOutlined = createNamedIcon("CloseOutlined");
378
+ var CopyOutlined = createNamedIcon("CopyOutlined");
379
+ var DashboardOutlined = createNamedIcon("DashboardOutlined");
380
+ var DeleteOutlined = createNamedIcon("DeleteOutlined");
381
+ var DownOutlined = createNamedIcon("DownOutlined");
382
+ var EnvironmentOutlined = createNamedIcon("EnvironmentOutlined");
383
+ var ExclamationCircleOutlined = createNamedIcon("ExclamationCircleOutlined");
384
+ var FolderOpenOutlined = createNamedIcon("FolderOpenOutlined");
385
+ var LeftOutlined = createNamedIcon("LeftOutlined");
386
+ var LoadingOutlined = createNamedIcon("LoadingOutlined", true);
387
+ var MinusCircleOutlined = createNamedIcon("MinusCircleOutlined");
388
+ var MinusOutlined = createNamedIcon("MinusOutlined");
389
+ var PictureOutlined = createNamedIcon("PictureOutlined");
390
+ var PlusOutlined = createNamedIcon("PlusOutlined");
391
+ var QqOutlined = createNamedIcon("QqOutlined");
392
+ var ReloadOutlined = createNamedIcon("ReloadOutlined");
393
+ var RightOutlined = createNamedIcon("RightOutlined");
394
+ var RobotOutlined = createNamedIcon("RobotOutlined");
395
+ var SearchOutlined = createNamedIcon("SearchOutlined");
396
+ var SettingOutlined = createNamedIcon("SettingOutlined");
397
+ var StarFilled = createNamedIcon("StarFilled");
398
+ var StarOutlined = createNamedIcon("StarOutlined");
399
+ var SwapOutlined = createNamedIcon("SwapOutlined");
400
+ var SwapRightOutlined = createNamedIcon("SwapRightOutlined");
401
+ var SyncOutlined = createNamedIcon("SyncOutlined");
402
+ var ThunderboltOutlined = createNamedIcon("ThunderboltOutlined");
403
+ var TranslationOutlined = createNamedIcon("TranslationOutlined");
404
+ var UnorderedListOutlined = createNamedIcon("UnorderedListOutlined");
405
+ var UserOutlined = createNamedIcon("UserOutlined");
191
406
 
407
+ exports.AimOutlined = AimOutlined;
408
+ exports.AppstoreOutlined = AppstoreOutlined;
409
+ exports.BarChartOutlined = BarChartOutlined;
410
+ exports.BlockOutlined = BlockOutlined;
411
+ exports.BorderOutlined = BorderOutlined;
412
+ exports.CameraOutlined = CameraOutlined;
413
+ exports.CaretDownOutlined = CaretDownOutlined;
414
+ exports.CaretUpOutlined = CaretUpOutlined;
415
+ exports.CheckCircleFilled = CheckCircleFilled;
416
+ exports.CheckCircleOutlined = CheckCircleOutlined;
417
+ exports.CheckOutlined = CheckOutlined;
418
+ exports.ClockCircleFilled = ClockCircleFilled;
419
+ exports.CloseCircleOutlined = CloseCircleOutlined;
420
+ exports.CloseOutlined = CloseOutlined;
421
+ exports.CopyOutlined = CopyOutlined;
422
+ exports.DashboardOutlined = DashboardOutlined;
423
+ exports.DeleteOutlined = DeleteOutlined;
424
+ exports.DownOutlined = DownOutlined;
425
+ exports.EnvironmentOutlined = EnvironmentOutlined;
426
+ exports.ExclamationCircleOutlined = ExclamationCircleOutlined;
427
+ exports.FolderOpenOutlined = FolderOpenOutlined;
192
428
  exports.ICON_NAMES = ICON_NAMES;
193
429
  exports.Icon = Icon;
430
+ exports.LeftOutlined = LeftOutlined;
431
+ exports.LoadingOutlined = LoadingOutlined;
432
+ exports.MinusCircleOutlined = MinusCircleOutlined;
433
+ exports.MinusOutlined = MinusOutlined;
434
+ exports.NAMED_ICON_MAP = NAMED_ICON_MAP;
435
+ exports.PictureOutlined = PictureOutlined;
436
+ exports.PlusOutlined = PlusOutlined;
437
+ exports.QqOutlined = QqOutlined;
438
+ exports.ReloadOutlined = ReloadOutlined;
439
+ exports.RightOutlined = RightOutlined;
440
+ exports.RobotOutlined = RobotOutlined;
441
+ exports.SearchOutlined = SearchOutlined;
442
+ exports.SettingOutlined = SettingOutlined;
443
+ exports.StarFilled = StarFilled;
444
+ exports.StarOutlined = StarOutlined;
445
+ exports.SwapOutlined = SwapOutlined;
446
+ exports.SwapRightOutlined = SwapRightOutlined;
447
+ exports.SyncOutlined = SyncOutlined;
448
+ exports.ThunderboltOutlined = ThunderboltOutlined;
449
+ exports.TranslationOutlined = TranslationOutlined;
450
+ exports.UnorderedListOutlined = UnorderedListOutlined;
451
+ exports.UserOutlined = UserOutlined;
452
+ exports.resolveIconName = resolveIconName;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk32HBMXXV_cjs = require('./chunk-32HBMXXV.cjs');
4
- var chunk2MNAZRWE_cjs = require('./chunk-2MNAZRWE.cjs');
3
+ var chunk6LZ54NPO_cjs = require('./chunk-6LZ54NPO.cjs');
4
+ var chunkTJII7BQ2_cjs = require('./chunk-TJII7BQ2.cjs');
5
5
  require('./tokens-BIIUTPKN.css');
6
6
  require('./shared-NJHRNLRH.css');
7
7
  require('./InputNumber-VXQIWLQC.css');
@@ -117,7 +117,7 @@ var InputNumber = React__namespace.forwardRef(
117
117
  disabled: upDisabled,
118
118
  onMouseDown: (e) => e.preventDefault(),
119
119
  onClick: () => increment(step),
120
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "chevUp", size: 10, stroke: 2.5 })
120
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkTJII7BQ2_cjs.Icon, { name: "chevUp", size: 10, stroke: 2.5 })
121
121
  }
122
122
  ),
123
123
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -129,7 +129,7 @@ var InputNumber = React__namespace.forwardRef(
129
129
  disabled: downDisabled,
130
130
  onMouseDown: (e) => e.preventDefault(),
131
131
  onClick: () => increment(-step),
132
- children: /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "chevDown", size: 10, stroke: 2.5 })
132
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkTJII7BQ2_cjs.Icon, { name: "chevDown", size: 10, stroke: 2.5 })
133
133
  }
134
134
  )
135
135
  ] }) : null;
@@ -138,7 +138,7 @@ var InputNumber = React__namespace.forwardRef(
138
138
  stepperSuffix
139
139
  ] }) : stepperSuffix ?? suffix;
140
140
  return /* @__PURE__ */ jsxRuntime.jsx(
141
- chunk32HBMXXV_cjs.Input,
141
+ chunk6LZ54NPO_cjs.Input,
142
142
  {
143
143
  ref,
144
144
  id,
@@ -154,7 +154,7 @@ var InputNumber = React__namespace.forwardRef(
154
154
  suffix: finalSuffix,
155
155
  className: `input-number ${className}`,
156
156
  inputMode: "decimal",
157
- onChange: handleInput,
157
+ onValueChange: handleInput,
158
158
  onKeyDown: handleKeyDown,
159
159
  onBlur: handleBlur,
160
160
  onFocus
@@ -1,4 +1,4 @@
1
- import { Icon } from './chunk-NJ6B22YJ.js';
1
+ import { Icon } from './chunk-OF3SGLZY.js';
2
2
  import './tokens-BIIUTPKN.css';
3
3
  import './shared-NJHRNLRH.css';
4
4
  import './Alert-JJ7GB3UU.css';
@@ -0,0 +1,147 @@
1
+ import './tokens-BIIUTPKN.css';
2
+ import './shared-NJHRNLRH.css';
3
+ import './Radio-GVFDPAZM.css';
4
+ import * as React from 'react';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ // src/components/Radio/Radio.tsx
8
+ var RadioRoot = React.forwardRef(({
9
+ checked,
10
+ defaultChecked,
11
+ onChange,
12
+ disabled,
13
+ label,
14
+ className = "",
15
+ id,
16
+ ...rest
17
+ }, ref) => {
18
+ const [inner, setInner] = React.useState(defaultChecked ?? false);
19
+ const isControlled = checked !== void 0;
20
+ const value = isControlled ? checked : inner;
21
+ const pick = () => {
22
+ if (disabled) return;
23
+ if (!isControlled) setInner(true);
24
+ onChange?.(true);
25
+ };
26
+ return /* @__PURE__ */ jsxs(
27
+ "label",
28
+ {
29
+ ref,
30
+ className: `radio ${value ? "checked" : ""} ${disabled ? "disabled" : ""} ${className}`,
31
+ onClick: pick,
32
+ ...rest,
33
+ children: [
34
+ /* @__PURE__ */ jsx(
35
+ "button",
36
+ {
37
+ type: "button",
38
+ role: "radio",
39
+ "aria-checked": value,
40
+ disabled,
41
+ onClick: (event) => {
42
+ event.stopPropagation();
43
+ pick();
44
+ },
45
+ id,
46
+ className: "radio-dot"
47
+ }
48
+ ),
49
+ label && /* @__PURE__ */ jsx("span", { className: "radio-label", children: label })
50
+ ]
51
+ }
52
+ );
53
+ });
54
+ RadioRoot.displayName = "Radio";
55
+ var RadioGroupInner = ({
56
+ options,
57
+ value,
58
+ defaultValue,
59
+ onChange,
60
+ direction,
61
+ variant = "default",
62
+ size = "md",
63
+ className = "",
64
+ ...rest
65
+ }, ref) => {
66
+ const [inner, setInner] = React.useState(defaultValue);
67
+ const groupRef = React.useRef(null);
68
+ const [thumb, setThumb] = React.useState({ left: 0, width: 0, ready: false });
69
+ const isControlled = value !== void 0;
70
+ const current = isControlled ? value : inner;
71
+ const setGroupRef = React.useCallback(
72
+ (node) => {
73
+ groupRef.current = node;
74
+ if (typeof ref === "function") ref(node);
75
+ else if (ref) ref.current = node;
76
+ },
77
+ [ref]
78
+ );
79
+ const pick = (v) => {
80
+ if (!isControlled) setInner(v);
81
+ onChange?.(v);
82
+ };
83
+ const resolvedDirection = direction ?? (variant === "segmented" ? "horizontal" : "vertical");
84
+ React.useLayoutEffect(() => {
85
+ if (variant !== "segmented") return;
86
+ const group = groupRef.current;
87
+ if (!group) return;
88
+ const updateThumb = () => {
89
+ const active = group.querySelector(".radio.checked");
90
+ if (!active) {
91
+ setThumb((prev) => prev.ready ? { left: prev.left, width: prev.width, ready: false } : prev);
92
+ return;
93
+ }
94
+ const next = {
95
+ left: active.offsetLeft,
96
+ width: active.offsetWidth,
97
+ ready: true
98
+ };
99
+ setThumb(
100
+ (prev) => prev.left === next.left && prev.width === next.width && prev.ready === next.ready ? prev : next
101
+ );
102
+ };
103
+ updateThumb();
104
+ const frame = requestAnimationFrame(updateThumb);
105
+ const observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(updateThumb) : null;
106
+ if (observer) {
107
+ observer.observe(group);
108
+ group.querySelectorAll(".radio").forEach((item) => observer.observe(item));
109
+ }
110
+ window.addEventListener("resize", updateThumb);
111
+ return () => {
112
+ cancelAnimationFrame(frame);
113
+ observer?.disconnect();
114
+ window.removeEventListener("resize", updateThumb);
115
+ };
116
+ }, [current, options, size, variant]);
117
+ return /* @__PURE__ */ jsxs("div", { ref: setGroupRef, className: `radio-group ${resolvedDirection} ${variant} ${size} ${className}`, ...rest, children: [
118
+ variant === "segmented" && /* @__PURE__ */ jsx(
119
+ "span",
120
+ {
121
+ "aria-hidden": true,
122
+ className: "radio-segment-thumb",
123
+ style: {
124
+ width: thumb.width,
125
+ transform: `translateX(${thumb.left}px)`,
126
+ opacity: thumb.ready ? 1 : 0
127
+ }
128
+ }
129
+ ),
130
+ options.map((opt) => /* @__PURE__ */ jsx(
131
+ RadioRoot,
132
+ {
133
+ label: opt.label,
134
+ checked: current === opt.value,
135
+ disabled: opt.disabled,
136
+ onChange: () => pick(opt.value)
137
+ },
138
+ String(opt.value)
139
+ ))
140
+ ] });
141
+ };
142
+ var RadioGroup = React.forwardRef(RadioGroupInner);
143
+ RadioGroup.displayName = "RadioGroup";
144
+ var Radio = RadioRoot;
145
+ Radio.Group = RadioGroup;
146
+
147
+ export { Radio, RadioGroup };
@@ -28,6 +28,11 @@ function _interopNamespace(e) {
28
28
 
29
29
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
30
 
31
+ var normalizePlacement = (placement) => {
32
+ const base = placement.startsWith("top") ? "top" : placement.startsWith("bottom") ? "bottom" : placement.startsWith("left") ? "left" : placement.startsWith("right") ? "right" : placement;
33
+ const alignCross = placement.endsWith("Left") || placement.endsWith("Top") ? "start" : placement.endsWith("Right") || placement.endsWith("Bottom") ? "end" : "center";
34
+ return { placement: base, alignCross };
35
+ };
31
36
  var Popover = React__namespace.forwardRef(({
32
37
  content,
33
38
  title,
@@ -38,18 +43,24 @@ var Popover = React__namespace.forwardRef(({
38
43
  width,
39
44
  defaultOpen = false,
40
45
  open,
46
+ visible,
41
47
  onOpenChange,
48
+ onVisibleChange,
42
49
  children,
43
50
  className = "",
51
+ overlayClassName = "",
52
+ popupClassName = "",
44
53
  onClick,
45
54
  onMouseEnter,
46
55
  onMouseLeave,
47
56
  ...rest
48
57
  }, ref) => {
49
58
  const [inner, setInner] = React__namespace.useState(defaultOpen);
50
- const isControlled = open !== void 0;
51
- const show = isControlled ? open : inner;
59
+ const controlledOpen = open ?? visible;
60
+ const isControlled = controlledOpen !== void 0;
61
+ const show = isControlled ? controlledOpen : inner;
52
62
  const panelWidth = width === "auto" ? 160 : width ?? 240;
63
+ const normalized = normalizePlacement(placement);
53
64
  const {
54
65
  triggerRef,
55
66
  floatingRef,
@@ -57,15 +68,16 @@ var Popover = React__namespace.forwardRef(({
57
68
  placement: resolved
58
69
  } = chunkYB3IWIOJ_cjs.useFloating({
59
70
  open: show,
60
- placement,
71
+ placement: normalized.placement,
61
72
  panelWidth,
62
73
  panelHeight: 160,
63
- alignCross: "center"
74
+ alignCross: normalized.alignCross
64
75
  });
65
76
  const set = React__namespace.useCallback((v) => {
66
77
  if (!isControlled) setInner(v);
67
78
  onOpenChange?.(v);
68
- }, [isControlled, onOpenChange]);
79
+ onVisibleChange?.(v);
80
+ }, [isControlled, onOpenChange, onVisibleChange]);
69
81
  const setTriggerRef = React__namespace.useCallback(
70
82
  (node) => {
71
83
  triggerRef.current = node;
@@ -130,7 +142,7 @@ var Popover = React__namespace.forwardRef(({
130
142
  "div",
131
143
  {
132
144
  ref: floatingRef,
133
- className: `popover popover-${resolved}`,
145
+ className: `popover popover-${resolved} ${overlayClassName} ${popupClassName}`,
134
146
  style: { ...floatingStyle, ...widthStyle },
135
147
  ...panelHover,
136
148
  children: [