@fangxinyan/lumina 0.1.5 → 0.2.0

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 (220) hide show
  1. package/dist/{Accordion-GSBY5T5U.css → Accordion-3TQPKNN3.css} +8 -1
  2. package/dist/Accordion.cjs +2 -2
  3. package/dist/Accordion.d.cts +12 -0
  4. package/dist/Accordion.d.ts +12 -0
  5. package/dist/Accordion.js +1 -1
  6. package/dist/{Alert-LSKBYDRI.css → Alert-JJ7GB3UU.css} +11 -0
  7. package/dist/Alert.cjs +2 -2
  8. package/dist/Alert.d.cts +4 -0
  9. package/dist/Alert.d.ts +4 -0
  10. package/dist/Alert.js +1 -1
  11. package/dist/{Avatar-OXDSG5Q6.css → Avatar-R5A4AFKZ.css} +4 -0
  12. package/dist/Avatar.cjs +2 -2
  13. package/dist/Avatar.d.cts +2 -0
  14. package/dist/Avatar.d.ts +2 -0
  15. package/dist/Avatar.js +1 -1
  16. package/dist/{Button-5UI7QXGU.css → Button-SDQD25AG.css} +2 -0
  17. package/dist/Button.cjs +3 -3
  18. package/dist/Button.d.cts +2 -0
  19. package/dist/Button.d.ts +2 -0
  20. package/dist/Button.js +1 -1
  21. package/dist/Calendar.cjs +2 -2
  22. package/dist/Calendar.d.cts +8 -0
  23. package/dist/Calendar.d.ts +8 -0
  24. package/dist/Calendar.js +1 -1
  25. package/dist/{Card-2CHHFD4Y.css → Card-RG7ECXL2.css} +11 -0
  26. package/dist/Card.cjs +3 -3
  27. package/dist/Card.d.cts +2 -0
  28. package/dist/Card.d.ts +2 -0
  29. package/dist/Card.js +1 -1
  30. package/dist/{Divider-Z37INS5E.css → Divider-OEE4Q2KS.css} +31 -0
  31. package/dist/Divider.cjs +2 -2
  32. package/dist/Divider.d.cts +7 -0
  33. package/dist/Divider.d.ts +7 -0
  34. package/dist/Divider.js +1 -1
  35. package/dist/Drawer-IPGB4CXH.css +101 -0
  36. package/dist/Drawer.cjs +13 -0
  37. package/dist/Drawer.cjs.map +1 -0
  38. package/dist/Drawer.d.cts +45 -0
  39. package/dist/Drawer.d.ts +45 -0
  40. package/dist/Drawer.js +4 -0
  41. package/dist/Drawer.js.map +1 -0
  42. package/dist/{Empty-VM23UNLQ.css → Empty-NQ72W3D7.css} +22 -0
  43. package/dist/Empty.cjs +4 -4
  44. package/dist/Empty.d.cts +42 -2
  45. package/dist/Empty.d.ts +42 -2
  46. package/dist/Empty.js +1 -1
  47. package/dist/Input-33CAH4O6.css +134 -0
  48. package/dist/Input.cjs +3 -3
  49. package/dist/Input.d.cts +17 -1
  50. package/dist/Input.d.ts +17 -1
  51. package/dist/Input.js +1 -1
  52. package/dist/Modal-N4YVLEWW.css +72 -0
  53. package/dist/Modal.cjs +3 -7
  54. package/dist/Modal.d.cts +37 -8
  55. package/dist/Modal.d.ts +37 -8
  56. package/dist/Modal.js +2 -2
  57. package/dist/{Pagination-6FFOI4NM.css → Pagination-YIRYJUXP.css} +33 -0
  58. package/dist/Pagination.cjs +5 -2
  59. package/dist/Pagination.d.cts +14 -0
  60. package/dist/Pagination.d.ts +14 -0
  61. package/dist/Pagination.js +4 -1
  62. package/dist/Select.cjs +3 -3
  63. package/dist/Select.js +2 -2
  64. package/dist/{Slider-RE4HZQKF.css → Slider-X4PVA65R.css} +51 -2
  65. package/dist/Slider.cjs +2 -2
  66. package/dist/Slider.d.cts +20 -5
  67. package/dist/Slider.d.ts +20 -5
  68. package/dist/Slider.js +1 -1
  69. package/dist/Switch-36KJNDXM.css +92 -0
  70. package/dist/Switch.cjs +2 -2
  71. package/dist/Switch.d.cts +4 -0
  72. package/dist/Switch.d.ts +4 -0
  73. package/dist/Switch.js +1 -1
  74. package/dist/Table-ADVN6LXP.css +295 -0
  75. package/dist/Table.cjs +7 -3
  76. package/dist/Table.d.cts +103 -7
  77. package/dist/Table.d.ts +103 -7
  78. package/dist/Table.js +5 -1
  79. package/dist/{Tabs-A27TSZOP.css → Tabs-RHK6XAFF.css} +7 -0
  80. package/dist/Tabs.cjs +3 -3
  81. package/dist/Tabs.d.cts +2 -0
  82. package/dist/Tabs.d.ts +2 -0
  83. package/dist/Tabs.js +1 -1
  84. package/dist/{Tag-EYOY3UWG.css → Tag-FGDY3W7E.css} +2 -0
  85. package/dist/Tag.cjs +3 -3
  86. package/dist/Tag.d.cts +5 -0
  87. package/dist/Tag.d.ts +5 -0
  88. package/dist/Tag.js +1 -1
  89. package/dist/chunk-437LB2V4.js +111 -0
  90. package/dist/chunk-437LB2V4.js.map +1 -0
  91. package/dist/chunk-4MR4GVTD.js +73 -0
  92. package/dist/chunk-4MR4GVTD.js.map +1 -0
  93. package/dist/{chunk-OXYFB2ZI.js → chunk-4U4OY5RA.js} +11 -5
  94. package/dist/chunk-4U4OY5RA.js.map +1 -0
  95. package/dist/chunk-55NTFU7Y.js +476 -0
  96. package/dist/chunk-55NTFU7Y.js.map +1 -0
  97. package/dist/{chunk-5EYI27B6.js → chunk-77BVQNAQ.js} +5 -3
  98. package/dist/chunk-77BVQNAQ.js.map +1 -0
  99. package/dist/chunk-AEJJGUEN.cjs +127 -0
  100. package/dist/chunk-AEJJGUEN.cjs.map +1 -0
  101. package/dist/{chunk-3QWHDCHJ.js → chunk-AJZKESHB.js} +13 -4
  102. package/dist/chunk-AJZKESHB.js.map +1 -0
  103. package/dist/{chunk-NZPJ7BUB.cjs → chunk-AXMEZGEG.cjs} +13 -4
  104. package/dist/chunk-AXMEZGEG.cjs.map +1 -0
  105. package/dist/{chunk-HTP6UEVR.js → chunk-BBPNQ44M.js} +22 -6
  106. package/dist/chunk-BBPNQ44M.js.map +1 -0
  107. package/dist/chunk-CCBHZYE6.cjs +150 -0
  108. package/dist/chunk-CCBHZYE6.cjs.map +1 -0
  109. package/dist/{chunk-KGYLUZOU.cjs → chunk-EPFYIR63.cjs} +5 -5
  110. package/dist/{chunk-KGYLUZOU.cjs.map → chunk-EPFYIR63.cjs.map} +1 -1
  111. package/dist/chunk-F7HW2PYR.cjs +119 -0
  112. package/dist/chunk-F7HW2PYR.cjs.map +1 -0
  113. package/dist/chunk-GIVMKGZN.js +39 -0
  114. package/dist/chunk-GIVMKGZN.js.map +1 -0
  115. package/dist/{chunk-FMG3ZPGK.js → chunk-H6FCIJOP.js} +5 -3
  116. package/dist/chunk-H6FCIJOP.js.map +1 -0
  117. package/dist/{chunk-ALFDP5WX.cjs → chunk-IDM6JJLP.cjs} +22 -6
  118. package/dist/chunk-IDM6JJLP.cjs.map +1 -0
  119. package/dist/chunk-IFERLHCL.cjs +499 -0
  120. package/dist/chunk-IFERLHCL.cjs.map +1 -0
  121. package/dist/chunk-IWVKITPN.js +102 -0
  122. package/dist/chunk-IWVKITPN.js.map +1 -0
  123. package/dist/{chunk-I2ERCHFV.cjs → chunk-JKLQOB2F.cjs} +11 -5
  124. package/dist/chunk-JKLQOB2F.cjs.map +1 -0
  125. package/dist/{chunk-IGHLSNXT.cjs → chunk-K7PVJLW4.cjs} +51 -4
  126. package/dist/chunk-K7PVJLW4.cjs.map +1 -0
  127. package/dist/chunk-LDENBYRC.cjs +210 -0
  128. package/dist/chunk-LDENBYRC.cjs.map +1 -0
  129. package/dist/chunk-LSLYY5FN.js +125 -0
  130. package/dist/chunk-LSLYY5FN.js.map +1 -0
  131. package/dist/chunk-NSUD5B22.js +187 -0
  132. package/dist/chunk-NSUD5B22.js.map +1 -0
  133. package/dist/{chunk-AAMYURWQ.cjs → chunk-OPTTHURA.cjs} +5 -3
  134. package/dist/chunk-OPTTHURA.cjs.map +1 -0
  135. package/dist/{chunk-F3NHM4GX.js → chunk-OYGFMXAA.js} +13 -4
  136. package/dist/chunk-OYGFMXAA.js.map +1 -0
  137. package/dist/chunk-PBBHUUXU.cjs +133 -0
  138. package/dist/chunk-PBBHUUXU.cjs.map +1 -0
  139. package/dist/chunk-RDLPX7RK.cjs +95 -0
  140. package/dist/chunk-RDLPX7RK.cjs.map +1 -0
  141. package/dist/{chunk-XFRP2MBR.js → chunk-TYQ5CN2C.js} +51 -4
  142. package/dist/chunk-TYQ5CN2C.js.map +1 -0
  143. package/dist/{chunk-7CKHWCEA.cjs → chunk-TZSWDH5T.cjs} +5 -3
  144. package/dist/chunk-TZSWDH5T.cjs.map +1 -0
  145. package/dist/{chunk-VMHNKD3N.cjs → chunk-URF6RBW6.cjs} +13 -4
  146. package/dist/chunk-URF6RBW6.cjs.map +1 -0
  147. package/dist/{chunk-G3UWXSNQ.js → chunk-V34OPWKZ.js} +5 -4
  148. package/dist/chunk-V34OPWKZ.js.map +1 -0
  149. package/dist/{chunk-ITGCHU3Y.cjs → chunk-VICGQC6G.cjs} +5 -4
  150. package/dist/chunk-VICGQC6G.cjs.map +1 -0
  151. package/dist/chunk-YEOARJKR.cjs +40 -0
  152. package/dist/chunk-YEOARJKR.cjs.map +1 -0
  153. package/dist/chunk-Z5X5AMLA.cjs +41 -0
  154. package/dist/chunk-Z5X5AMLA.cjs.map +1 -0
  155. package/dist/chunk-Z7P6QGMT.js +115 -0
  156. package/dist/chunk-Z7P6QGMT.js.map +1 -0
  157. package/dist/{chunk-OYH6A7IQ.js → chunk-ZVCMXDTP.js} +3 -3
  158. package/dist/{chunk-OYH6A7IQ.js.map → chunk-ZVCMXDTP.js.map} +1 -1
  159. package/dist/chunk-ZWP4LSS3.js +38 -0
  160. package/dist/chunk-ZWP4LSS3.js.map +1 -0
  161. package/dist/index.cjs +57 -56
  162. package/dist/index.cjs.map +1 -1
  163. package/dist/index.d.cts +6 -5
  164. package/dist/index.d.ts +6 -5
  165. package/dist/index.js +19 -18
  166. package/dist/index.js.map +1 -1
  167. package/dist/styles.css +566 -50
  168. package/package.json +1 -1
  169. package/dist/Input-Z526ARZP.css +0 -66
  170. package/dist/Modal-AYKNIWWQ.css +0 -79
  171. package/dist/Switch-NP7KKJOX.css +0 -44
  172. package/dist/Table-ZDPGWLH3.css +0 -139
  173. package/dist/chunk-2VA2HSL4.cjs +0 -121
  174. package/dist/chunk-2VA2HSL4.cjs.map +0 -1
  175. package/dist/chunk-2W2AJUZW.js +0 -118
  176. package/dist/chunk-2W2AJUZW.js.map +0 -1
  177. package/dist/chunk-3QWHDCHJ.js.map +0 -1
  178. package/dist/chunk-4AA22BOG.js +0 -63
  179. package/dist/chunk-4AA22BOG.js.map +0 -1
  180. package/dist/chunk-5EYI27B6.js.map +0 -1
  181. package/dist/chunk-77NP67ML.cjs +0 -70
  182. package/dist/chunk-77NP67ML.cjs.map +0 -1
  183. package/dist/chunk-7CKHWCEA.cjs.map +0 -1
  184. package/dist/chunk-7NM5BRUX.js +0 -91
  185. package/dist/chunk-7NM5BRUX.js.map +0 -1
  186. package/dist/chunk-7UJI437T.js +0 -49
  187. package/dist/chunk-7UJI437T.js.map +0 -1
  188. package/dist/chunk-AAMYURWQ.cjs.map +0 -1
  189. package/dist/chunk-ALFDP5WX.cjs.map +0 -1
  190. package/dist/chunk-F3NHM4GX.js.map +0 -1
  191. package/dist/chunk-FMG3ZPGK.js.map +0 -1
  192. package/dist/chunk-G3UWXSNQ.js.map +0 -1
  193. package/dist/chunk-HTP6UEVR.js.map +0 -1
  194. package/dist/chunk-I2ERCHFV.cjs.map +0 -1
  195. package/dist/chunk-IBZAGURN.cjs +0 -71
  196. package/dist/chunk-IBZAGURN.cjs.map +0 -1
  197. package/dist/chunk-IGHLSNXT.cjs.map +0 -1
  198. package/dist/chunk-ITGCHU3Y.cjs.map +0 -1
  199. package/dist/chunk-JNFCTYJT.cjs +0 -31
  200. package/dist/chunk-JNFCTYJT.cjs.map +0 -1
  201. package/dist/chunk-JWFVSBVX.cjs +0 -30
  202. package/dist/chunk-JWFVSBVX.cjs.map +0 -1
  203. package/dist/chunk-K67KIKX4.cjs +0 -67
  204. package/dist/chunk-K67KIKX4.cjs.map +0 -1
  205. package/dist/chunk-KF4MCHZL.cjs +0 -105
  206. package/dist/chunk-KF4MCHZL.cjs.map +0 -1
  207. package/dist/chunk-M6OTFXZA.js +0 -48
  208. package/dist/chunk-M6OTFXZA.js.map +0 -1
  209. package/dist/chunk-NWJW5KLN.js +0 -29
  210. package/dist/chunk-NWJW5KLN.js.map +0 -1
  211. package/dist/chunk-NZPJ7BUB.cjs.map +0 -1
  212. package/dist/chunk-OXYFB2ZI.js.map +0 -1
  213. package/dist/chunk-Q33V7MSK.js +0 -79
  214. package/dist/chunk-Q33V7MSK.js.map +0 -1
  215. package/dist/chunk-QT7SJITQ.cjs +0 -114
  216. package/dist/chunk-QT7SJITQ.cjs.map +0 -1
  217. package/dist/chunk-VMHNKD3N.cjs.map +0 -1
  218. package/dist/chunk-VXITDXLW.js +0 -28
  219. package/dist/chunk-VXITDXLW.js.map +0 -1
  220. package/dist/chunk-XFRP2MBR.js.map +0 -1
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+
3
+ interface DrawerProps {
4
+ /** Whether the drawer is visible. */
5
+ open: boolean;
6
+ /** Close callback (triggered by mask click / close button / Esc). */
7
+ onClose?: () => void;
8
+ /** Which edge the drawer slides from. */
9
+ placement?: "left" | "right" | "top" | "bottom";
10
+ /** Width (for left/right) or height (for top/bottom). Number → px. */
11
+ size?: number | string;
12
+ /** Header title. */
13
+ title?: React.ReactNode;
14
+ /** Extra content rendered to the right of the title (e.g. action buttons). */
15
+ extra?: React.ReactNode;
16
+ /** Footer content. */
17
+ footer?: React.ReactNode;
18
+ /** Drawer body. */
19
+ children?: React.ReactNode;
20
+ /** Render the mask overlay. Default true. Set `false` for a non-blocking drawer. */
21
+ mask?: boolean;
22
+ /** Close when clicking the mask. Default true. Ignored when `mask` is false. */
23
+ maskClosable?: boolean;
24
+ /** Close on Escape key. Default true. */
25
+ keyboard?: boolean;
26
+ /** Show the close (×) button in the header. Default true. */
27
+ closable?: boolean;
28
+ /** Override the close icon node. */
29
+ closeIcon?: React.ReactNode;
30
+ /**
31
+ * When true the drawer's children are unmounted every time it closes.
32
+ * Default `false` — children stay mounted across open/close cycles so
33
+ * internal state (form fields, scroll position) is preserved.
34
+ */
35
+ destroyOnClose?: boolean;
36
+ /** Fires after the open/close animation finishes. */
37
+ afterOpenChange?: (open: boolean) => void;
38
+ /** Stack index for nested drawers. */
39
+ zIndex?: number;
40
+ className?: string;
41
+ }
42
+ /** `Drawer` — slide-in panel from an edge. */
43
+ declare const Drawer: React.FC<DrawerProps>;
44
+
45
+ export { Drawer, type DrawerProps };
package/dist/Drawer.js ADDED
@@ -0,0 +1,4 @@
1
+ export { Drawer } from './chunk-IWVKITPN.js';
2
+ import './chunk-GEYMWUW6.js';
3
+ //# sourceMappingURL=Drawer.js.map
4
+ //# sourceMappingURL=Drawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"Drawer.js"}
@@ -136,3 +136,25 @@
136
136
  .skeleton.circle { border-radius: 999px; }
