@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/Theme.d.cts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as React from 'react';
2
2
 
3
- type ThemeMode = "light" | "dark" | "system";
4
- type ResolvedThemeMode = "light" | "dark";
3
+ type ThemeBaseMode = "light" | "dark";
4
+ type BuiltInThemeMode = ThemeBaseMode | "system";
5
+ type ThemeMode = BuiltInThemeMode | (string & {});
6
+ type ResolvedThemeMode = ThemeBaseMode | (string & {});
5
7
  type AccentKey = "sky" | "coral" | "mint" | "violet" | "amber" | "rose";
6
8
  type DensityMode = "compact" | "comfortable" | "spacious";
7
9
  type FontKey = "system" | "sf" | "serif" | "mono";
@@ -30,8 +32,21 @@ type FontConfig = FontKey | string | {
30
32
  /** Arbitrary CSS variable overrides. Keys may be either a short name
31
33
  * (e.g. `"bg"` → `--bg`) or a full var name (e.g. `"--bg"`). */
32
34
  type ThemeTokens = Record<string, string>;
35
+ /** Named custom theme mode. `base` keeps dark/light specific component rules. */
36
+ interface ThemePreset {
37
+ base?: ThemeBaseMode;
38
+ accent?: AccentKey | CustomAccentInput;
39
+ density?: DensityMode;
40
+ intensity?: number;
41
+ radius?: number;
42
+ font?: FontConfig;
43
+ tokens?: ThemeTokens;
44
+ }
45
+ type ThemePresets = Record<string, ThemePreset>;
33
46
  interface ThemeConfig {
34
47
  mode?: ThemeMode;
48
+ /** Base light/dark color scheme used by custom modes. */
49
+ colorScheme?: ThemeBaseMode;
35
50
  accent?: AccentKey | CustomAccentInput;
36
51
  density?: DensityMode;
37
52
  /** Shadow strength, 1..10. Maps to `--d` (0.4..1.6). */
@@ -40,12 +55,16 @@ interface ThemeConfig {
40
55
  radius?: number;
41
56
  font?: FontConfig;
42
57
  tokens?: ThemeTokens;
58
+ /** Custom named modes addressable through `mode` / `setMode`. */
59
+ themes?: ThemePresets;
43
60
  }
44
61
  interface ThemeValue {
45
62
  /** Requested mode ("system" is preserved here). */
46
63
  mode: ThemeMode;
47
- /** Resolved concrete mode ("system" → "light" | "dark" based on OS). */
64
+ /** Resolved concrete mode ("system" → "light" | "dark"; custom modes keep their name). */
48
65
  resolvedMode: ResolvedThemeMode;
66
+ /** The light/dark base currently used for component-specific selectors. */
67
+ colorScheme: ThemeBaseMode;
49
68
  /** Accent key or "custom" if a palette was supplied. */
50
69
  accent: AccentKey | "custom";
51
70
  /** Resolved palette currently in effect. */
@@ -55,6 +74,8 @@ interface ThemeValue {
55
74
  radius: number;
56
75
  font: FontConfig;
57
76
  tokens: ThemeTokens;
77
+ themes: ThemePresets;
78
+ activeTheme: ThemePreset | null;
58
79
  setMode: (m: ThemeMode) => void;
59
80
  toggleMode: () => void;
60
81
  setAccent: (a: AccentKey | CustomAccentInput) => void;
@@ -63,6 +84,7 @@ interface ThemeValue {
63
84
  setRadius: (n: number) => void;
64
85
  setFont: (f: FontConfig) => void;
65
86
  setTokens: (t: ThemeTokens) => void;
87
+ setThemes: (t: ThemePresets) => void;
66
88
  /** Shallow-merge a partial config. */
67
89
  update: (cfg: Partial<ThemeConfig>) => void;
68
90
  /** Reset to the initial props. */
@@ -75,10 +97,11 @@ declare const ACCENT_PRESETS: Record<AccentKey, AccentPalette>;
75
97
  declare const ACCENT_PRESETS_DARK: Record<AccentKey, Pick<AccentPalette, "ink" | "soft" | "glow">>;
76
98
  /** Built-in font family stacks. */
77
99
  declare const FONT_STACKS: Record<FontKey, string>;
78
- /** Resolve "system" mode against `prefers-color-scheme`. */
100
+ /** Resolve "system" mode against `prefers-color-scheme`; custom modes keep their name. */
79
101
  declare function resolveThemeMode(mode: ThemeMode): ResolvedThemeMode;
102
+ declare function resolveThemeColorScheme(mode: ThemeMode, themes?: ThemePresets, fallback?: ThemeBaseMode): ThemeBaseMode;
80
103
  /** Fill missing slots of a custom accent via color-mix. */
81
- declare function normalizeAccentInput(input: AccentKey | CustomAccentInput, resolvedMode: ResolvedThemeMode): {
104
+ declare function normalizeAccentInput(input: AccentKey | CustomAccentInput, colorScheme: ThemeBaseMode): {
82
105
  key: AccentKey | "custom";
83
106
  palette: AccentPalette;
84
107
  };
@@ -124,4 +147,4 @@ interface ThemeProviderProps extends ThemeConfig {
124
147
  */
125
148
  declare const ThemeProvider: React.FC<ThemeProviderProps>;
126
149
 
127
- export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, type AccentKey, type AccentPalette, type CustomAccentInput, type DensityMode, FONT_STACKS, type FontConfig, type FontKey, type ResolvedThemeMode, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ThemeValue, applyTheme, normalizeAccentInput, resolveThemeMode, useTheme, useThemeOptional };
150
+ export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, type AccentKey, type AccentPalette, type BuiltInThemeMode, type CustomAccentInput, type DensityMode, FONT_STACKS, type FontConfig, type FontKey, type ResolvedThemeMode, type ThemeBaseMode, type ThemeConfig, type ThemeMode, type ThemePreset, type ThemePresets, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ThemeValue, applyTheme, normalizeAccentInput, resolveThemeColorScheme, resolveThemeMode, useTheme, useThemeOptional };
package/dist/Theme.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as React from 'react';
2
2
 
3
- type ThemeMode = "light" | "dark" | "system";
4
- type ResolvedThemeMode = "light" | "dark";
3
+ type ThemeBaseMode = "light" | "dark";
4
+ type BuiltInThemeMode = ThemeBaseMode | "system";
5
+ type ThemeMode = BuiltInThemeMode | (string & {});
6
+ type ResolvedThemeMode = ThemeBaseMode | (string & {});
5
7
  type AccentKey = "sky" | "coral" | "mint" | "violet" | "amber" | "rose";
6
8
  type DensityMode = "compact" | "comfortable" | "spacious";
7
9
  type FontKey = "system" | "sf" | "serif" | "mono";
@@ -30,8 +32,21 @@ type FontConfig = FontKey | string | {
30
32
  /** Arbitrary CSS variable overrides. Keys may be either a short name
31
33
  * (e.g. `"bg"` → `--bg`) or a full var name (e.g. `"--bg"`). */
32
34
  type ThemeTokens = Record<string, string>;
35
+ /** Named custom theme mode. `base` keeps dark/light specific component rules. */
36
+ interface ThemePreset {
37
+ base?: ThemeBaseMode;
38
+ accent?: AccentKey | CustomAccentInput;
39
+ density?: DensityMode;
40
+ intensity?: number;
41
+ radius?: number;
42
+ font?: FontConfig;
43
+ tokens?: ThemeTokens;
44
+ }
45
+ type ThemePresets = Record<string, ThemePreset>;
33
46
  interface ThemeConfig {
34
47
  mode?: ThemeMode;
48
+ /** Base light/dark color scheme used by custom modes. */
49
+ colorScheme?: ThemeBaseMode;
35
50
  accent?: AccentKey | CustomAccentInput;
36
51
  density?: DensityMode;
37
52
  /** Shadow strength, 1..10. Maps to `--d` (0.4..1.6). */
@@ -40,12 +55,16 @@ interface ThemeConfig {
40
55
  radius?: number;
41
56
  font?: FontConfig;
42
57
  tokens?: ThemeTokens;
58
+ /** Custom named modes addressable through `mode` / `setMode`. */
59
+ themes?: ThemePresets;
43
60
  }
44
61
  interface ThemeValue {
45
62
  /** Requested mode ("system" is preserved here). */
46
63
  mode: ThemeMode;
47
- /** Resolved concrete mode ("system" → "light" | "dark" based on OS). */
64
+ /** Resolved concrete mode ("system" → "light" | "dark"; custom modes keep their name). */
48
65
  resolvedMode: ResolvedThemeMode;
66
+ /** The light/dark base currently used for component-specific selectors. */
67
+ colorScheme: ThemeBaseMode;
49
68
  /** Accent key or "custom" if a palette was supplied. */
50
69
  accent: AccentKey | "custom";
51
70
  /** Resolved palette currently in effect. */
@@ -55,6 +74,8 @@ interface ThemeValue {
55
74
  radius: number;
56
75
  font: FontConfig;
57
76
  tokens: ThemeTokens;
77
+ themes: ThemePresets;
78
+ activeTheme: ThemePreset | null;
58
79
  setMode: (m: ThemeMode) => void;
59
80
  toggleMode: () => void;
60
81
  setAccent: (a: AccentKey | CustomAccentInput) => void;
@@ -63,6 +84,7 @@ interface ThemeValue {
63
84
  setRadius: (n: number) => void;
64
85
  setFont: (f: FontConfig) => void;
65
86
  setTokens: (t: ThemeTokens) => void;
87
+ setThemes: (t: ThemePresets) => void;
66
88
  /** Shallow-merge a partial config. */
67
89
  update: (cfg: Partial<ThemeConfig>) => void;
68
90
  /** Reset to the initial props. */
@@ -75,10 +97,11 @@ declare const ACCENT_PRESETS: Record<AccentKey, AccentPalette>;
75
97
  declare const ACCENT_PRESETS_DARK: Record<AccentKey, Pick<AccentPalette, "ink" | "soft" | "glow">>;
76
98
  /** Built-in font family stacks. */
77
99
  declare const FONT_STACKS: Record<FontKey, string>;
78
- /** Resolve "system" mode against `prefers-color-scheme`. */
100
+ /** Resolve "system" mode against `prefers-color-scheme`; custom modes keep their name. */
79
101
  declare function resolveThemeMode(mode: ThemeMode): ResolvedThemeMode;
102
+ declare function resolveThemeColorScheme(mode: ThemeMode, themes?: ThemePresets, fallback?: ThemeBaseMode): ThemeBaseMode;
80
103
  /** Fill missing slots of a custom accent via color-mix. */
81
- declare function normalizeAccentInput(input: AccentKey | CustomAccentInput, resolvedMode: ResolvedThemeMode): {
104
+ declare function normalizeAccentInput(input: AccentKey | CustomAccentInput, colorScheme: ThemeBaseMode): {
82
105
  key: AccentKey | "custom";
83
106
  palette: AccentPalette;
84
107
  };
@@ -124,4 +147,4 @@ interface ThemeProviderProps extends ThemeConfig {
124
147
  */
125
148
  declare const ThemeProvider: React.FC<ThemeProviderProps>;
126
149
 
127
- export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, type AccentKey, type AccentPalette, type CustomAccentInput, type DensityMode, FONT_STACKS, type FontConfig, type FontKey, type ResolvedThemeMode, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ThemeValue, applyTheme, normalizeAccentInput, resolveThemeMode, useTheme, useThemeOptional };
150
+ export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, type AccentKey, type AccentPalette, type BuiltInThemeMode, type CustomAccentInput, type DensityMode, FONT_STACKS, type FontConfig, type FontKey, type ResolvedThemeMode, type ThemeBaseMode, type ThemeConfig, type ThemeMode, type ThemePreset, type ThemePresets, ThemeProvider, type ThemeProviderProps, type ThemeTokens, type ThemeValue, applyTheme, normalizeAccentInput, resolveThemeColorScheme, resolveThemeMode, useTheme, useThemeOptional };
package/dist/Theme.js CHANGED
@@ -1 +1 @@
1
- export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, FONT_STACKS, ThemeProvider, applyTheme, normalizeAccentInput, resolveThemeMode, useTheme, useThemeOptional } from './chunk-NN25YMOL.js';
1
+ export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, FONT_STACKS, ThemeProvider, applyTheme, normalizeAccentInput, resolveThemeColorScheme, resolveThemeMode, useTheme, useThemeOptional } from './chunk-J5ZGYQZK.js';
@@ -88,7 +88,7 @@
88
88
  .timeline-item-dot.info { background: var(--info); }
89
89
  .timeline-item-dot.muted { background: var(--fg-subtle); }
90
90
 
91
- /* Pending dot: clear default fill, Spinner handles its own visuals */
91
+ /* Pending dot: clear default fill, Spin handles its own visuals */
92
92
  .timeline-item-dot.pending {
93
93
  background: transparent;
94
94
  box-shadow: none;
@@ -125,7 +125,7 @@
125
125
  color: var(--fg-muted);
126
126
  }
127
127
 
128
- /* When dot has custom content (Spinner / Icon), expand to fit */
128
+ /* When dot has custom content (Spin / Icon), expand to fit */
129
129
  .timeline-item-dot:has(> *) {
130
130
  width: auto;
131
131
  height: auto;
package/dist/Timeline.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkEEMWQX3C_cjs = require('./chunk-EEMWQX3C.cjs');
4
- require('./chunk-GY3BSHHS.cjs');
3
+ var chunkNTS5L4NQ_cjs = require('./chunk-NTS5L4NQ.cjs');
4
+ require('./chunk-QKQHZIF3.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Timeline", {
9
9
  enumerable: true,
10
- get: function () { return chunkEEMWQX3C_cjs.Timeline; }
10
+ get: function () { return chunkNTS5L4NQ_cjs.Timeline; }
11
11
  });
@@ -17,7 +17,7 @@ interface TimelineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "chil
17
17
  items: TimelineItemConfig[];
18
18
  /**
19
19
  * Show a pending (loading) item at the end.
20
- * `true` renders a default spinner; a ReactNode renders custom content.
20
+ * `true` renders a default Spin indicator; a ReactNode renders custom content.
21
21
  */
22
22
  pending?: boolean | React.ReactNode;
23
23
  /** Text shown as the pending item's content */
@@ -17,7 +17,7 @@ interface TimelineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "chil
17
17
  items: TimelineItemConfig[];
18
18
  /**
19
19
  * Show a pending (loading) item at the end.
20
- * `true` renders a default spinner; a ReactNode renders custom content.
20
+ * `true` renders a default Spin indicator; a ReactNode renders custom content.
21
21
  */
22
22
  pending?: boolean | React.ReactNode;
23
23
  /** Text shown as the pending item's content */
package/dist/Timeline.js CHANGED
@@ -1,2 +1,2 @@
1
- export { Timeline } from './chunk-3D77MQHO.js';
2
- import './chunk-5A3RT4KD.js';
1
+ export { Timeline } from './chunk-46VXFTEC.js';
2
+ import './chunk-ELNT3CFO.js';
package/dist/Tooltip.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkX2U7EKCS_cjs = require('./chunk-X2U7EKCS.cjs');
3
+ var chunk3YJU3D5S_cjs = require('./chunk-3YJU3D5S.cjs');
4
4
  require('./chunk-YB3IWIOJ.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Tooltip", {
9
9
  enumerable: true,
10
- get: function () { return chunkX2U7EKCS_cjs.Tooltip; }
10
+ get: function () { return chunk3YJU3D5S_cjs.Tooltip; }
11
11
  });
@@ -1,13 +1,26 @@
1
1
  import * as React from 'react';
2
2
 
3
- interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content"> {
4
- content: React.ReactNode;
5
- placement?: "top" | "bottom" | "left" | "right";
3
+ type TooltipPlacement = "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
4
+ interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content" | "title"> {
5
+ content?: React.ReactNode;
6
+ /** Alias for `content`. */
7
+ title?: React.ReactNode;
8
+ placement?: TooltipPlacement;
6
9
  children: React.ReactElement;
7
10
  delay?: number;
8
11
  disabled?: boolean;
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ onOpenChange?: (open: boolean) => void;
15
+ /** Controlled visibility alias. */
16
+ visible?: boolean;
17
+ onVisibleChange?: (visible: boolean) => void;
18
+ /** Class for the popped-out bubble. */
19
+ overlayClassName?: string;
20
+ /** Alias used by some popup APIs. */
21
+ popupClassName?: string;
9
22
  }
10
23
  /** `Tooltip` — hover/focus text bubble. */
11
24
  declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>;
12
25
 
13
- export { Tooltip, type TooltipProps };
26
+ export { Tooltip, type TooltipPlacement, type TooltipProps };
package/dist/Tooltip.d.ts CHANGED
@@ -1,13 +1,26 @@
1
1
  import * as React from 'react';
2
2
 
3
- interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content"> {
4
- content: React.ReactNode;
5
- placement?: "top" | "bottom" | "left" | "right";
3
+ type TooltipPlacement = "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
4
+ interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children" | "content" | "title"> {
5
+ content?: React.ReactNode;
6
+ /** Alias for `content`. */
7
+ title?: React.ReactNode;
8
+ placement?: TooltipPlacement;
6
9
  children: React.ReactElement;
7
10
  delay?: number;
8
11
  disabled?: boolean;
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ onOpenChange?: (open: boolean) => void;
15
+ /** Controlled visibility alias. */
16
+ visible?: boolean;
17
+ onVisibleChange?: (visible: boolean) => void;
18
+ /** Class for the popped-out bubble. */
19
+ overlayClassName?: string;
20
+ /** Alias used by some popup APIs. */
21
+ popupClassName?: string;
9
22
  }
10
23
  /** `Tooltip` — hover/focus text bubble. */
11
24
  declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>;
12
25
 
13
- export { Tooltip, type TooltipProps };
26
+ export { Tooltip, type TooltipPlacement, type TooltipProps };
package/dist/Tooltip.js CHANGED
@@ -1,2 +1,2 @@
1
- export { Tooltip } from './chunk-IW5LW6XS.js';
1
+ export { Tooltip } from './chunk-TEEFR2FD.js';
2
2
  import './chunk-DUFRASGO.js';
@@ -1,27 +1,27 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ODY6MGL_cjs = require('./chunk-6ODY6MGL.cjs');
4
- require('./chunk-2MNAZRWE.cjs');
3
+ var chunkR2TEDH2F_cjs = require('./chunk-R2TEDH2F.cjs');
4
+ require('./chunk-V272XR3F.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Link", {
9
9
  enumerable: true,
10
- get: function () { return chunk6ODY6MGL_cjs.Link; }
10
+ get: function () { return chunkR2TEDH2F_cjs.Link; }
11
11
  });
12
12
  Object.defineProperty(exports, "Paragraph", {
13
13
  enumerable: true,
14
- get: function () { return chunk6ODY6MGL_cjs.Paragraph; }
14
+ get: function () { return chunkR2TEDH2F_cjs.Paragraph; }
15
15
  });
16
16
  Object.defineProperty(exports, "Text", {
17
17
  enumerable: true,
18
- get: function () { return chunk6ODY6MGL_cjs.Text; }
18
+ get: function () { return chunkR2TEDH2F_cjs.Text; }
19
19
  });
20
20
  Object.defineProperty(exports, "Title", {
21
21
  enumerable: true,
22
- get: function () { return chunk6ODY6MGL_cjs.Title; }
22
+ get: function () { return chunkR2TEDH2F_cjs.Title; }
23
23
  });
24
24
  Object.defineProperty(exports, "Typography", {
25
25
  enumerable: true,
26
- get: function () { return chunk6ODY6MGL_cjs.Typography; }
26
+ get: function () { return chunkR2TEDH2F_cjs.Typography; }
27
27
  });
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconName } from './Icon.cjs';
3
+ import 'react/jsx-runtime';
3
4
 
4
5
  type TypographyType = "secondary" | "success" | "warning" | "danger";
5
6
  interface CopyableConfig {
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IconName } from './Icon.js';
3
+ import 'react/jsx-runtime';
3
4
 
4
5
  type TypographyType = "secondary" | "success" | "warning" | "danger";
5
6
  interface CopyableConfig {
@@ -1,2 +1,2 @@
1
- export { Link, Paragraph, Text, Title, Typography } from './chunk-ULOJ5UEY.js';
2
- import './chunk-NJ6B22YJ.js';
1
+ export { Link, Paragraph, Text, Title, Typography } from './chunk-ET6DYQVZ.js';
2
+ import './chunk-47VG2P34.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2MNAZRWE_cjs = require('./chunk-2MNAZRWE.cjs');
3
+ var chunkV272XR3F_cjs = require('./chunk-V272XR3F.cjs');
4
4
  require('./tokens-BIIUTPKN.css');
5
5
  require('./shared-NJHRNLRH.css');
6
6
  require('./Drawer-IPGB4CXH.css');
@@ -116,7 +116,7 @@ var Drawer = React__namespace.forwardRef(({
116
116
  className: "drawer-close",
117
117
  onClick: onClose,
118
118
  "aria-label": "Close",
119
- children: closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(chunk2MNAZRWE_cjs.Icon, { name: "x", size: 16 })
119
+ children: closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(chunkV272XR3F_cjs.Icon, { name: "x", size: 16 })
120
120
  }
121
121
  )
122
122
  ] })
@@ -28,22 +28,44 @@ 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 Tooltip = React__namespace.forwardRef(({
32
37
  content,
38
+ title,
33
39
  placement = "top",
34
40
  children,
35
41
  delay = 250,
36
42
  disabled,
43
+ open: openProp,
44
+ defaultOpen = false,
45
+ onOpenChange,
46
+ visible,
47
+ onVisibleChange,
48
+ overlayClassName = "",
49
+ popupClassName = "",
37
50
  onMouseEnter,
38
51
  onMouseLeave,
39
52
  onFocus,
40
53
  onBlur,
41
54
  ...rest
42
55
  }, ref) => {
43
- const [show, setShow] = React__namespace.useState(false);
56
+ const [innerShow, setInnerShow] = React__namespace.useState(defaultOpen);
44
57
  const t = React__namespace.useRef();
58
+ const controlledShow = openProp ?? visible;
59
+ const show = controlledShow ?? innerShow;
60
+ const resolvedContent = content ?? title;
61
+ const disabledTooltip = disabled || resolvedContent == null || resolvedContent === "";
62
+ const setShow = React__namespace.useCallback((next) => {
63
+ if (controlledShow === void 0) setInnerShow(next);
64
+ onOpenChange?.(next);
65
+ onVisibleChange?.(next);
66
+ }, [controlledShow, onOpenChange, onVisibleChange]);
45
67
  const open = () => {
46
- if (disabled) return;
68
+ if (disabledTooltip) return;
47
69
  window.clearTimeout(t.current);
48
70
  t.current = window.setTimeout(() => setShow(true), delay);
49
71
  };
@@ -51,12 +73,13 @@ var Tooltip = React__namespace.forwardRef(({
51
73
  window.clearTimeout(t.current);
52
74
  setShow(false);
53
75
  };
76
+ const normalized = normalizePlacement(placement);
54
77
  const { triggerRef, floatingStyle, placement: resolved } = chunkYB3IWIOJ_cjs.useFloating({
55
78
  open: show,
56
- placement,
79
+ placement: normalized.placement,
57
80
  panelWidth: 160,
58
81
  panelHeight: 32,
59
- alignCross: "center"
82
+ alignCross: normalized.alignCross
60
83
  });
61
84
  const setTriggerRef = React__namespace.useCallback(
62
85
  (node) => {
@@ -93,7 +116,7 @@ var Tooltip = React__namespace.forwardRef(({
93
116
  }
94
117
  ),
95
118
  show && typeof document !== "undefined" && reactDom.createPortal(
96
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `tip ${resolved}`, style: floatingStyle, children: content }),
119
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `tip ${resolved} ${overlayClassName} ${popupClassName}`, style: floatingStyle, children: resolvedContent }),
97
120
  document.body
98
121
  )
99
122
  ] });
@@ -0,0 +1,25 @@
1
+ import './tokens-BIIUTPKN.css';
2
+ import './shared-NJHRNLRH.css';
3
+ import './Empty-DC2LPORC.css';
4
+ import * as React from 'react';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ // src/components/Empty/Empty.tsx
8
+ var Empty = React.forwardRef(({
9
+ title = "\u6682\u65E0\u5185\u5BB9",
10
+ description,
11
+ icon,
12
+ action,
13
+ size = "md",
14
+ variant = "default",
15
+ className = "",
16
+ ...rest
17
+ }, ref) => /* @__PURE__ */ jsxs("div", { ref, className: `empty ${size} ${variant} ${className}`, ...rest, children: [
18
+ icon && /* @__PURE__ */ jsx("div", { className: "empty-ico", children: icon }),
19
+ /* @__PURE__ */ jsx("div", { className: "empty-title", children: title }),
20
+ description && /* @__PURE__ */ jsx("div", { className: "empty-desc", children: description }),
21
+ action && /* @__PURE__ */ jsx("div", { className: "empty-action", children: action })
22
+ ] }));
23
+ Empty.displayName = "Empty";
24
+
25
+ export { Empty };
@@ -1,7 +1,7 @@
1
- import { Spinner } from './chunk-5A3RT4KD.js';
1
+ import { Spin } from './chunk-ELNT3CFO.js';
2
2
  import './tokens-BIIUTPKN.css';
3
3
  import './shared-NJHRNLRH.css';
4
- import './Timeline-RHZAZKZ7.css';
4
+ import './Timeline-3ZHOHPXT.css';
5
5
  import * as React from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
@@ -74,7 +74,7 @@ var TimelineItem = ({
74
74
  return /* @__PURE__ */ jsxs("div", { className: cls, children: [
75
75
  /* @__PURE__ */ jsx("div", { className: "timeline-item-label", children: item.label }),
76
76
  /* @__PURE__ */ jsxs("div", { className: "timeline-item-head", children: [
77
- /* @__PURE__ */ jsx("div", { className: `timeline-item-dot ${color} ${isPending ? "pending" : ""}`, children: item.dot ?? (isPending && /* @__PURE__ */ jsx(Spinner, { size: 14 })) }),
77
+ /* @__PURE__ */ jsx("div", { className: `timeline-item-dot ${color} ${isPending ? "pending" : ""}`, children: item.dot ?? (isPending && /* @__PURE__ */ jsx(Spin, { size: 14 })) }),
78
78
  !isLast && /* @__PURE__ */ jsx("div", { className: "timeline-item-tail" })
79
79
  ] }),
80
80
  /* @__PURE__ */ jsx("div", { className: "timeline-item-content", children: item.children })