@fangxinyan/lumina 0.6.2 → 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 (141) 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 -5
  8. package/dist/AutoComplete.js +4 -4
  9. package/dist/Badge.d.cts +1 -0
  10. package/dist/Badge.d.ts +1 -0
  11. package/dist/{Button-SDQD25AG.css → Button-4Z3Q6KII.css} +56 -36
  12. package/dist/Button.cjs +3 -3
  13. package/dist/Button.d.cts +6 -5
  14. package/dist/Button.d.ts +6 -5
  15. package/dist/Button.js +2 -2
  16. package/dist/Calendar.cjs +3 -3
  17. package/dist/Calendar.js +2 -2
  18. package/dist/{Cascader-C2DFSMKJ.css → Cascader-3BLLA7EN.css} +13 -0
  19. package/dist/Cascader.cjs +5 -5
  20. package/dist/Cascader.d.cts +4 -2
  21. package/dist/Cascader.d.ts +4 -2
  22. package/dist/Cascader.js +4 -4
  23. package/dist/Checkbox.cjs +3 -3
  24. package/dist/Checkbox.js +2 -2
  25. package/dist/Collapse.cjs +3 -3
  26. package/dist/Collapse.js +2 -2
  27. package/dist/CommandPalette.cjs +5 -5
  28. package/dist/CommandPalette.js +4 -4
  29. package/dist/Drawer.cjs +3 -3
  30. package/dist/Drawer.js +2 -2
  31. package/dist/Icon.cjs +55 -47
  32. package/dist/Icon.d.cts +9 -1
  33. package/dist/Icon.d.ts +9 -1
  34. package/dist/Icon.js +1 -1
  35. package/dist/{Image-4MN34O6P.css → Image-MRYQCRQ5.css} +78 -0
  36. package/dist/Image.cjs +12 -4
  37. package/dist/Image.d.cts +79 -6
  38. package/dist/Image.d.ts +79 -6
  39. package/dist/Image.js +2 -2
  40. package/dist/{Input-3G4ONWNU.css → Input-HUBJ55OH.css} +10 -0
  41. package/dist/Input.cjs +5 -5
  42. package/dist/Input.d.cts +4 -3
  43. package/dist/Input.d.ts +4 -3
  44. package/dist/Input.js +3 -3
  45. package/dist/InputNumber.cjs +5 -5
  46. package/dist/InputNumber.js +4 -4
  47. package/dist/Message.cjs +6 -6
  48. package/dist/Message.js +2 -2
  49. package/dist/Modal.cjs +4 -4
  50. package/dist/Modal.d.cts +1 -0
  51. package/dist/Modal.d.ts +1 -0
  52. package/dist/Modal.js +3 -3
  53. package/dist/Pagination.cjs +7 -7
  54. package/dist/Pagination.js +6 -6
  55. package/dist/{Select-JVBQAZBG.css → Select-Z5VYPEEY.css} +26 -1
  56. package/dist/Select.cjs +6 -6
  57. package/dist/Select.d.cts +4 -3
  58. package/dist/Select.d.ts +4 -3
  59. package/dist/Select.js +5 -5
  60. package/dist/Table.cjs +9 -9
  61. package/dist/Table.js +8 -8
  62. package/dist/TablePro.cjs +10 -10
  63. package/dist/TablePro.js +9 -9
  64. package/dist/{Tag-LB3OOJAO.css → Tag-HDYCDPFS.css} +14 -1
  65. package/dist/Tag.cjs +3 -3
  66. package/dist/Tag.d.cts +4 -3
  67. package/dist/Tag.d.ts +4 -3
  68. package/dist/Tag.js +2 -2
  69. package/dist/Textarea.cjs +4 -4
  70. package/dist/Textarea.js +2 -2
  71. package/dist/Theme.cjs +14 -10
  72. package/dist/Theme.d.cts +29 -6
  73. package/dist/Theme.d.ts +29 -6
  74. package/dist/Theme.js +1 -1
  75. package/dist/Typography.cjs +7 -7
  76. package/dist/Typography.d.cts +1 -0
  77. package/dist/Typography.d.ts +1 -0
  78. package/dist/Typography.js +2 -2
  79. package/dist/{chunk-MT7UWY6T.cjs → chunk-2HQCUBA7.cjs} +2 -2
  80. package/dist/{chunk-OF3SGLZY.js → chunk-47VG2P34.js} +9 -1
  81. package/dist/{chunk-ZIP7F4UF.cjs → chunk-5DKRY67M.cjs} +4 -4
  82. package/dist/{chunk-DQTSTJ6O.js → chunk-5H5YP2TB.js} +3 -3
  83. package/dist/{chunk-QGHYQCF3.cjs → chunk-5MN3PMF4.cjs} +8 -8
  84. package/dist/{chunk-FBVVRTX2.cjs → chunk-6HMTV6P4.cjs} +2 -2
  85. package/dist/{chunk-RF2EY5JS.cjs → chunk-6ZXQJRAT.cjs} +153 -34
  86. package/dist/{chunk-4WTU5P3O.cjs → chunk-7AG524YZ.cjs} +3 -3
  87. package/dist/{chunk-CEJ7VBR6.js → chunk-7IYKKLV3.js} +2 -2
  88. package/dist/{chunk-FJNWUELL.js → chunk-AAGF7K3L.js} +1 -1
  89. package/dist/{chunk-AWXCSX6J.js → chunk-BPOOVO5T.js} +3 -3
  90. package/dist/{chunk-EJBHR2P5.js → chunk-BVQ77VRY.js} +2 -2
  91. package/dist/{chunk-7NGMQIST.js → chunk-CETNCRZ4.js} +2 -2
  92. package/dist/{chunk-K2KYM7LW.cjs → chunk-DG5VQ6BO.cjs} +2 -2
  93. package/dist/chunk-DWAN57G4.js +243 -0
  94. package/dist/{chunk-CXWEOAVU.js → chunk-ET6DYQVZ.js} +1 -1
  95. package/dist/{chunk-WKKSAGYH.js → chunk-FBYUZOZP.js} +7 -7
  96. package/dist/{chunk-EIY7KEJ3.cjs → chunk-FGW5GJ22.cjs} +2 -2
  97. package/dist/{chunk-33NCTOEB.js → chunk-FWPBORRB.js} +1 -1
  98. package/dist/{chunk-EQEJTN3V.js → chunk-GIZU3H6H.js} +1 -1
  99. package/dist/{chunk-HPFQXYKG.cjs → chunk-H4LGWZMH.cjs} +9 -9
  100. package/dist/{chunk-6LZ54NPO.cjs → chunk-HKF2V5MM.cjs} +33 -23
  101. package/dist/{chunk-WGZ2KJTZ.js → chunk-HLFH5HWR.js} +1 -1
  102. package/dist/{chunk-UMDGS4BP.js → chunk-I5WTQ5Y3.js} +4 -4
  103. package/dist/{chunk-MUXP7ASL.js → chunk-J2HZTJO6.js} +1 -1
  104. package/dist/{chunk-NN25YMOL.js → chunk-J5ZGYQZK.js} +153 -35
  105. package/dist/{chunk-CHMCL7AV.js → chunk-JCEHZ336.js} +1 -1
  106. package/dist/{chunk-FFZ6OMZI.js → chunk-JVUVOR6S.js} +1 -1
  107. package/dist/{chunk-ON4DEDMI.js → chunk-K5IGFBDR.js} +1 -1
  108. package/dist/{chunk-35ZGBAA3.cjs → chunk-K7FV7W6U.cjs} +5 -5
  109. package/dist/{chunk-XD3JGL5O.js → chunk-ME5BZ2WA.js} +1 -1
  110. package/dist/{chunk-OQBDU5I2.cjs → chunk-MPVCYU2K.cjs} +2 -2
  111. package/dist/{chunk-CUXV6QNN.cjs → chunk-P6EZG2R7.cjs} +5 -5
  112. package/dist/{chunk-SKMP2A5O.cjs → chunk-P6P4DGLF.cjs} +2 -2
  113. package/dist/{chunk-TEG7NJHS.cjs → chunk-PULGVK2I.cjs} +2 -2
  114. package/dist/{chunk-TZJH5HBT.cjs → chunk-QP3VCSRY.cjs} +5 -5
  115. package/dist/{chunk-MQV2XN4B.cjs → chunk-R2TEDH2F.cjs} +5 -5
  116. package/dist/{chunk-JD7A6VM3.js → chunk-SQGPSMSK.js} +5 -5
  117. package/dist/{chunk-GNEZQMKH.js → chunk-TGL5BGMR.js} +4 -4
  118. package/dist/{chunk-5WAXZJG5.cjs → chunk-TP567B3L.cjs} +5 -5
  119. package/dist/{chunk-XTIN5545.js → chunk-UKS23N3L.js} +31 -21
  120. package/dist/{chunk-TJII7BQ2.cjs → chunk-V272XR3F.cjs} +10 -0
  121. package/dist/chunk-VFFIE2VO.cjs +271 -0
  122. package/dist/{chunk-OYMJVU66.cjs → chunk-X5GCOMC3.cjs} +15 -15
  123. package/dist/{chunk-3AS5B7MQ.cjs → chunk-XSN4TLN5.cjs} +10 -10
  124. package/dist/{chunk-6ACKL3WH.cjs → chunk-ZKE73UQF.cjs} +3 -3
  125. package/dist/index.cjs +130 -110
  126. package/dist/index.d.cts +5 -5
  127. package/dist/index.d.ts +5 -5
  128. package/dist/index.js +24 -24
  129. package/dist/styles.css +202 -38
  130. package/docs/llms/alert.md +4 -3
  131. package/docs/llms/button.md +4 -3
  132. package/docs/llms/cascader.md +3 -0
  133. package/docs/llms/image.md +72 -1
  134. package/docs/llms/input.md +3 -2
  135. package/docs/llms/select.md +2 -2
  136. package/docs/llms/tag.md +3 -2
  137. package/docs/llms/theme.md +41 -4
  138. package/docs/llms.md +4 -4
  139. package/package.json +16 -1
  140. package/dist/chunk-B2KEZQ6S.cjs +0 -116
  141. package/dist/chunk-PH3YECMF.js +0 -90