137
137
  @keyframes skel-wave { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
138
138
  @keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
139
+
140
+ /* Composite skeleton — avatar + title + paragraph layout */
141
+ .skeleton-box {
142
+ display: flex;
143
+ align-items: flex-start;
144
+ gap: 16px;
145
+ width: 100%;
146
+ }
147
+ .skeleton-content {
148
+ flex: 1;
149
+ min-width: 0;
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 12px;
153
+ }
154
+ .skeleton-box .skeleton-title {
155
+ display: block;
156
+ margin-bottom: 4px;
157
+ }
158
+ .skeleton-box .skeleton-row {
159
+ display: block;
160
+ }
package/dist/Empty.cjs CHANGED
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkK67KIKX4_cjs = require('./chunk-K67KIKX4.cjs');
3
+ var chunkF7HW2PYR_cjs = require('./chunk-F7HW2PYR.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Empty", {
8
8
  enumerable: true,
9
- get: function () { return chunkK67KIKX4_cjs.Empty; }
9
+ get: function () { return chunkF7HW2PYR_cjs.Empty; }
10
10
  });
11
11
  Object.defineProperty(exports, "Skeleton", {
12
12
  enumerable: true,
13
- get: function () { return chunkK67KIKX4_cjs.Skeleton; }
13
+ get: function () { return chunkF7HW2PYR_cjs.Skeleton; }
14
14
  });
