@fangxinyan/lumina 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/README.md +2 -1
  2. package/dist/{Alert-JJ7GB3UU.css → Alert-QBKIDY5H.css} +7 -0
  3. package/dist/Alert.cjs +3 -3
  4. package/dist/Alert.d.cts +3 -2
  5. package/dist/Alert.d.ts +3 -2
  6. package/dist/Alert.js +2 -2
  7. package/dist/AutoComplete.cjs +5 -4
  8. package/dist/AutoComplete.d.cts +1 -1
  9. package/dist/AutoComplete.d.ts +1 -1
  10. package/dist/AutoComplete.js +4 -3
  11. package/dist/Badge-DPGLV3D3.css +22 -0
  12. package/dist/Badge.cjs +10 -0
  13. package/dist/Badge.d.cts +19 -0
  14. package/dist/Badge.d.ts +19 -0
  15. package/dist/Badge.js +1 -0
  16. package/dist/{Button-SDQD25AG.css → Button-4Z3Q6KII.css} +56 -36
  17. package/dist/Button.cjs +3 -7
  18. package/dist/Button.d.cts +11 -15
  19. package/dist/Button.d.ts +11 -15
  20. package/dist/Button.js +2 -2
  21. package/dist/Calendar.cjs +3 -3
  22. package/dist/Calendar.js +2 -2
  23. package/dist/{Card-RG7ECXL2.css → Card-6RMVIHWX.css} +7 -13
  24. package/dist/Card.cjs +2 -6
  25. package/dist/Card.d.cts +7 -11
  26. package/dist/Card.d.ts +7 -11
  27. package/dist/Card.js +1 -1
  28. package/dist/{Cascader-VSYEKQCG.css → Cascader-3BLLA7EN.css} +77 -0
  29. package/dist/Cascader.cjs +5 -3
  30. package/dist/Cascader.d.cts +22 -4
  31. package/dist/Cascader.d.ts +22 -4
  32. package/dist/Cascader.js +4 -2
  33. package/dist/{Checkbox-SKJATVSN.css → Checkbox-U5EUDSYS.css} +5 -35
  34. package/dist/Checkbox.cjs +3 -7
  35. package/dist/Checkbox.d.cts +1 -18
  36. package/dist/Checkbox.d.ts +1 -18
  37. package/dist/Checkbox.js +2 -2
  38. package/dist/Collapse-66U5YJFY.css +53 -0
  39. package/dist/Collapse.cjs +11 -0
  40. package/dist/Collapse.d.cts +32 -0
  41. package/dist/Collapse.d.ts +32 -0
  42. package/dist/Collapse.js +2 -0
  43. package/dist/CommandPalette.cjs +5 -4
  44. package/dist/CommandPalette.js +4 -3
  45. package/dist/Drawer.cjs +3 -3
  46. package/dist/Drawer.js +2 -2
  47. package/dist/Empty-DC2LPORC.css +28 -0
  48. package/dist/Empty.cjs +2 -10
  49. package/dist/Empty.d.cts +1 -62
  50. package/dist/Empty.d.ts +1 -62
  51. package/dist/Empty.js +1 -1
  52. package/dist/Form.d.cts +1 -1
  53. package/dist/Form.d.ts +1 -1
  54. package/dist/Icon.cjs +187 -3
  55. package/dist/Icon.d.cts +104 -3
  56. package/dist/Icon.d.ts +104 -3
  57. package/dist/Icon.js +1 -1
  58. package/dist/{Image-4MN34O6P.css → Image-MRYQCRQ5.css} +78 -0
  59. package/dist/Image.cjs +12 -4
  60. package/dist/Image.d.cts +79 -6
  61. package/dist/Image.d.ts +79 -6
  62. package/dist/Image.js +2 -2
  63. package/dist/{Input-33CAH4O6.css → Input-HUBJ55OH.css} +25 -42
  64. package/dist/Input.cjs +6 -5
  65. package/dist/Input.d.cts +23 -26
  66. package/dist/Input.d.ts +23 -26
  67. package/dist/Input.js +3 -2
  68. package/dist/InputNumber.cjs +5 -4
  69. package/dist/InputNumber.d.cts +1 -1
  70. package/dist/InputNumber.d.ts +1 -1
  71. package/dist/InputNumber.js +4 -3
  72. package/dist/Message-2MZ3LFPU.css +45 -0
  73. package/dist/Message.cjs +23 -0
  74. package/dist/Message.d.cts +54 -0
  75. package/dist/Message.d.ts +54 -0
  76. package/dist/Message.js +2 -0
  77. package/dist/{Modal-XSDMU4XJ.css → Modal-2QNDW4SO.css} +27 -0
  78. package/dist/Modal.cjs +4 -4
  79. package/dist/Modal.d.cts +29 -4
  80. package/dist/Modal.d.ts +29 -4
  81. package/dist/Modal.js +3 -3
  82. package/dist/Pagination.cjs +7 -5
  83. package/dist/Pagination.js +6 -4
  84. package/dist/Popover.cjs +2 -2
  85. package/dist/Popover.d.cts +11 -3
  86. package/dist/Popover.d.ts +11 -3
  87. package/dist/Popover.js +1 -1
  88. package/dist/Radio-GVFDPAZM.css +97 -0
  89. package/dist/Radio.cjs +14 -0
  90. package/dist/Radio.d.cts +36 -0
  91. package/dist/Radio.d.ts +36 -0
  92. package/dist/Radio.js +1 -0
  93. package/dist/{Select-J3CCVFJ7.css → Select-Z5VYPEEY.css} +33 -24
  94. package/dist/Select.cjs +6 -4
  95. package/dist/Select.d.cts +29 -7
  96. package/dist/Select.d.ts +29 -7
  97. package/dist/Select.js +5 -3
  98. package/dist/Skeleton-CVWH2VWN.css +40 -0
  99. package/dist/Skeleton.cjs +10 -0
  100. package/dist/Skeleton.d.cts +30 -0
  101. package/dist/Skeleton.d.ts +30 -0
  102. package/dist/Skeleton.js +1 -0
  103. package/dist/Spin-3GJNMSIH.css +94 -0
  104. package/dist/Spin.cjs +10 -0
  105. package/dist/Spin.d.cts +20 -0
  106. package/dist/Spin.d.ts +20 -0
  107. package/dist/Spin.js +1 -0
  108. package/dist/{Table-2LPTOUIR.css → Table-ATJJQLKU.css} +0 -53
  109. package/dist/Table.cjs +9 -11
  110. package/dist/Table.d.cts +2 -21
  111. package/dist/Table.d.ts +2 -21
  112. package/dist/Table.js +8 -6
  113. package/dist/TablePro-3XVHYLSL.css +45 -0
  114. package/dist/TablePro.cjs +19 -0
  115. package/dist/TablePro.d.cts +21 -0
  116. package/dist/TablePro.d.ts +21 -0
  117. package/dist/TablePro.js +10 -0
  118. package/dist/{Tabs-RHK6XAFF.css → Tabs-BLSNI2T5.css} +0 -34
  119. package/dist/Tabs.cjs +2 -6
  120. package/dist/Tabs.d.cts +1 -16
  121. package/dist/Tabs.d.ts +1 -16
  122. package/dist/Tabs.js +1 -1
  123. package/dist/Tag-HDYCDPFS.css +42 -0
  124. package/dist/Tag.cjs +3 -7
  125. package/dist/Tag.d.cts +5 -14
  126. package/dist/Tag.d.ts +5 -14
  127. package/dist/Tag.js +2 -2
  128. package/dist/Textarea-YNET7IBH.css +54 -0
  129. package/dist/Textarea.cjs +15 -0
  130. package/dist/Textarea.d.cts +25 -0
  131. package/dist/Textarea.d.ts +25 -0
  132. package/dist/Textarea.js +2 -0
  133. package/dist/Theme.cjs +14 -10
  134. package/dist/Theme.d.cts +29 -6
  135. package/dist/Theme.d.ts +29 -6
  136. package/dist/Theme.js +1 -1
  137. package/dist/{Timeline-RHZAZKZ7.css → Timeline-3ZHOHPXT.css} +2 -2
  138. package/dist/Timeline.cjs +3 -3
  139. package/dist/Timeline.d.cts +1 -1
  140. package/dist/Timeline.d.ts +1 -1
  141. package/dist/Timeline.js +2 -2
  142. package/dist/Tooltip.cjs +2 -2
  143. package/dist/Tooltip.d.cts +17 -4
  144. package/dist/Tooltip.d.ts +17 -4
  145. package/dist/Tooltip.js +1 -1
  146. package/dist/Typography.cjs +7 -7
  147. package/dist/Typography.d.cts +1 -0
  148. package/dist/Typography.d.ts +1 -0
  149. package/dist/Typography.js +2 -2
  150. package/dist/{chunk-OVZTG5CP.cjs → chunk-2HQCUBA7.cjs} +2 -2
  151. package/dist/{chunk-X2U7EKCS.cjs → chunk-3YJU3D5S.cjs} +28 -5
  152. package/dist/chunk-45VJGBGN.js +25 -0
  153. package/dist/{chunk-3D77MQHO.js → chunk-46VXFTEC.js} +3 -3
  154. package/dist/chunk-47VG2P34.js +393 -0
  155. package/dist/{chunk-LZU33BX6.cjs → chunk-5DKRY67M.cjs} +4 -20
  156. package/dist/{chunk-TWGQZX2R.js → chunk-5H5YP2TB.js} +4 -19
  157. package/dist/chunk-5MN3PMF4.cjs +240 -0
  158. package/dist/{chunk-5A3RT4KD.js → chunk-5TKC6IEN.js} +4 -55
  159. package/dist/{chunk-N57NXCNC.cjs → chunk-6HMTV6P4.cjs} +3 -44
  160. package/dist/{chunk-RF2EY5JS.cjs → chunk-6ZXQJRAT.cjs} +153 -34
  161. package/dist/{chunk-OFGDUCT7.cjs → chunk-7AG524YZ.cjs} +3 -3
  162. package/dist/chunk-7IYKKLV3.js +283 -0
  163. package/dist/{chunk-73RQBWWW.js → chunk-AAGF7K3L.js} +2 -2
  164. package/dist/chunk-AXZ7ELMA.js +41 -0
  165. package/dist/{chunk-R6BIF3FF.js → chunk-BPOOVO5T.js} +5 -23
  166. package/dist/{chunk-OI3CWXT3.js → chunk-BVQ77VRY.js} +3 -3
  167. package/dist/{chunk-UXH5PH3S.js → chunk-CETNCRZ4.js} +2 -2
  168. package/dist/chunk-DG5VQ6BO.cjs +28 -0
  169. package/dist/chunk-DWAN57G4.js +243 -0
  170. package/dist/chunk-ELNT3CFO.js +64 -0
  171. package/dist/{chunk-ULOJ5UEY.js → chunk-ET6DYQVZ.js} +1 -1
  172. package/dist/chunk-F6RYCBQG.js +25 -0
  173. package/dist/{chunk-RPFMQZA5.js → chunk-FBYUZOZP.js} +42 -31
  174. package/dist/chunk-FGW5GJ22.cjs +132 -0
  175. package/dist/{chunk-6Y5WRCPW.js → chunk-FWPBORRB.js} +1 -1
  176. package/dist/chunk-GENABQYA.cjs +47 -0
  177. package/dist/{chunk-TGHBKKSS.js → chunk-GIZU3H6H.js} +3 -43
  178. package/dist/chunk-GMN74OEY.cjs +63 -0
  179. package/dist/{chunk-Y47YTYQ3.cjs → chunk-H4LGWZMH.cjs} +159 -8
  180. package/dist/chunk-HKF2V5MM.cjs +214 -0
  181. package/dist/chunk-HLFH5HWR.js +81 -0
  182. package/dist/{chunk-4WRE4HQP.js → chunk-HWFM4MAT.js} +18 -6
  183. package/dist/{chunk-GY3BSHHS.cjs → chunk-HZSIUOCN.cjs} +2 -55
  184. package/dist/{chunk-D46EM4EN.js → chunk-I5WTQ5Y3.js} +4 -4
  185. package/dist/chunk-J2HZTJO6.js +26 -0
  186. package/dist/{chunk-NN25YMOL.js → chunk-J5ZGYQZK.js} +153 -35
  187. package/dist/{chunk-WRDKOSSM.js → chunk-JCEHZ336.js} +1 -1
  188. package/dist/chunk-JVUVOR6S.js +110 -0
  189. package/dist/chunk-K5IGFBDR.js +113 -0
  190. package/dist/{chunk-Q2KG6SQK.cjs → chunk-K7FV7W6U.cjs} +5 -5
  191. package/dist/{chunk-PWW64ZWO.cjs → chunk-KD4YYIIO.cjs} +1 -32
  192. package/dist/chunk-KGSADAOD.cjs +170 -0
  193. package/dist/{chunk-54YLXXS2.js → chunk-ME5BZ2WA.js} +2 -2
  194. package/dist/chunk-MPVCYU2K.cjs +104 -0
  195. package/dist/{chunk-EEMWQX3C.cjs → chunk-NTS5L4NQ.cjs} +3 -3
  196. package/dist/{chunk-WBK6XIDJ.js → chunk-OBEKX4VR.js} +2 -32
  197. package/dist/{chunk-EBNRZRWY.cjs → chunk-P6EZG2R7.cjs} +5 -5
  198. package/dist/{chunk-KYEY2LIB.cjs → chunk-P6P4DGLF.cjs} +3 -3
  199. package/dist/{chunk-GOBWKQCX.cjs → chunk-PULGVK2I.cjs} +3 -3
  200. package/dist/chunk-Q5SZIU7Z.cjs +47 -0
  201. package/dist/chunk-QKQHZIF3.cjs +86 -0
  202. package/dist/{chunk-3TWNBJFI.cjs → chunk-QP3VCSRY.cjs} +6 -6
  203. package/dist/{chunk-6ODY6MGL.cjs → chunk-R2TEDH2F.cjs} +5 -5
  204. package/dist/{chunk-YRZGXXWA.js → chunk-SQGPSMSK.js} +14 -20
  205. package/dist/{chunk-IW5LW6XS.js → chunk-TEEFR2FD.js} +28 -5
  206. package/dist/chunk-TGL5BGMR.js +218 -0
  207. package/dist/{chunk-62GU4OHH.cjs → chunk-TP567B3L.cjs} +13 -20
  208. package/dist/chunk-UKS23N3L.js +191 -0
  209. package/dist/chunk-USQ43DJ5.js +147 -0
  210. package/dist/{chunk-G2K6ETP4.cjs → chunk-UUHFKIWP.cjs} +18 -6
  211. package/dist/{chunk-2MNAZRWE.cjs → chunk-V272XR3F.cjs} +271 -2
  212. package/dist/chunk-VFFIE2VO.cjs +271 -0
  213. package/dist/{chunk-FIO65XYG.cjs → chunk-X5GCOMC3.cjs} +49 -38
  214. package/dist/{chunk-Y3ZSG3SJ.cjs → chunk-XSN4TLN5.cjs} +11 -30
  215. package/dist/chunk-ZKE73UQF.cjs +138 -0
  216. package/dist/index.cjs +342 -132
  217. package/dist/index.d.cts +26 -20
  218. package/dist/index.d.ts +26 -20
  219. package/dist/index.js +35 -29
  220. package/dist/styles.css +515 -230
  221. package/docs/llms/alert.md +4 -3
  222. package/docs/llms/badge.md +3 -3
  223. package/docs/llms/button.md +11 -41
  224. package/docs/llms/card.md +6 -12
  225. package/docs/llms/cascader.md +22 -0
  226. package/docs/llms/{accordion.md → collapse.md} +13 -11
  227. package/docs/llms/drawer.md +1 -1
  228. package/docs/llms/form.md +1 -1
  229. package/docs/llms/image.md +72 -1
  230. package/docs/llms/input.md +28 -18
  231. package/docs/llms/message.md +63 -0
  232. package/docs/llms/modal.md +30 -0
  233. package/docs/llms/popover.md +18 -1
  234. package/docs/llms/radio.md +37 -1
  235. package/docs/llms/select.md +22 -2
  236. package/docs/llms/spin.md +59 -0
  237. package/docs/llms/table.md +3 -3
  238. package/docs/llms/tag.md +3 -2
  239. package/docs/llms/theme.md +41 -4
  240. package/docs/llms/tooltip.md +16 -3
  241. package/docs/llms.md +8 -8
  242. package/package.json +32 -52
  243. package/dist/Accordion-REMDCQUD.css +0 -44
  244. package/dist/Accordion.cjs +0 -11
  245. package/dist/Accordion.d.cts +0 -33
  246. package/dist/Accordion.d.ts +0 -33
  247. package/dist/Accordion.js +0 -2
  248. package/dist/Empty-NQ72W3D7.css +0 -160
  249. package/dist/Tag-FGDY3W7E.css +0 -51
  250. package/dist/Toast-YSACW3EM.css +0 -45
  251. package/dist/Toast.cjs +0 -15
  252. package/dist/Toast.d.cts +0 -26
  253. package/dist/Toast.d.ts +0 -26
  254. package/dist/Toast.js +0 -2
  255. package/dist/chunk-32HBMXXV.cjs +0 -208
  256. package/dist/chunk-3XTHKAEY.js +0 -39
  257. package/dist/chunk-5M26OVVY.js +0 -90
  258. package/dist/chunk-DOMYUGJY.js +0 -132
  259. package/dist/chunk-DPNDHNKK.js +0 -185
  260. package/dist/chunk-G2XK57I7.cjs +0 -116
  261. package/dist/chunk-HBWO3QKW.js +0 -74
  262. package/dist/chunk-JVS5ZALZ.js +0 -123
  263. package/dist/chunk-LIGHV4RC.cjs +0 -121
  264. package/dist/chunk-MCTIA6RZ.js +0 -99
  265. package/dist/chunk-NC4YUEXM.cjs +0 -145
  266. package/dist/chunk-NJ6B22YJ.js +0 -170
  267. package/dist/chunk-W64ARHLJ.cjs +0 -62
  268. package/dist/chunk-ZFW6OYAO.cjs +0 -100
  269. package/docs/llms/spinner.md +0 -58
  270. package/docs/llms/toast.md +0 -51