package/dist/index.js CHANGED
@@ -1,51 +1,51 @@
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';
2
2
  export { Timeline } from './chunk-46VXFTEC.js';
3
3
  export { Tooltip } from './chunk-TEEFR2FD.js';
4
- export { Link, Paragraph, Text, Title, Typography } from './chunk-CXWEOAVU.js';
4
+ export { Link, Paragraph, Text, Title, Typography } from './chunk-ET6DYQVZ.js';
5
5
  export { Slider } from './chunk-7JN6FJ55.js';
6
6
  export { Spin } from './chunk-ELNT3CFO.js';
7
7
  export { Splitter } from './chunk-KLEKKZ73.js';
8
8
  export { StatusBar, StatusBarItem } from './chunk-6BWELOCT.js';
9
9
  export { Switch } from './chunk-QCILPZWP.js';
10
- export { TablePro } from './chunk-MUXP7ASL.js';
11
- export { Table } from './chunk-AWXCSX6J.js';
10
+ export { TablePro } from './chunk-J2HZTJO6.js';
11
+ export { Table } from './chunk-BPOOVO5T.js';
12
12
  export { Tabs } from './chunk-OBEKX4VR.js';
13
- export { MessageContainer, ToastContainer, message, toast } from './chunk-ON4DEDMI.js';
14
- export { Modal } from './chunk-CEJ7VBR6.js';
15
- export { Pagination } from './chunk-7NGMQIST.js';
13
+ export { MessageContainer, ToastContainer, message, toast } from './chunk-K5IGFBDR.js';
14
+ export { Modal } from './chunk-7IYKKLV3.js';
15
+ export { Pagination } from './chunk-CETNCRZ4.js';
16
16
  export { Popover } from './chunk-HWFM4MAT.js';