15
15
  Object.defineProperty(exports, "Spinner", {
16
16
  enumerable: true,
17
- get: function () { return chunkK67KIKX4_cjs.Spinner; }
17
+ get: function () { return chunkF7HW2PYR_cjs.Spinner; }
18
18
  });
19
19
  //# sourceMappingURL=Empty.cjs.map
20
20
  //# sourceMappingURL=Empty.cjs.map
package/dist/Empty.d.cts CHANGED
@@ -23,15 +23,55 @@ interface SpinnerProps {
23
23
  }
24
24
  /** `Spinner` — loading indicator. */
25
25
  declare const Spinner: React.FC<SpinnerProps>;
26
+ interface SkeletonAvatarConfig {
27
+ shape?: "circle" | "square";
28
+ size?: "sm" | "md" | "lg";
29
+ }
30
+ interface SkeletonTitleConfig {
31
+ width?: number | string;
32
+ }
33
+ interface SkeletonParagraphConfig {
34
+ rows?: number;
35
+ width?: (number | string)[];
36
+ }
26
37
  interface SkeletonProps {
27
38
  width?: number | string;
28
39
  height?: number | string;
29
40
  circle?: boolean;
30
41
  /** `wave` is a shimmer sweep; `pulse` fades opacity; `none` disables animation. */
31
42
  animation?: "wave" | "pulse" | "none";
43
+ /**
44
+ * Render an avatar skeleton on the left. `true` gives the defaults (circle, md).
45
+ * @example avatar
46
+ * @example avatar={{ shape: "square", size: "lg" }}
47
+ */
48
+ avatar?: boolean | SkeletonAvatarConfig;
49
+ /**
50
+ * Render a title line skeleton. Defaults to `true` whenever the composite layout is active
51
+ * (any of `avatar` / `paragraph` / `title` is set).
52
+ */
53
+ title?: boolean | SkeletonTitleConfig;
54
+ /**
55
+ * Render N paragraph lines. `true` gives 3 rows; passing `width` arrays lets you
56
+ * control per-row widths (last row defaults to 60%).
57
+ */
58
+ paragraph?: boolean | SkeletonParagraphConfig;
32
59
  className?: string;
33
60
  }