package/dist/Image.cjs CHANGED
@@ -1,15 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunkG2XK57I7_cjs = require('./chunk-G2XK57I7.cjs');
4
- require('./chunk-2MNAZRWE.cjs');
3
+ var chunkVFFIE2VO_cjs = require('./chunk-VFFIE2VO.cjs');
4
+ require('./chunk-V272XR3F.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Image", {
9
9
  enumerable: true,
10
- get: function () { return chunkG2XK57I7_cjs.Image; }
10
+ get: function () { return chunkVFFIE2VO_cjs.Image; }
11
11
  });
12
12
  Object.defineProperty(exports, "ImageGrid", {
13
13
  enumerable: true,
14
- get: function () { return chunkG2XK57I7_cjs.ImageGrid; }
14
+ get: function () { return chunkVFFIE2VO_cjs.ImageGrid; }
15
+ });
16
+ Object.defineProperty(exports, "LayeredImage", {
17
+ enumerable: true,
18
+ get: function () { return chunkVFFIE2VO_cjs.LayeredImage; }
19
+ });
20
+ Object.defineProperty(exports, "SpriteImage", {
21
+ enumerable: true,
22
+ get: function () { return chunkVFFIE2VO_cjs.SpriteImage; }
15
23
  });
package/dist/Image.d.cts CHANGED
@@ -1,30 +1,103 @@
1
1
  import * as React from 'react';