17
17
  export { Progress } from './chunk-65FIH5A3.js';
18
18
  export { Radio, RadioGroup } from './chunk-USQ43DJ5.js';
19
- export { Select } from './chunk-WKKSAGYH.js';
20
- export { Tag } from './chunk-DQTSTJ6O.js';
19
+ export { Select } from './chunk-FBYUZOZP.js';
20
+ export { Tag } from './chunk-5H5YP2TB.js';
21
21
  export { Skeleton } from './chunk-5TKC6IEN.js';
22
- export { Drawer } from './chunk-CHMCL7AV.js';
22
+ export { Drawer } from './chunk-JCEHZ336.js';
23
23
  export { Empty } from './chunk-45VJGBGN.js';
24
24
  export { Form, FormItem, useForm } from './chunk-EC4WGEAJ.js';
25
- export { Image, ImageGrid } from './chunk-PH3YECMF.js';
26
- export { InputNumber } from './chunk-EJBHR2P5.js';
25
+ export { Image, ImageGrid, LayeredImage, SpriteImage } from './chunk-DWAN57G4.js';
26
+ export { InputNumber } from './chunk-BVQ77VRY.js';
27
27
  export { List } from './chunk-6YQTMI55.js';
28
28
  export { Card } from './chunk-AXZ7ELMA.js';
29
- export { Cascader } from './chunk-GNEZQMKH.js';
30
- export { Checkbox } from './chunk-EQEJTN3V.js';
31
- export { Collapse } from './chunk-FFZ6OMZI.js';
29
+ export { Cascader } from './chunk-TGL5BGMR.js';
30
+ export { Checkbox } from './chunk-GIZU3H6H.js';
31
+ export { Collapse } from './chunk-JVUVOR6S.js';
32
32
  export { ColorPicker } from './chunk-K6F25JXT.js';
33
- export { CommandPalette } from './chunk-XD3JGL5O.js';
33
+ export { CommandPalette } from './chunk-ME5BZ2WA.js';
34
34
  export { ContextMenu } from './chunk-5C2AI2SD.js';
35
35
  export { Divider } from './chunk-LKK2AA7W.js';
36
- export { Alert } from './chunk-UMDGS4BP.js';
36
+ export { Alert } from './chunk-I5WTQ5Y3.js';
37
37
  export { AppShell, Sidebar, TitleBar, WindowControls } from './chunk-XRR3CYQL.js';
38
- export { AutoComplete } from './chunk-FJNWUELL.js';
38
+ export { AutoComplete } from './chunk-AAGF7K3L.js';
39
39
  import './chunk-DUFRASGO.js';
40
- export { Input, InputPassword } from './chunk-XTIN5545.js';
41
- export { TextArea, Textarea } from './chunk-WGZ2KJTZ.js';
40
+ export { Input, InputPassword } from './chunk-UKS23N3L.js';
41
+ export { TextArea, Textarea } from './chunk-HLFH5HWR.js';
42
42
  export { Avatar } from './chunk-7PQJCLIR.js';
43
43
  export { Badge } from './chunk-F6RYCBQG.js';
44
- export { Button } from './chunk-JD7A6VM3.js';
45
- export { Calendar } from './chunk-33NCTOEB.js';
46
- export { AimOutlined, AppstoreOutlined, BarChartOutlined, BlockOutlined, BorderOutlined, CameraOutlined, CaretDownOutlined, CaretUpOutlined, CheckCircleFilled, CheckCircleOutlined, CheckOutlined, ClockCircleFilled, CloseCircleOutlined, CloseOutlined, CopyOutlined, DashboardOutlined, DeleteOutlined, DownOutlined, EnvironmentOutlined, ExclamationCircleOutlined, FolderOpenOutlined, ICON_NAMES, Icon, LeftOutlined, LoadingOutlined, MinusCircleOutlined, MinusOutlined, NAMED_ICON_MAP, PictureOutlined, PlusOutlined, QqOutlined, ReloadOutlined, RightOutlined, RobotOutlined, SearchOutlined, SettingOutlined, StarFilled, StarOutlined, SwapOutlined, SwapRightOutlined, SyncOutlined, ThunderboltOutlined, TranslationOutlined, UnorderedListOutlined, UserOutlined, resolveIconName } from './chunk-OF3SGLZY.js';
44
+ export { Button } from './chunk-SQGPSMSK.js';
45
+ export { Calendar } from './chunk-FWPBORRB.js';
46
+ export { AimOutlined, AppstoreOutlined, BarChartOutlined, BlockOutlined, BorderOutlined, CameraOutlined, CaretDownOutlined, CaretUpOutlined, CheckCircleFilled, CheckCircleOutlined, CheckOutlined, ClockCircleFilled, CloseCircleOutlined, CloseOutlined, CopyOutlined, DashboardOutlined, DeleteOutlined, DownOutlined, EnvironmentOutlined, ExclamationCircleOutlined, FolderOpenOutlined, ICON_NAMES, Icon, LeftOutlined, LoadingOutlined, MinusCircleOutlined, MinusOutlined, NAMED_ICON_MAP, PictureOutlined, PlusOutlined, QqOutlined, ReloadOutlined, RightOutlined, RobotOutlined, SearchOutlined, SettingOutlined, StarFilled, StarOutlined, SwapOutlined, SwapRightOutlined, SyncOutlined, ThunderboltOutlined, TranslationOutlined, UnorderedListOutlined, UserOutlined, isIconName, renderIconSlot, resolveIconName } from './chunk-47VG2P34.js';
47
47
 