34
- /** `Skeleton` — content placeholder during loading. */
61
+ /**
62
+ * `Skeleton` — content placeholder during loading.
63
+ *
64
+ * Two modes:
65
+ * - **Primitive** (no composite prop set): renders a single block using `width` / `height` / `circle`.
66
+ * - **Composite** (`avatar` / `title` / `paragraph`): renders the Ant-Design-style avatar + title + paragraph layout.
67
+ *
68
+ * @example
69
+ * // primitive
70
+ * <Skeleton height={14} width="60%" />
71
+ * @example
72
+ * // composite
73
+ * <Skeleton avatar title paragraph={{ rows: 4 }} />
74
+ */
35
75
  declare const Skeleton: React.FC<SkeletonProps>;
36
76
 
37
- export { Empty, type EmptyProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps };
77
+ export { Empty, type EmptyProps, Skeleton, type SkeletonAvatarConfig, type SkeletonParagraphConfig, type SkeletonProps, type SkeletonTitleConfig, Spinner, type SpinnerProps };
package/dist/Empty.d.ts CHANGED
@@ -23,15 +23,55 @@ interface SpinnerProps {
23
23
  }
24
24
  /** `Spinner` — loading indicator. */
25
25
  declare const Spinner: React.FC<SpinnerProps>;