2
2
 
3
+ type ImageVariant = "framed" | "raw" | "icon";
3
4
  interface ImageProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  src?: string;
5
6
  alt?: string;
6
7
  width?: number | string;
7
8
  height?: number | string;
9
+ /** Visual treatment. `framed` keeps the neumorphic shell; `raw`/`icon` remove padding by default. */
10
+ variant?: ImageVariant;
11
+ /** Whether to render the inner neumorphic frame. Defaults to true only for `framed`. */
12
+ frame?: boolean;
13
+ /** Outer padding. Defaults to 6px for framed images and 0 for raw/icon images. */
14
+ padding?: number | string;
15
+ /** CSS object-fit applied to the underlying img. */
16
+ objectFit?: React.CSSProperties["objectFit"];
17
+ /** CSS object-position applied to the underlying img. */
18
+ objectPosition?: React.CSSProperties["objectPosition"];
8
19
  /** Allow click-to-zoom preview overlay. */
9
20
  preview?: boolean;
10
21
  /** Hover scale-up. */
11
22
  hover?: boolean;
12
23
  /** Custom placeholder while loading or on error. */
13
24
  placeholder?: React.ReactNode;
25
+ /** Extra props forwarded to the underlying img. */
26
+ imgProps?: Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height">;
14
27
  className?: string;