48
48
  // src/index.ts
49
- var VERSION = "0.6.2";
49
+ var VERSION = "0.6.3";
50
50
 
51
51
  export { VERSION };
package/dist/styles.css CHANGED
@@ -219,7 +219,7 @@ input, textarea, select { font-family: inherit; color: inherit; }
219
219
  gap: 8px;
220
220
  height: var(--ctrl-h);
221
221
  padding: 0 var(--ctrl-pad-x);
222
- border: none;
222
+ border: 1px solid transparent;
223
223
  border-radius: var(--r-md);
224
224
  font-size: 13px;
225
225
  font-weight: 500;
@@ -231,55 +231,67 @@ input, textarea, select { font-family: inherit; color: inherit; }
231
231
  user-select: none;
232
232
  white-space: nowrap;
233
233
  flex-shrink: 0;
234
- transition: all var(--dur-fast) var(--ease);
234
+ transition:
235
+ background var(--dur-fast) var(--ease),
236
+ box-shadow var(--dur-fast) var(--ease),
237
+ color var(--dur-fast) var(--ease);
238
+ }
239
+ .btn > svg,
240
+ .btn-icon-slot {
241
+ flex-shrink: 0;
242
+ }
243
+ .btn-icon-slot {
244
+ display: inline-flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ line-height: 0;
248
+ }
249
+ .btn-icon-slot img {
250
+ display: block;
251
+ max-width: 1.25em;
252
+ max-height: 1.25em;
253
+ object-fit: contain;
235
254
  }
236
- .btn > svg { flex-shrink: 0; }
237
255
  .btn.icon {
238
256
  flex-shrink: 0;
239
257
  overflow: visible;
240
258
  }
241
- .btn:hover { color: var(--accent-ink); }
242
- .btn:active, .btn.pressed {
243
- box-shadow: var(--neu-in-sm);
244
- color: var(--accent-ink);
245
- }
246
259
  .btn.primary {
247
260
  color: var(--accent-ink);
248
- background:
249
- linear-gradient(145deg,
250
- color-mix(in oklch, var(--accent-soft) 80%, var(--shadow-light)),
251
- color-mix(in oklch, var(--accent-soft) 92%, var(--bg)));
252
- box-shadow:
253
- var(--neu-out-sm),
254
- inset 1px 1px 0 color-mix(in oklch, var(--shadow-light) 60%, transparent),
255
- inset -1px -1px 0 color-mix(in oklch, var(--accent) 15%, transparent);
261
+ background: color-mix(in oklch, var(--accent-soft) 62%, var(--bg));
256
262
  font-weight: 600;
257
263
  }
258
- .btn.primary:hover {
259
- background:
260
- linear-gradient(145deg,
261
- color-mix(in oklch, var(--accent-soft) 70%, var(--shadow-light)),
262
- color-mix(in oklch, var(--accent) 18%, var(--accent-soft)));
263
- box-shadow:
264
- var(--neu-out-sm),
265
- inset 1px 1px 0 color-mix(in oklch, var(--shadow-light) 70%, transparent),
266
- inset -1px -1px 0 color-mix(in oklch, var(--accent) 20%, transparent),
267
- 0 0 16px -6px var(--accent-glow);
268
- }
269
- .btn.primary:active, .btn.primary.pressed {
270
- box-shadow:
271
- inset 2px 2px 4px color-mix(in oklch, var(--accent) 25%, var(--shadow-dark)),
272
- inset -1px -1px 2px var(--shadow-light);
273
- transform: none;
274
- }
275
264
  .btn.ghost {
276
265
  background: transparent;
277
266
  box-shadow: none;
278
267
  color: var(--fg-muted);
279
268
  }
280
- .btn.ghost:hover { background: var(--bg); box-shadow: var(--neu-flat); color: var(--fg); }
281
269
  .btn.danger { color: var(--danger); }
282
- .btn.danger:hover { color: var(--danger); }
270
+ .btn:hover {
271
+ box-shadow: var(--neu-out);
272
+ }
273
+ .btn.ghost:hover {
274
+ background: var(--bg);
275
+ border-color: transparent;
276
+ box-shadow: var(--neu-flat);
277
+ color: var(--fg);
278
+ }
279
+ .btn.danger:hover {
280
+ color: var(--danger);
281
+ }
282
+ .btn:active,
283
+ .btn.pressed {
284
+ box-shadow: var(--neu-in);
285
+ }
286
+ .btn.ghost:active,
287
+ .btn.ghost.pressed {
288
+ background: var(--bg);
289
+ color: var(--fg);
290
+ }
291
+ .btn.danger:active,
292
+ .btn.danger.pressed {
293
+ color: var(--danger);
294
+ }
283
295
  .btn.icon { width: var(--ctrl-h); padding: 0; }
284
296
  .btn.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: var(--r-sm); }
285
297
  .btn.sm.icon { width: 30px; padding: 0; }