26
+ interface SkeletonAvatarConfig {
27
+ shape?: "circle" | "square";
28
+ size?: "sm" | "md" | "lg";
29
+ }
30
+ interface SkeletonTitleConfig {
31
+ width?: number | string;
32
+ }
33
+ interface SkeletonParagraphConfig {
34
+ rows?: number;
35
+ width?: (number | string)[];
36
+ }
26
37
  interface SkeletonProps {
27
38
  width?: number | string;
28
39
  height?: number | string;
29
40
  circle?: boolean;
30
41
  /** `wave` is a shimmer sweep; `pulse` fades opacity; `none` disables animation. */
31
42
  animation?: "wave" | "pulse" | "none";
43
+ /**
44
+ * Render an avatar skeleton on the left. `true` gives the defaults (circle, md).
45
+ * @example avatar
46
+ * @example avatar={{ shape: "square", size: "lg" }}
47
+ */
48
+ avatar?: boolean | SkeletonAvatarConfig;
49
+ /**
50
+ * Render a title line skeleton. Defaults to `true` whenever the composite layout is active
51
+ * (any of `avatar` / `paragraph` / `title` is set).
52
+ */
53
+ title?: boolean | SkeletonTitleConfig;
54
+ /**
55
+ * Render N paragraph lines. `true` gives 3 rows; passing `width` arrays lets you
56
+ * control per-row widths (last row defaults to 60%).
57
+ */
58
+ paragraph?: boolean | SkeletonParagraphConfig;
32
59
  className?: string;
33
60
  }