15
28
  }
16
- /** `Image` — neumorphic framed image with optional preview overlay. */
29
+ /**
30
+ * `Image` — image surface with framed, raw and icon-oriented variants.
31
+ *
32
+ * @example
33
+ * <Image src={url} width={240} height={160} />
34
+ * <Image variant="icon" src={iconUrl} width={48} height={48} preview={false} />
35
+ */
17
36
  declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLDivElement>>;
37
+ interface ImageGridItem extends Omit<ImageProps, "children"> {
38
+ src: string;
39
+ alt?: string;
40
+ }
18
41
  interface ImageGridProps extends React.HTMLAttributes<HTMLDivElement> {
19
- images: {
20
- src: string;
21
- alt?: string;
22
- }[];
42
+ images: ImageGridItem[];
23
43
  columns?: number;
24
44
  itemHeight?: number;
45
+ minItemWidth?: number | string;
46
+ gap?: number | string;
47
+ imageProps?: Omit<ImageProps, "src" | "alt" | "width" | "height">;
25
48
  className?: string;
26
49
  }
27
50
  /** `ImageGrid` — auto-fit grid of `Image` items. */
28
51
  declare const ImageGrid: React.ForwardRefExoticComponent<ImageGridProps & React.RefAttributes<HTMLDivElement>>;