@@ -289,10 +301,17 @@ input, textarea, select { font-family: inherit; color: inherit; }
289
301
  .btn[disabled], .btn.disabled, .btn:disabled {
290
302
  color: var(--fg-subtle);
291
303
  cursor: not-allowed;
304
+ border-color: transparent;
305
+ box-shadow: var(--neu-flat);
306
+ transform: none;
307
+ }
308
+ .btn[disabled]:hover, .btn:disabled:hover, .btn.disabled:hover {
309
+ color: var(--fg-subtle);
310
+ background: var(--bg);
311
+ border-color: transparent;
292
312
  box-shadow: var(--neu-flat);
293
313
  transform: none;
294
314
  }
295
- .btn[disabled]:hover, .btn:disabled:hover, .btn.disabled:hover { transform: none; color: var(--fg-subtle); background: var(--bg); }
296
315
  .btn.loading { cursor: wait; }
297
316
  .btn .spinner {
298
317
  width: 14px; height: 14px;
@@ -338,6 +357,16 @@ input, textarea, select { font-family: inherit; color: inherit; }
338
357
  color: var(--fg-subtle);
339
358
  flex-shrink: 0;
340
359
  display: inline-flex;
360
+ align-items: center;
361
+ justify-content: center;
362
+ line-height: 0;
363
+ }
364
+ .input-wrap .lead img,
365
+ .input-wrap .trail img {
366
+ display: block;
367
+ width: 16px;
368
+ height: 16px;
369
+ object-fit: contain;
341
370
  }
342
371
  .input-wrap .lead.interactive,
343
372
  .input-wrap .trail.interactive { cursor: pointer; pointer-events: auto; }
@@ -903,7 +932,20 @@ input, textarea, select { font-family: inherit; color: inherit; }
903
932
  .tag.solid.danger { background: var(--danger); color: var(--bg); box-shadow: 0 2px 6px color-mix(in oklch, var(--danger) 35%, transparent); }
904
933
  .tag.borderless { background: transparent; box-shadow: none; }
905
934
  .tag .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
906
- .tag .tag-ico { color: currentColor; display: inline-flex; }
935
+ .tag .tag-ico {
936
+ color: currentColor;
937
+ display: inline-flex;
938
+ align-items: center;
939
+ justify-content: center;
940
+ line-height: 0;
941
+ flex-shrink: 0;
942
+ }
943
+ .tag .tag-ico img {
944
+ display: block;
945
+ width: 1em;
946
+ height: 1em;
947
+ object-fit: contain;
948
+ }
907
949
  .tag .x { cursor: pointer; color: var(--fg-subtle); margin-left: 2px; display: inline-flex; }
908
950
  .tag .x:hover { color: var(--fg); }
909
951
  /* ============ Badge ============ */
@@ -1228,11 +1270,36 @@ input, textarea, select { font-family: inherit; color: inherit; }
1228
1270
  flex: 1;
1229
1271
  min-width: 0;
1230
1272
  }
1231
- .select-value > span {
1273
+ .select-value-label {
1232
1274
  white-space: nowrap;
1233
1275
  overflow: hidden;
1234
1276
  text-overflow: ellipsis;
1235
1277
  }
1278
+ .select-icon,
1279
+ .menu-item-icon {
1280
+ display: inline-flex;
1281
+ align-items: center;
1282
+ justify-content: center;
1283
+ line-height: 0;
1284
+ flex-shrink: 0;
1285
+ }
1286
+ .select-icon img,
1287
+ .menu-item-icon img {
1288
+ display: block;
1289
+ width: 16px;
1290
+ height: 16px;
1291
+ object-fit: contain;
1292
+ }
1293
+ .select.sm .select-icon img,
1294
+ .select.sm .menu-item-icon img {
1295
+ width: 14px;
1296
+ height: 14px;
1297
+ }
1298
+ .select.lg .select-icon img,
1299
+ .select.lg .menu-item-icon img {
1300
+ width: 18px;
1301
+ height: 18px;
1302
+ }
1236
1303
  .select.invalid .select-trigger {
1237
1304
  box-shadow: var(--neu-out-sm), 0 0 0 2px color-mix(in oklch, var(--danger) 30%, transparent);
1238
1305
  }
@@ -1793,6 +1860,13 @@ input, textarea, select { font-family: inherit; color: inherit; }
1793
1860
  display: grid; place-items: center;
1794
1861
  flex-shrink: 0;
1795
1862
  margin-top: 1px;
1863
+ line-height: 0;
1864
+ }
1865
+ .alert-ico img {
1866
+ display: block;
1867
+ width: 16px;
1868
+ height: 16px;
1869
+ object-fit: contain;
1796
1870
  }
1797
1871
  .alert.info .alert-ico { color: var(--info); }
1798
1872
  .alert.success .alert-ico { color: var(--success); }
@@ -2417,6 +2491,18 @@ input, textarea, select { font-family: inherit; color: inherit; }
2417
2491
  overflow: hidden;
2418
2492
  line-height: 0;
2419
2493
  }
2494
+ .n-image.raw {
2495
+ border-radius: 0;
2496
+ background: transparent;
2497
+ box-shadow: none;
2498
+ }
2499
+ .n-image.icon {
2500
+ border-radius: var(--r-sm);
2501
+ }
2502
+ .n-image.unframed {
2503
+ background: transparent;
2504
+ box-shadow: none;
2505
+ }
2420
2506
  .n-image-frame {
2421
2507
  position: relative;
2422
2508
  overflow: hidden;
@@ -2424,6 +2510,16 @@ input, textarea, select { font-family: inherit; color: inherit; }
2424
2510
  box-shadow: var(--neu-in-sm);
2425
2511
  background: var(--bg-sunken);
2426
2512
  }