34
- /** `Skeleton` — content placeholder during loading. */
61
+ /**
62
+ * `Skeleton` — content placeholder during loading.
63
+ *
64
+ * Two modes:
65
+ * - **Primitive** (no composite prop set): renders a single block using `width` / `height` / `circle`.
66
+ * - **Composite** (`avatar` / `title` / `paragraph`): renders the Ant-Design-style avatar + title + paragraph layout.
67
+ *
68
+ * @example
69
+ * // primitive
70
+ * <Skeleton height={14} width="60%" />
71
+ * @example
72
+ * // composite
73
+ * <Skeleton avatar title paragraph={{ rows: 4 }} />
74
+ */
35
75
  declare const Skeleton: React.FC<SkeletonProps>;
36
76
 
37
- export { Empty, type EmptyProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps };
77
+ export { Empty, type EmptyProps, Skeleton, type SkeletonAvatarConfig, type SkeletonParagraphConfig, type SkeletonProps, type SkeletonTitleConfig, Spinner, type SpinnerProps };
package/dist/Empty.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Empty, Skeleton, Spinner } from './chunk-4AA22BOG.js';
1
+ export { Empty, Skeleton, Spinner } from './chunk-Z7P6QGMT.js';
2
2
  //# sourceMappingURL=Empty.js.map
3
3
  //# sourceMappingURL=Empty.js.map
@@ -0,0 +1,134 @@
1
+ /* ============ Input / Textarea ============ */
2
+ .input-shell {
3
+ display: inline-flex;
4
+ flex-direction: column;
5
+ gap: 4px;
6
+ width: 100%;
7
+ }
8
+ .input-count {
9
+ font-size: 11px;
10
+ color: var(--fg-subtle);
11
+ font-variant-numeric: tabular-nums;
12
+ text-align: right;
13
+ }
14
+
15
+ .input-wrap {
16
+ position: relative;
17
+ display: inline-flex;
18
+ align-items: center;
19
+ width: 100%;
20
+ height: var(--ctrl-h);
21
+ padding: 0 var(--ctrl-pad-x);
22
+ border-radius: var(--r-md);
23
+ background: var(--bg);
24
+ box-shadow: var(--neu-in-sm);
25
+ transition: box-shadow var(--dur) var(--ease);
26
+ gap: 8px;
27
+ }
28
+ .input-wrap.sm { height: 32px; padding: 0 12px; border-radius: var(--r-sm); gap: 6px; }
29
+ .input-wrap.lg { height: 48px; padding: 0 18px; border-radius: var(--r-lg); gap: 10px; }
30
+ .input-wrap:focus-within { box-shadow: var(--neu-in-sm), 0 0 0 2px var(--accent-glow); }
31
+ .input-wrap.invalid { box-shadow: var(--neu-in-sm), 0 0 0 2px color-mix(in oklch, var(--danger) 30%, transparent); }
32
+ .input-wrap.disabled { opacity: 0.6; cursor: not-allowed; }
33
+
34
+ .input-wrap .lead,
35
+ .input-wrap .trail {
36
+ color: var(--fg-subtle);
37
+ flex-shrink: 0;
38
+ display: inline-flex;
39
+ }
40
+ .input-wrap .lead.interactive,
41
+ .input-wrap .trail.interactive { cursor: pointer; pointer-events: auto; }
42
+ .input-wrap .trail:hover { color: var(--fg); }
43
+ .input-wrap .lead:not(.interactive),
44
+ .input-wrap .trail:not(.interactive) { pointer-events: none; }
45
+
46
+ .input-wrap .input-affix {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ color: var(--fg-muted);
50
+ font-size: 13px;
51
+ white-space: nowrap;
52
+ user-select: none;
53
+ flex-shrink: 0;
54
+ }
55
+ .input-wrap.sm .input-affix { font-size: 12px; }
56
+ .input-wrap.lg .input-affix { font-size: 14px; }
57
+
58
+ .input-wrap .input-clear {
59
+ display: inline-flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ width: 18px;
63
+ height: 18px;
64
+ border-radius: 999px;
65
+ color: var(--fg-subtle);
66
+ background: transparent;
67
+ cursor: pointer;
68
+ flex-shrink: 0;
69
+ transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
70
+ }
71
+ .input-wrap .input-clear:hover {
72
+ color: var(--fg);
73
+ background: var(--bg-sunken);
74
+ }
75
+
76
+ .input-wrap > .input {
77
+ flex: 1;
78
+ min-width: 0;
79
+ width: 100%;
80
+ height: 100%;
81
+ padding: 0;
82
+ border: none;
83
+ background: transparent;
84
+ box-shadow: none;
85
+ color: var(--fg);
86
+ font-size: 13px;
87
+ font-family: inherit;
88
+ outline: none;
89
+ }
90
+ .input-wrap.sm > .input { font-size: 12px; }
91
+ .input-wrap.lg > .input { font-size: 14px; }
92
+ .input-wrap > .input::placeholder { color: var(--fg-subtle); }
93
+ .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,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkQT7SJITQ_cjs = require('./chunk-QT7SJITQ.cjs');
3
+ var chunkLDENBYRC_cjs = require('./chunk-LDENBYRC.cjs');
4
4
  require('./chunk-YVO7XO4W.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Input", {
9
9
  enumerable: true,
10
- get: function () { return chunkQT7SJITQ_cjs.Input; }
10
+ get: function () { return chunkLDENBYRC_cjs.Input; }
11
11
  });