52
+ interface SpriteRect {
53
+ x: number;
54
+ y: number;
55
+ width: number;
56
+ height: number;
57
+ }
58
+ interface SpriteImageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
59
+ src: string;
60
+ sprite: SpriteRect;
61
+ alt?: string;
62
+ width?: number | string;
63
+ height?: number | string;
64
+ scale?: number;
65
+ backgroundSize?: string;
66
+ variant?: ImageVariant;
67
+ frame?: boolean;
68
+ padding?: number | string;
69
+ className?: string;
70
+ }
71
+ /**
72
+ * `SpriteImage` — crops one rectangle from a sprite sheet.
73
+ *
74
+ * @example
75
+ * <SpriteImage src={sheetUrl} sprite={{ x: 64, y: 32, width: 32, height: 32 }} />
76
+ */
77
+ declare const SpriteImage: React.ForwardRefExoticComponent<SpriteImageProps & React.RefAttributes<HTMLDivElement>>;
78
+ type LayeredImageInset = number | string | Partial<Record<"top" | "right" | "bottom" | "left", number | string>>;
79
+ interface LayeredImageLayer extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height"> {
80
+ src: string;
81
+ alt?: string;
82
+ fit?: React.CSSProperties["objectFit"];
83
+ inset?: LayeredImageInset;
84
+ zIndex?: number;
85
+ }
86
+ interface LayeredImageProps extends React.HTMLAttributes<HTMLDivElement> {
87
+ layers: LayeredImageLayer[];
88
+ width?: number | string;
89
+ height?: number | string;
90
+ variant?: ImageVariant;
91
+ frame?: boolean;
92
+ padding?: number | string;
93
+ className?: string;
94
+ }
95
+ /**
96
+ * `LayeredImage` — stacks several images in the same box, useful for avatar + frame assets.
97
+ *
98
+ * @example
99
+ * <LayeredImage layers={[{ src: headUrl }, { src: frameUrl }]} width={48} height={48} />
100
+ */
101
+ declare const LayeredImage: React.ForwardRefExoticComponent<LayeredImageProps & React.RefAttributes<HTMLDivElement>>;
29
102
 
30
- export { Image, ImageGrid, type ImageGridProps, type ImageProps };
103
+ export { Image, ImageGrid, type ImageGridItem, type ImageGridProps, type ImageProps, type ImageVariant, LayeredImage, type LayeredImageInset, type LayeredImageLayer, type LayeredImageProps, SpriteImage, type SpriteImageProps, type SpriteRect };
package/dist/Image.d.ts CHANGED
@@ -1,30 +1,103 @@
1
1
  import * as React from 'react';
2
2
 
3
+ type ImageVariant = "framed" | "raw" | "icon";
3
4
  interface ImageProps extends React.HTMLAttributes<HTMLDivElement> {
4
5
  src?: string;
5
6
  alt?: string;
6
7
  width?: number | string;
7
8
  height?: number | string;
9
+ /** Visual treatment. `framed` keeps the neumorphic shell; `raw`/`icon` remove padding by default. */
10
+ variant?: ImageVariant;
11
+ /** Whether to render the inner neumorphic frame. Defaults to true only for `framed`. */
12
+ frame?: boolean;
13
+ /** Outer padding. Defaults to 6px for framed images and 0 for raw/icon images. */
14
+ padding?: number | string;
15
+ /** CSS object-fit applied to the underlying img. */
16
+ objectFit?: React.CSSProperties["objectFit"];
17
+ /** CSS object-position applied to the underlying img. */
18
+ objectPosition?: React.CSSProperties["objectPosition"];
8
19
  /** Allow click-to-zoom preview overlay. */
9
20
  preview?: boolean;
10
21
  /** Hover scale-up. */
11
22
  hover?: boolean;
12
23
  /** Custom placeholder while loading or on error. */
13
24
  placeholder?: React.ReactNode;
25
+ /** Extra props forwarded to the underlying img. */
26
+ imgProps?: Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height">;
14
27
  className?: string;
15
28
  }
16
- /** `Image` — neumorphic framed image with optional preview overlay. */
29
+ /**
30
+ * `Image` — image surface with framed, raw and icon-oriented variants.
31
+ *
32
+ * @example
33
+ * <Image src={url} width={240} height={160} />
34
+ * <Image variant="icon" src={iconUrl} width={48} height={48} preview={false} />
35
+ */
17
36
  declare const Image: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLDivElement>>;
37
+ interface ImageGridItem extends Omit<ImageProps, "children"> {
38
+ src: string;
39
+ alt?: string;
40
+ }
18
41
  interface ImageGridProps extends React.HTMLAttributes<HTMLDivElement> {
19
- images: {
20
- src: string;
21
- alt?: string;
22
- }[];
42
+ images: ImageGridItem[];
23
43
  columns?: number;
24
44
  itemHeight?: number;
45
+ minItemWidth?: number | string;
46
+ gap?: number | string;
47
+ imageProps?: Omit<ImageProps, "src" | "alt" | "width" | "height">;
25
48
  className?: string;
26
49
  }
27
50
  /** `ImageGrid` — auto-fit grid of `Image` items. */
28
51
  declare const ImageGrid: React.ForwardRefExoticComponent<ImageGridProps & React.RefAttributes<HTMLDivElement>>;
52
+ interface SpriteRect {
53
+ x: number;
54
+ y: number;
55
+ width: number;
56
+ height: number;
57
+ }
58
+ interface SpriteImageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
59
+ src: string;
60
+ sprite: SpriteRect;
61
+ alt?: string;
62
+ width?: number | string;
63
+ height?: number | string;
64
+ scale?: number;
65
+ backgroundSize?: string;
66
+ variant?: ImageVariant;
67
+ frame?: boolean;
68
+ padding?: number | string;
69
+ className?: string;
70
+ }
71
+ /**
72
+ * `SpriteImage` — crops one rectangle from a sprite sheet.
73
+ *
74
+ * @example
75
+ * <SpriteImage src={sheetUrl} sprite={{ x: 64, y: 32, width: 32, height: 32 }} />
76
+ */
77
+ declare const SpriteImage: React.ForwardRefExoticComponent<SpriteImageProps & React.RefAttributes<HTMLDivElement>>;
78
+ type LayeredImageInset = number | string | Partial<Record<"top" | "right" | "bottom" | "left", number | string>>;
79
+ interface LayeredImageLayer extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "width" | "height"> {
80
+ src: string;
81
+ alt?: string;
82
+ fit?: React.CSSProperties["objectFit"];
83
+ inset?: LayeredImageInset;
84
+ zIndex?: number;
85
+ }
86
+ interface LayeredImageProps extends React.HTMLAttributes<HTMLDivElement> {
87
+ layers: LayeredImageLayer[];
88
+ width?: number | string;
89
+ height?: number | string;
90
+ variant?: ImageVariant;
91
+ frame?: boolean;
92
+ padding?: number | string;
93
+ className?: string;
94
+ }
95
+ /**
96
+ * `LayeredImage` — stacks several images in the same box, useful for avatar + frame assets.
97
+ *
98
+ * @example
99
+ * <LayeredImage layers={[{ src: headUrl }, { src: frameUrl }]} width={48} height={48} />
100
+ */
101
+ declare const LayeredImage: React.ForwardRefExoticComponent<LayeredImageProps & React.RefAttributes<HTMLDivElement>>;
29
102
 