2513
+ .n-image.raw .n-image-frame {
2514
+ border-radius: 0;
2515
+ }
2516
+ .n-image.icon .n-image-frame {
2517
+ border-radius: var(--r-sm);
2518
+ }
2519
+ .n-image.unframed .n-image-frame {
2520
+ background: transparent;
2521
+ box-shadow: none;
2522
+ }
2427
2523
  .n-image img {
2428
2524
  display: block;
2429
2525
  width: 100%;
@@ -2512,6 +2608,61 @@ input, textarea, select { font-family: inherit; color: inherit; }
2512
2608
  border-radius: var(--r-lg);
2513
2609
  box-shadow: var(--neu-float);
2514
2610
  }
2611
+ /* ============ SpriteImage / LayeredImage ============ */
2612
+ .n-sprite-image,
2613
+ .n-layered-image {
2614
+ display: inline-block;
2615
+ position: relative;
2616
+ border-radius: var(--r-sm);
2617
+ background: var(--bg);
2618
+ padding: 6px;
2619
+ box-shadow: var(--neu-out-sm);
2620
+ overflow: hidden;
2621
+ line-height: 0;
2622
+ }
2623
+ .n-sprite-image.raw,
2624
+ .n-layered-image.raw {
2625
+ border-radius: 0;
2626
+ background: transparent;
2627
+ box-shadow: none;
2628
+ }
2629
+ .n-sprite-image.unframed,
2630
+ .n-layered-image.unframed {
2631
+ background: transparent;
2632
+ box-shadow: none;
2633
+ }
2634
+ .n-sprite-image-frame,
2635
+ .n-layered-image-frame {
2636
+ position: relative;
2637
+ width: 100%;
2638
+ overflow: hidden;
2639
+ border-radius: var(--r-sm);
2640
+ background: var(--bg-sunken);
2641
+ box-shadow: var(--neu-in-sm);
2642
+ }
2643
+ .n-sprite-image.raw .n-sprite-image-frame,
2644
+ .n-layered-image.raw .n-layered-image-frame {
2645
+ border-radius: 0;
2646
+ }
2647
+ .n-sprite-image.unframed .n-sprite-image-frame,
2648
+ .n-layered-image.unframed .n-layered-image-frame {
2649
+ background: transparent;
2650
+ box-shadow: none;
2651
+ }
2652
+ .n-sprite-image-sprite {
2653
+ display: block;
2654
+ background-repeat: no-repeat;
2655
+ transform-origin: top left;
2656
+ }
2657
+ .n-layered-image-layer {
2658
+ position: absolute;
2659
+ display: block;
2660
+ }
2661
+ .n-layered-image img {
2662
+ display: block;
2663
+ width: 100%;
2664
+ height: 100%;
2665
+ }
2515
2666
  /* ============ Cascader ============ */
2516
2667
  .cascader {
2517
2668
  position: relative;
@@ -2640,6 +2791,19 @@ input, textarea, select { font-family: inherit; color: inherit; }
2640
2791
  width: 100%;
2641
2792
  text-align: left;
2642
2793
  }
2794
+ .cascader-icon {
2795
+ display: inline-flex;
2796
+ align-items: center;
2797
+ justify-content: center;
2798
+ line-height: 0;
2799
+ flex-shrink: 0;
2800
+ }
2801
+ .cascader-icon img {
2802
+ display: block;
2803
+ width: 15px;
2804
+ height: 15px;
2805
+ object-fit: contain;
2806
+ }
2643
2807
  .cascader-item:hover { background: var(--bg); box-shadow: var(--neu-flat); color: var(--accent-ink); }