12
12
  Object.defineProperty(exports, "Textarea", {
13
13
  enumerable: true,
14
- get: function () { return chunkQT7SJITQ_cjs.Textarea; }
14
+ get: function () { return chunkLDENBYRC_cjs.Textarea; }
15
15
  });
16
16
  //# sourceMappingURL=Input.cjs.map
17
17
  //# sourceMappingURL=Input.cjs.map
package/dist/Input.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { IconName } from './Icon.cjs';
3
3
 
4
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
4
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -15,6 +15,16 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
15
15
  size?: "sm" | "md" | "lg";
16
16
  invalid?: boolean;
17
17
  disabled?: boolean;
18
+ /** Show a × button inside the input to clear the value when non-empty. */
19
+ allowClear?: boolean;
20
+ /** Max length — forwarded to the native input. */
21
+ maxLength?: number;
22
+ /** Render a "N / max" counter beneath the input (or just "N" if no maxLength). */
23
+ showCount?: boolean;
24
+ /** Inline content rendered inside the input on the left (after leadingIcon if both present). */
25
+ prefix?: React.ReactNode;
26
+ /** Inline content rendered inside the input on the right (before trailingIcon if both present). */
27
+ suffix?: React.ReactNode;
18
28
  className?: string;
19
29
  }
20
30
  /**
@@ -26,6 +36,12 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
26
36
  defaultValue?: string;
27
37
  onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
28
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;
29
45
  className?: string;
30
46
  }
31
47
  /**
package/dist/Input.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { IconName } from './Icon.js';
3
3
 
4
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
4
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange" | "prefix"> {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  onChange?: (value: string, event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -15,6 +15,16 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
15
15
  size?: "sm" | "md" | "lg";
16
16
  invalid?: boolean;
17
17
  disabled?: boolean;
18
+ /** Show a × button inside the input to clear the value when non-empty. */
19
+ allowClear?: boolean;
20
+ /** Max length — forwarded to the native input. */
21
+ maxLength?: number;
22
+ /** Render a "N / max" counter beneath the input (or just "N" if no maxLength). */
23
+ showCount?: boolean;
24
+ /** Inline content rendered inside the input on the left (after leadingIcon if both present). */
25
+ prefix?: React.ReactNode;
26
+ /** Inline content rendered inside the input on the right (before trailingIcon if both present). */
27
+ suffix?: React.ReactNode;
18
28
  className?: string;
19
29
  }
20
30
  /**
@@ -26,6 +36,12 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
26
36
  defaultValue?: string;
27
37
  onChange?: (value: string, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
28
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;
29
45
  className?: string;
30
46
  }
31
47
  /**
package/dist/Input.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Input, Textarea } from './chunk-7NM5BRUX.js';
1
+ export { Input, Textarea } from './chunk-NSUD5B22.js';
2
2
  import './chunk-GEYMWUW6.js';
3
3
  //# sourceMappingURL=Input.js.map
4
4
  //# sourceMappingURL=Input.js.map
@@ -0,0 +1,72 @@
1
+ /* ============ Modal ============ */
2
+ .modal-overlay {
3
+ position: fixed;
4
+ inset: 0;
5
+ background: color-mix(in oklch, var(--bg-sunken) 60%, transparent);
6
+ backdrop-filter: blur(8px);
7
+ display: grid;
8
+ place-items: center;
9
+ z-index: 200;
10
+ animation: fadeIn var(--dur) var(--ease);
11
+ }
12
+ .modal-overlay.hidden {
13
+ display: none;
14
+ }
15
+ .modal {
16
+ background: var(--bg);
17
+ border-radius: var(--r-xl);
18
+ box-shadow: var(--neu-out-lg), 0 24px 60px -20px rgba(40, 55, 80, 0.3);
19
+ padding: var(--gap-6);
20
+ width: min(480px, 92vw);
21
+ animation: modalIn var(--dur-slow) var(--ease);
22
+ max-height: 86vh;
23
+ display: flex;
24
+ flex-direction: column;
25
+ }
26
+ @keyframes modalIn {
27
+ from { opacity: 0; transform: translateY(8px) scale(0.97); }
28
+ }
29
+ .modal-head {
30
+ display: flex;
31
+ align-items: flex-start;
32
+ justify-content: space-between;
33
+ gap: var(--gap-3);
34
+ margin-bottom: var(--gap-3);
35
+ }
36
+ .modal-titles {
37
+ display: flex;
38
+ flex-direction: column;
39
+ gap: 4px;
40
+ }
41
+ .modal-title { font-size: 17px; font-weight: 600; }
42
+ .modal-desc { font-size: 13px; color: var(--fg-muted); }
43
+ .modal-body {
44
+ padding: var(--gap-3) 0;
45
+ color: var(--fg-muted);
46
+ font-size: 13px;
47
+ line-height: 1.6;
48
+ flex: 1;
49
+ overflow-y: auto;
50
+ }
51
+ .modal-foot {
52
+ display: flex;
53
+ gap: 10px;
54
+ justify-content: flex-end;
55
+ margin-top: var(--gap-4);
56
+ }
57
+ .modal-close {
58
+ width: 28px; height: 28px;
59
+ border: none;
60
+ background: transparent;
61
+ border-radius: var(--r-sm);
62
+ display: grid;
63
+ place-items: center;
64
+ color: var(--fg-subtle);
65
+ cursor: pointer;
66
+ transition: all var(--dur-fast) var(--ease);
67
+ }
68
+ .modal-close:hover {
69
+ color: var(--fg);
70
+ background: var(--bg);
71
+ box-shadow: var(--neu-flat);
72
+ }
package/dist/Modal.cjs CHANGED
@@ -1,18 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkKF4MCHZL_cjs = require('./chunk-KF4MCHZL.cjs');
4
- require('./chunk-AAMYURWQ.cjs');
3
+ var chunkCCBHZYE6_cjs = require('./chunk-CCBHZYE6.cjs');
4
+ require('./chunk-OPTTHURA.cjs');
5
5
  require('./chunk-YVO7XO4W.cjs');