30
- export { Image, ImageGrid, type ImageGridProps, type ImageProps };
103
+ export { Image, ImageGrid, type ImageGridItem, type ImageGridProps, type ImageProps, type ImageVariant, LayeredImage, type LayeredImageInset, type LayeredImageLayer, type LayeredImageProps, SpriteImage, type SpriteImageProps, type SpriteRect };
package/dist/Image.js CHANGED
@@ -1,2 +1,2 @@
1
- export { Image, ImageGrid } from './chunk-5M26OVVY.js';
2
- import './chunk-NJ6B22YJ.js';
1
+ export { Image, ImageGrid, LayeredImage, SpriteImage } from './chunk-DWAN57G4.js';
2
+ import './chunk-47VG2P34.js';
@@ -1,4 +1,4 @@
1
- /* ============ Input / Textarea ============ */
1
+ /* ============ Input ============ */
2
2
  .input-shell {
3
3
  display: inline-flex;
4
4
  flex-direction: column;
@@ -36,6 +36,16 @@
36
36
  color: var(--fg-subtle);
37
37
  flex-shrink: 0;
38
38
  display: inline-flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ line-height: 0;
42
+ }
43
+ .input-wrap .lead img,
44
+ .input-wrap .trail img {
45
+ display: block;
46
+ width: 16px;
47
+ height: 16px;
48
+ object-fit: contain;
39
49
  }
40
50
  .input-wrap .lead.interactive,
41
51
  .input-wrap .trail.interactive { cursor: pointer; pointer-events: auto; }
@@ -73,6 +83,20 @@
73
83
  background: var(--bg-sunken);
74
84
  }
75
85
 