2644
2808
  .cascader-item.active {
2645
2809
  background: var(--bg);
@@ -22,12 +22,13 @@ import { Alert } from "@fangxinyan/lumina";
22
22
  <Alert tone="info" closable>仅一行的简短提示</Alert>
23
23
  ```
24
24
 
25
- ### 隐藏图标
25
+ ### 图标控制
26
26
 
27
- showIcon={false} 可隐藏左侧语义图标,文本更紧凑。
27
+ showIcon={false} 可隐藏左侧语义图标;icon 可传 IconName 或 ReactNode。
28
28
 
29
29
  ```tsx
30
30
  <Alert tone="info" showIcon={false}>纯文本提示</Alert>
31
+ <Alert icon={<img src={iconUrl} alt="" />}>自定义图标</Alert>
31
32
  ```
32
33
 
33
34
  ### 自定义操作区
@@ -53,7 +54,7 @@ action 插槽可以放置按钮等操作元素,位于内容与关闭按钮之间
53
54
  | --- | --- | --- | --- |
54
55
  | tone | `"info" | "success" | "warning" | "danger"` | `"info"` | 语气 |
55
56
  | title | `ReactNode` | — | 标题 |
56
- | icon | `IconName` | — | 自定义图标 |
57
+ | icon | `IconName | ReactNode` | — | 自定义图标,可传内置图标名或自定义节点 |
57
58
  | showIcon | `boolean` | `true` | 是否显示语义图标 |
58
59
  | action | `ReactNode` | — | 右侧操作区(如按钮) |
59
60
  | closable | `boolean` | `false` | 可关闭 |
@@ -23,12 +23,13 @@ import { Button } from "@fangxinyan/lumina";
23
23
 
24
24
  ### 图标按钮
25
25
 
26
- icon 在前,trailingIcon 在后。
26
+ icon 在前,trailingIcon 在后,既支持内置 IconName,也支持外部 ReactNode。
27
27
 
28
28
  ```tsx
29
29
  <Button variant="primary" icon="sparkle">新建</Button>
30
30
  <Button icon="download">下载</Button>
31
31
  <Button trailingIcon="arrowRight">下一步</Button>
32
+ <Button icon={<img src={iconUrl} alt="" />}>外部图标</Button>
32
33
  ```
33
34
 
34
35
  ### 加载与禁用
@@ -77,8 +78,8 @@ Button 在只有 icon 时自动呈现为方形按钮,常配合 tip 使用。
77
78
  | --- | --- | --- | --- |
78
79
  | variant | `"default" | "primary" | "ghost" | "danger"` | `"default"` | 按钮风格 |
79
80
  | size | `"sm" | "md" | "lg"` | `"md"` | 按钮尺寸 |
80
- | icon | `IconName` | — | 前置图标 |
81
- | trailingIcon | `IconName` | — | 后置图标 |
81
+ | icon | `IconName | ReactNode` | — | 前置图标,可传内置图标名或自定义节点 |
82
+ | trailingIcon | `IconName | ReactNode` | — | 后置图标,可传内置图标名或自定义节点 |
82
83
  | iconOnly | `boolean` | `自动` | 渲染为纯图标方形按钮 |
83
84
  | tip | `string` | — | 原生悬浮提示,常用于纯图标按钮 |
84
85
  | loading | `boolean` | `false` | 加载态 |
@@ -12,6 +12,8 @@ import { Cascader } from "@fangxinyan/lumina";
12
12
 
13
13
  ### 基础用法
14
14
 
15
+ option.icon 支持 IconName 或 ReactNode。
16
+
15
17
  ```tsx
16
18
  <Cascader options={regions} value={addr} onChange={setAddr} />
17
19
  ```
@@ -38,6 +40,7 @@ showSearch 开启路径搜索,allowClear 提供一键清空,popupClassName 可
38
40
  | Prop | 类型 | 默认 | 说明 |
39
41
  | --- | --- | --- | --- |
40
42
  | options \* | `CascaderOption[]` | — | 层级选项树 |
43
+ | options[].icon | `IconName | ReactNode` | — | 选项前置图标,可传内置图标名或自定义节点 |
41
44
  | value / defaultValue | `string[]` | — | 受控/初始路径 |
42
45
  | onChange | `(path: string[]) => void` | — | 选择叶子时触发 |
43
46
  | placeholder | `string` | — | 占位文案 |
@@ -5,7 +5,7 @@
5
5
  ## 导入
6
6
 
7
7
  ```tsx
8
- import { Image, ImageGrid } from "@fangxinyan/lumina";
8
+ import { Image, ImageGrid, SpriteImage, LayeredImage } from "@fangxinyan/lumina";
9
9
  ```
10
10
 
11
11
  ## 示例
@@ -16,10 +16,43 @@ import { Image, ImageGrid } from "@fangxinyan/lumina";
16
16
  <Image src={url} width={240} height={160} />
17
17
  ```
18
18
 
19
+ ### 图标 / 原始资源
20
+
21
+ variant="icon" 会默认去掉外层 padding,适合 1:1 装备、物品、头像缩略图;variant="raw" 保留原始图片比例。
22
+
23
+ ```tsx
24
+ <Image variant="icon" src={iconUrl} width={56} height={56} preview={false} />
25
+ <Image variant="raw" src={bannerUrl} width={220} height={84} objectFit="contain" />
26
+ ```
27
+
28
+ ### Sprite 裁剪
29
+
30
+ SpriteImage 用 background-position 裁剪同一张雪碧图,适合 url + x/y/width/height 形式的图标资源。
31
+
32
+ ```tsx
33
+ <SpriteImage src={sheetUrl} sprite={{ x: 32, y: 0, width: 32, height: 32 }} />
34
+ ```
35
+
36
+ ### 多图层图片
37
+
38
+ LayeredImage 将多张图片叠在同一个盒子里,适合头像 + 头像框、底图 + 标记等资产。
39
+
40
+ ```tsx
41
+ <LayeredImage
42
+ width={72}
43
+ height={72}
44
+ layers={[
45
+ { src: headUrl, fit: "cover" },
46
+ { src: frameUrl },
47
+ ]}
48
+ />
49
+ ```
50
+
19
51
  ### 图片组
20
52
 
21
53
  ```tsx
22
54
  <ImageGrid images={images} />
55
+ <ImageGrid images={icons} imageProps={{ variant: "icon", preview: false }} />
23
56
  ```
24
57
 
25
58
  ## API
@@ -30,9 +63,47 @@ import { Image, ImageGrid } from "@fangxinyan/lumina";
30
63
  | --- | --- | --- | --- |
31
64
  | src | `string` | — | 图片 URL |
32
65
  | width / height | `number | string` | — | 尺寸 |
66
+ | variant | `"framed" | "raw" | "icon"` | `"framed"` | 视觉形态 |
67
+ | frame | `boolean` | `framed 时 true` | 是否保留内层凹陷 frame |
68
+ | padding | `number | string` | — | 外层留白,raw/icon 默认 0 |
69
+ | objectFit / objectPosition | `CSSProperties` | — | 底层 img 的 object-fit / object-position |
33
70
  | preview | `boolean` | `true` | 支持点击全屏预览 |
34
71
  | hover | `boolean` | `true` | 悬浮放大 |
35
72
  | placeholder | `ReactNode` | — | 占位/错误时内容 |
73
+ | imgProps | `ImgHTMLAttributes` | — | 透传到底层 img 的属性 |
74
+
75
+
76
+ **ImageGrid**
77
+
78
+ | Prop | 类型 | 默认 | 说明 |
79
+ | --- | --- | --- | --- |
80
+ | images \* | `ImageGridItem[]` | — | 图片项数组,单项也可覆盖 Image props |
81
+ | columns | `number` | — | 固定列数,不传则自动填充 |
82
+ | itemHeight | `number` | `130` | 默认图片高度 |
83
+ | minItemWidth | `number | string` | `160` | 自动填充时的最小列宽 |
84
+ | gap | `number | string` | `14` | 网格间距 |
85
+ | imageProps | `ImageProps` | — | 批量传给每个 Image 的属性 |
86
+
87
+
88
+ **SpriteImage**
89
+
90
+ | Prop | 类型 | 默认 | 说明 |
91
+ | --- | --- | --- | --- |
92
+ | src \* | `string` | — | sprite sheet 图片 URL |
93
+ | sprite \* | `{ x; y; width; height }` | — | 裁剪区域 |
94
+ | width / height | `number | string` | — | 渲染尺寸,默认使用 sprite 尺寸 |
95
+ | scale | `number` | `1` | 未指定 width/height 时的缩放倍数 |
96
+ | backgroundSize | `string` | — | 自定义 background-size |
97
+ | variant / frame / padding | `ImageVariant / boolean / number` | — | 同 Image 的媒体外观控制 |
98
+
99
+
100
+ **LayeredImage**
101
+
102
+ | Prop | 类型 | 默认 | 说明 |
103
+ | --- | --- | --- | --- |
104
+ | layers \* | `LayeredImageLayer[]` | — | 按顺序叠放的图片层 |
105
+ | width / height | `number | string` | — | 容器尺寸 |
106
+ | variant / frame / padding | `ImageVariant / boolean / number` | — | 同 Image 的媒体外观控制 |
36
107
 
37
108
 
38
109
  ---
@@ -24,10 +24,11 @@ const [v, setV] = useState("");
24
24
 
25
25
  ### 前后置图标
26
26
 
27
- leadingIcon / trailingIcon。
27
+ leadingIcon / trailingIcon 支持内置 IconName 或外部 ReactNode。
28
28
 
29
29
  ```tsx
30
30
  <Input placeholder="搜索..." leadingIcon="search" />
31
+ <Input placeholder="物品名" leadingIcon={<img src={iconUrl} alt="" />} />
31
32
  ```
32
33
 
33
34
  ### Input.Password
@@ -106,7 +107,7 @@ Input.TextArea 与 Textarea 使用同一套多行输入能力,也支持 allowCle
106
107
  | onChange | `(event) => void` | — | 变更回调,传入 React 原生事件 |
107
108
  | onValueChange | `(value: string, event) => void` | — | 值回调便捷写法 |
108
109
  | placeholder | `string` | — | 占位文案 |
109
- | leadingIcon / trailingIcon | `IconName` | — | 前/后置图标 |
110
+ | leadingIcon / trailingIcon | `IconName | ReactNode` | — | 前/后置图标,可传内置图标名或自定义节点 |
110
111
  | prefix | `ReactNode` | — | 左侧内嵌内容(在 leadingIcon 之后) |
111
112
  | suffix | `ReactNode` | — | 右侧内嵌内容(在 trailingIcon 之前) |
112
113
  | allowClear | `boolean` | `false` | 显示内置的清除按钮 |
@@ -29,7 +29,7 @@ multiple + Tag 形式呈现已选项。
29
29
 
30
30
  ### 搜索过滤
31
31
 
32
- searchable + clearable + 选项 icon/description。
32
+ searchable + clearable + 选项 icon/description。icon 支持 IconName 或 ReactNode。
33
33
 
34
34
  ```tsx
35
35
  <Select searchable clearable
@@ -110,7 +110,7 @@ loading 时显示 spinner,emptyContent 自定义空态。
110
110
  | --- | --- | --- | --- |
111
111
  | value \* | `T` | — | 值 |
112
112
  | label | `ReactNode` | — | 显示 |
113
- | icon | `IconName` | — | 前置图标 |
113
+ | icon | `IconName | ReactNode` | — | 前置图标,可传内置图标名或自定义节点 |
114
114
  | description | `ReactNode` | — | 次要描述 |
115
115
  | disabled | `boolean` | `false` | 禁用项 |
116
116
 
package/docs/llms/tag.md CHANGED
@@ -34,11 +34,12 @@ dot 渲染前置色块。
34
34
 
35
35
  ### 前置图标
36
36
 
37
- icon 使用内置 Icon 组件,颜色随语气自动适配。
37
+ icon 可传内置 IconName 或自定义 ReactNode,颜色随语气自动适配。
38
38
 
39
39
  ```tsx
40
40
  <Tag tone="success" icon="check2">已完成</Tag>
41
41
  <Tag tone="info" icon="star">推荐</Tag>
42
+ <Tag icon={<img src={iconUrl} alt="" />}>物品</Tag>
42
43
  ```
43
44
 
44
45
  ### 无边框
@@ -67,7 +68,7 @@ removable + onRemove 实现关闭按钮。
67
68
  | tone | `"neutral" | "accent" | "info" | "success" | "warning" | "danger"` | `"neutral"` | 色调 |
68
69
  | solid | `boolean` | `false` | 实心填充 |
69
70
  | dot | `boolean` | `false` | 前置圆点 |
70
- | icon | `IconName` | — | 前置图标 |
71
+ | icon | `IconName | ReactNode` | — | 前置图标,可传内置图标名或自定义节点 |
71
72
  | bordered | `boolean` | `true` | 是否显示外框 flat 阴影 |
72
73
  | removable | `boolean` | `false` | 显示 × |
73
74
  | onRemove | `() => void` | — | 关闭回调 |