6
6
 
7
7
 
8
8
 
9
- Object.defineProperty(exports, "Drawer", {
10
- enumerable: true,
11
- get: function () { return chunkKF4MCHZL_cjs.Drawer; }
12
- });
13
9
  Object.defineProperty(exports, "Modal", {
14
10
  enumerable: true,
15
- get: function () { return chunkKF4MCHZL_cjs.Modal; }
11
+ get: function () { return chunkCCBHZYE6_cjs.Modal; }
16
12
  });
17
13
  //# sourceMappingURL=Modal.cjs.map
18
14
  //# sourceMappingURL=Modal.cjs.map
package/dist/Modal.d.cts CHANGED
@@ -1,27 +1,56 @@
1
1
  import * as React from 'react';
2
+ import { ButtonProps } from './Button.cjs';
3
+ import './Icon.cjs';
2
4
 
3
5
  interface ModalProps {
6
+ /** Whether the modal is visible. */
4
7
  open: boolean;
8
+ /** Fired by mask click / close button / Esc. Also the fallback for cancel. */
5
9
  onClose?: () => void;
10
+ /** Dedicated Cancel callback. Falls back to `onClose` when omitted. */
11
+ onCancel?: () => void;
12
+ /** Fired when the default OK button is clicked. */
13
+ onOk?: () => void;
6
14
  title?: React.ReactNode;
7
15
  description?: React.ReactNode;
16
+ /**
17
+ * Footer content. Pass `null` to hide the footer, or a custom node to
18
+ * replace the default OK / Cancel buttons.
19
+ */
8
20
  footer?: React.ReactNode;
9
21
  children?: React.ReactNode;
10
22
  width?: number | string;
23
+ /** Show the close (×) button. Default true. */
24
+ closable?: boolean;
25
+ /** Override the close icon node. */
26
+ closeIcon?: React.ReactNode;
11
27
  /** Close when clicking the mask. Default true. */
12
28
  maskClosable?: boolean;
13
29
  /** Close on Escape key. Default true. */
14
30
  escClosable?: boolean;
31
+ /** Label for the default OK button. */
32
+ okText?: React.ReactNode;
33
+ /** Label for the default Cancel button. */
34
+ cancelText?: React.ReactNode;
35
+ /** Extra props forwarded to the default OK button. */
36
+ okButtonProps?: Partial<ButtonProps>;
37
+ /** Extra props forwarded to the default Cancel button. */
38
+ cancelButtonProps?: Partial<ButtonProps>;
39
+ /** Show a spinner on the OK button (e.g. while an async submit is running). */
40
+ confirmLoading?: boolean;
41
+ /**
42
+ * When true the modal's children are unmounted every time it closes.
43
+ * Default `false` — children stay mounted so internal state survives
44
+ * reopens, matching antd's default.
45
+ */
46
+ destroyOnClose?: boolean;
47
+ /** Fires after the open/close animation finishes. */
48
+ afterOpenChange?: (open: boolean) => void;
49
+ /** Override the z-index of the overlay. */
50
+ zIndex?: number;
15
51
  className?: string;
16
52
  }
17
53
  /** `Modal` — centered dialog with mask. Renders into `document.body`. */
18
54
  declare const Modal: React.FC<ModalProps>;
19
- interface DrawerProps extends Omit<ModalProps, "width"> {
20
- /** Edge the drawer slides from. */
21
- placement?: "left" | "right" | "top" | "bottom";
22
- size?: number | string;
23
- }
24
- /** `Drawer` — slide-in panel from an edge. */
25
- declare const Drawer: React.FC<DrawerProps>;
26
55
 
27
- export { Drawer, type DrawerProps, Modal, type ModalProps };
56
+ export { Modal, type ModalProps };