86
+ .input-password-toggle {
87
+ border: none;
88
+ background: transparent;
89
+ color: var(--fg-subtle);
90
+ padding: 0;
91
+ display: inline-flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ cursor: pointer;
95
+ font-family: inherit;
96
+ flex-shrink: 0;
97
+ }
98
+ .input-password-toggle:hover { color: var(--fg); }
99
+
76
100
  .input-wrap > .input {
77
101
  flex: 1;
78
102
  min-width: 0;
@@ -91,44 +115,3 @@
91
115
  .input-wrap.lg > .input { font-size: 14px; }
92
116
  .input-wrap > .input::placeholder { color: var(--fg-subtle); }
93
117
  .input-wrap.disabled > .input { cursor: not-allowed; }
94
-
95
- .textarea-wrap { position: relative; width: 100%; }
96
- .textarea-wrap .textarea-clear {
97
- position: absolute;
98
- top: 10px;
99
- right: 10px;
100
- display: inline-flex;
101
- align-items: center;
102
- justify-content: center;
103
- width: 18px;
104
- height: 18px;
105
- border-radius: 999px;
106
- color: var(--fg-subtle);
107
- background: transparent;
108
- cursor: pointer;
109
- transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
110
- }
111
- .textarea-wrap .textarea-clear:hover {
112
- color: var(--fg);
113
- background: var(--bg-sunken);
114
- }
115
-
116
- .textarea {
117
- width: 100%;
118
- min-height: 96px;
119
- padding: 12px 14px;
120
- border: none;
121
- border-radius: var(--r-md);
122
- background: var(--bg);
123
- box-shadow: var(--neu-in-sm);
124
- color: var(--fg);
125
- font-size: 13px;
126
- font-family: inherit;
127
- line-height: 1.55;
128
- resize: vertical;
129
- outline: none;
130
- transition: box-shadow var(--dur) var(--ease);
131
- }
132
- .textarea:focus { box-shadow: var(--neu-in-sm), 0 0 0 2px var(--accent-glow); }
133
- .textarea.invalid { box-shadow: var(--neu-in-sm), 0 0 0 2px color-mix(in oklch, var(--danger) 30%, transparent); }
134
- .textarea::placeholder { color: var(--fg-subtle); }
package/dist/Input.cjs CHANGED
@@ -1,15 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunk32HBMXXV_cjs = require('./chunk-32HBMXXV.cjs');
4
- require('./chunk-2MNAZRWE.cjs');
3
+ var chunkHKF2V5MM_cjs = require('./chunk-HKF2V5MM.cjs');
4
+ require('./chunk-MPVCYU2K.cjs');
5
+ require('./chunk-V272XR3F.cjs');
5
6
 
6
7
 
7
8
 
8
9
  Object.defineProperty(exports, "Input", {
9
10
  enumerable: true,
10
- get: function () { return chunk32HBMXXV_cjs.Input; }
11
+ get: function () { return chunkHKF2V5MM_cjs.Input; }
11
12
  });
12
- Object.defineProperty(exports, "Textarea", {
13
+ Object.defineProperty(exports, "InputPassword", {
13
14
  enumerable: true,
14
- get: function () { return chunk32HBMXXV_cjs.Textarea; }
15
+ get: function () { return chunkHKF2V5MM_cjs.InputPassword; }
15
16
  });
package/dist/Input.d.cts CHANGED
@@ -1,13 +1,18 @@
1
1
  import * as React from 'react';
2
- import { IconName } from './Icon.cjs';
2
+ import { IconSlot } from './Icon.cjs';
3
+ import { Textarea, TextareaProps } from './Textarea.cjs';
4
+ import 'react/jsx-runtime';
3
5
 
4
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
6
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix" | "value" | "defaultValue"> {
5
7
  value?: string;
6
8
  defaultValue?: string;
7
- onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
9
+ /** Native input change event. */
10
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
11
+ /** Convenience value callback for Lumina-style code. */
12
+ onValueChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
8
13
  placeholder?: string;
9
- leadingIcon?: IconName;
10
- trailingIcon?: IconName;
14
+ leadingIcon?: IconSlot;
15
+ trailingIcon?: IconSlot;
11
16
  /** Click handler for the leading icon (stops propagation so the input isn't focused). */
12
17
  onLeadingIconClick?: (e: React.MouseEvent<SVGSVGElement>) => void;
13
18
  /** Click handler for the trailing icon — e.g. password visibility toggle. */
@@ -27,26 +32,18 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
27
32
  suffix?: React.ReactNode;
28
33
  className?: string;
29
34
  }
30
- /**
31
- * `Input` — single-line text field with optional leading/trailing icons.
32
- */
33
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
34
- interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
35
- value?: string;
36
- defaultValue?: string;
37
- onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
38
- invalid?: boolean;
39
- /** Show a × button in the top-right corner to clear the value. */
40
- allowClear?: boolean;
41
- /** Max length — forwarded to the native textarea. */
42
- maxLength?: number;
43
- /** Render a "N / max" counter beneath the textarea. */
44
- showCount?: boolean;
45
- className?: string;
35
+ interface InputPasswordProps extends Omit<InputProps, "type" | "trailingIcon" | "onTrailingIconClick"> {
36
+ /** Show the eye toggle. Default true. */
37
+ visibilityToggle?: boolean;
38
+ /** Customize the visibility icon. */
39
+ iconRender?: (visible: boolean) => React.ReactNode;
46
40
  }
47
- /**
48
- * `Textarea` — multi-line text input with the same neumorphic groove as `Input`.
49
- */
50
- declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
41
+ type InputComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>> & {
42
+ Password: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
43
+ TextArea: typeof Textarea;
44
+ };
45
+ declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
46
+ declare const Input: InputComponent;
47
+ type InputTextAreaProps = TextareaProps;
51
48
 
52
- export { Input, type InputProps, Textarea, type TextareaProps };
49
+ export { Input, type InputComponent, InputPassword, type InputPasswordProps, type InputProps, type InputTextAreaProps };
package/dist/Input.d.ts CHANGED
@@ -1,13 +1,18 @@
1
1
  import * as React from 'react';
2
- import { IconName } from './Icon.js';
2
+ import { IconSlot } from './Icon.js';
3
+ import { Textarea, TextareaProps } from './Textarea.js';
4
+ import 'react/jsx-runtime';
3
5
 
4
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
6
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix" | "value" | "defaultValue"> {
5
7
  value?: string;
6
8
  defaultValue?: string;
7
- onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
9
+ /** Native input change event. */
10
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
11
+ /** Convenience value callback for Lumina-style code. */
12
+ onValueChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
8
13
  placeholder?: string;
9
- leadingIcon?: IconName;
10
- trailingIcon?: IconName;
14
+ leadingIcon?: IconSlot;
15
+ trailingIcon?: IconSlot;
11
16
  /** Click handler for the leading icon (stops propagation so the input isn't focused). */
12
17
  onLeadingIconClick?: (e: React.MouseEvent<SVGSVGElement>) => void;
13
18
  /** Click handler for the trailing icon — e.g. password visibility toggle. */
@@ -27,26 +32,18 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
27
32
  suffix?: React.ReactNode;
28
33
  className?: string;
29
34
  }
30
- /**
31
- * `Input` — single-line text field with optional leading/trailing icons.
32
- */
33
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
34
- interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
35
- value?: string;
36
- defaultValue?: string;
37
- onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
38
- invalid?: boolean;
39
- /** Show a × button in the top-right corner to clear the value. */
40
- allowClear?: boolean;
41
- /** Max length — forwarded to the native textarea. */
42
- maxLength?: number;
43
- /** Render a "N / max" counter beneath the textarea. */
44
- showCount?: boolean;
45
- className?: string;
35
+ interface InputPasswordProps extends Omit<InputProps, "type" | "trailingIcon" | "onTrailingIconClick"> {
36
+ /** Show the eye toggle. Default true. */
37
+ visibilityToggle?: boolean;
38
+ /** Customize the visibility icon. */
39
+ iconRender?: (visible: boolean) => React.ReactNode;
46
40
  }
47
- /**
48
- * `Textarea` — multi-line text input with the same neumorphic groove as `Input`.
49
- */
50
- declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
41
+ type InputComponent = React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>> & {
42
+ Password: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
43
+ TextArea: typeof Textarea;
44
+ };
45
+ declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProps & React.RefAttributes<HTMLInputElement>>;
46
+ declare const Input: InputComponent;
47
+ type InputTextAreaProps = TextareaProps;
51
48
 
52
- export { Input, type InputProps, Textarea, type TextareaProps };
49
+ export { Input, type InputComponent, InputPassword, type InputPasswordProps, type InputProps, type InputTextAreaProps };
package/dist/Input.js CHANGED
@@ -1,2 +1,3 @@
1
- export { Input, Textarea } from './chunk-DPNDHNKK.js';
2
- import './chunk-NJ6B22YJ.js';
1
+ export { Input, InputPassword } from './chunk-UKS23N3L.js';
2
+ import './chunk-HLFH5HWR.js';
3
+ import './chunk-47VG2P34.js';
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk3TWNBJFI_cjs = require('./chunk-3TWNBJFI.cjs');
4
- require('./chunk-32HBMXXV.cjs');
5
- require('./chunk-2MNAZRWE.cjs');
3
+ var chunkQP3VCSRY_cjs = require('./chunk-QP3VCSRY.cjs');
4
+ require('./chunk-HKF2V5MM.cjs');
5
+ require('./chunk-MPVCYU2K.cjs');
6
+ require('./chunk-V272XR3F.cjs');
6
7
 
7
8
 
8
9
 
9
10
  Object.defineProperty(exports, "InputNumber", {
10
11
  enumerable: true,
11
- get: function () { return chunk3TWNBJFI_cjs.InputNumber; }
12
+ get: function () { return chunkQP3VCSRY_cjs.InputNumber; }
12
13
  });
@@ -9,7 +9,7 @@ interface InputNumberProps extends Omit<React.InputHTMLAttributes<HTMLInputEleme
9
9
  onChange?: (value: number | null) => void;
10
10
  onBlur?: React.FocusEventHandler<HTMLInputElement>;
11
11
  onFocus?: React.FocusEventHandler<HTMLInputElement>;
12
- /** Fires when the Enter key is pressed (matches antd's `onPressEnter`). */
12
+ /** Fires when the Enter key is pressed. */
13
13
  onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
14
14
  min?: number;
15
15
  max?: number;
@@ -9,7 +9,7 @@ interface InputNumberProps extends Omit<React.InputHTMLAttributes<HTMLInputEleme
9
9
  onChange?: (value: number | null) => void;
10
10
  onBlur?: React.FocusEventHandler<HTMLInputElement>;
11
11
  onFocus?: React.FocusEventHandler<HTMLInputElement>;
12
- /** Fires when the Enter key is pressed (matches antd's `onPressEnter`). */
12
+ /** Fires when the Enter key is pressed. */
13
13
  onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
14
14
  min?: number;
15
15
  max?: number;
@@ -1,3 +1,4 @@
1
- export { InputNumber } from './chunk-OI3CWXT3.js';
2
- import './chunk-DPNDHNKK.js';
3
- import './chunk-NJ6B22YJ.js';
1
+ export { InputNumber } from './chunk-BVQ77VRY.js';
2
+ import './chunk-UKS23N3L.js';
3
+ import './chunk-HLFH5HWR.js';
4
+ import './chunk-47VG2P34.js';
@@ -0,0 +1,45 @@
1
+ /* ============ Message ============ */
2
+ .message-container {
3
+ position: fixed;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: 10px;
7
+ z-index: 300;
8
+ pointer-events: none;
9
+ }
10
+ .message-container.top-right { top: 56px; right: 20px; }
11
+ .message-container.top-left { top: 56px; left: 20px; }
12
+ .message-container.bottom-right { bottom: 20px; right: 20px; }
13
+ .message-container.bottom-left { bottom: 20px; left: 20px; }
14
+ .message-container.top-center { top: 56px; left: 50%; transform: translateX(-50%); align-items: center; }
15
+ .message {
16
+ background: var(--bg);
17
+ border-radius: var(--r-md);
18
+ box-shadow: var(--neu-float);
19
+ padding: 12px 16px;
20
+ min-width: 240px;
21
+ display: flex; align-items: center; gap: 10px;
22
+ font-size: 13px;
23
+ pointer-events: auto;
24
+ animation: messageIn var(--dur-slow) var(--ease);
25
+ border-left: 3px solid var(--accent);
26
+ }
27
+ .message.success { border-color: var(--success); }
28
+ .message.warning { border-color: var(--warning); }
29
+ .message.error { border-color: var(--danger); }
30
+ .message .message-icon { color: var(--accent); flex-shrink: 0; }
31
+ .message.success .message-icon { color: var(--success); }
32
+ .message.warning .message-icon { color: var(--warning); }
33
+ .message.error .message-icon { color: var(--danger); }
34
+ .message-body { flex: 1; min-width: 0; }
35
+ .message-title { font-weight: 600; margin-bottom: 2px; }
36
+ .message-content { color: var(--fg-muted); font-size: 12px; }
37
+ .message-close {
38
+ background: transparent; border: none;
39
+ color: var(--fg-subtle); cursor: pointer;
40
+ padding: 0 2px; font-family: inherit;
41
+ }
42
+ .message-close:hover { color: var(--fg); }
43
+ .message.leaving { animation: messageOut var(--dur) var(--ease) forwards; }
44
+ @keyframes messageIn { from { opacity: 0; transform: translateX(20px); } }
45
+ @keyframes messageOut { to { opacity: 0; transform: translateX(20px); } }
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var chunkZKE73UQF_cjs = require('./chunk-ZKE73UQF.cjs');
4
+ require('./chunk-V272XR3F.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "MessageContainer", {
9
+ enumerable: true,
10
+ get: function () { return chunkZKE73UQF_cjs.MessageContainer; }
11
+ });
12
+ Object.defineProperty(exports, "ToastContainer", {
13
+ enumerable: true,
14
+ get: function () { return chunkZKE73UQF_cjs.ToastContainer; }
15
+ });
16
+ Object.defineProperty(exports, "message", {
17
+ enumerable: true,
18
+ get: function () { return chunkZKE73UQF_cjs.message; }
19
+ });
20
+ Object.defineProperty(exports, "toast", {
21
+ enumerable: true,
22
+ get: function () { return chunkZKE73UQF_cjs.toast; }
23
+ });