@fangxinyan/lumina 0.6.10 → 0.6.12

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.
@@ -1,6 +1,8 @@
1
1
  /* ============ Card ============ */
2
2
  .card {
3
- background: var(--bg);
3
+ --card-bg: var(--bg);
4
+ --card-loading-bg: color-mix(in srgb, var(--bg) 72%, var(--bg-sunken));
5
+ background: var(--card-bg);
4
6
  border-radius: var(--r-lg);
5
7
  box-shadow: var(--neu-shadow-panel);
6
8
  padding: var(--gap-5);
@@ -66,7 +68,7 @@
66
68
  border-radius: var(--r-md);
67
69
  display: grid;
68
70
  place-items: center;
69
- background: color-mix(in srgb, var(--bg) 72%, var(--bg-sunken));
71
+ background: var(--card-loading-bg);
70
72
  box-shadow:
71
73
  inset calc(var(--shadow-inset-offset) * 0.45) calc(var(--shadow-inset-offset) * 0.45) calc(var(--shadow-inset-blur) * 0.45) color-mix(in oklch, var(--shadow-dark) 55%, transparent),
72
74
  inset calc(var(--shadow-inset-offset) * -0.45) calc(var(--shadow-inset-offset) * -0.45) calc(var(--shadow-inset-blur) * 0.45) color-mix(in oklch, var(--shadow-light) 72%, transparent);
package/dist/Card.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkOUSJMIZX_cjs = require('./chunk-OUSJMIZX.cjs');
3
+ var chunkKZZ5Y56R_cjs = require('./chunk-KZZ5Y56R.cjs');
4
4
  require('./chunk-MZCKPLHQ.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Card", {
9
9
  enumerable: true,
10
- get: function () { return chunkOUSJMIZX_cjs.Card; }
10
+ get: function () { return chunkKZZ5Y56R_cjs.Card; }
11
11
  });
package/dist/Card.d.cts CHANGED
@@ -7,6 +7,8 @@ type CardBodyProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "cl
7
7
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
8
8
  /** Visual variant. `raised` protrudes; `sunken` recesses; `flat` is subtle. */
9
9
  variant?: "raised" | "sunken" | "flat";
10
+ /** Custom card background. Accepts CSS colors, theme tokens, color-mix and gradients. */
11
+ background?: React.CSSProperties["background"];
10
12
  /** Inner padding. */
11
13
  padding?: "none" | "sm" | "md" | "lg";
12
14
  /** When true, the card raises and lifts on hover. */
package/dist/Card.d.ts CHANGED
@@ -7,6 +7,8 @@ type CardBodyProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "cl
7
7
  interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
8
8
  /** Visual variant. `raised` protrudes; `sunken` recesses; `flat` is subtle. */
9
9
  variant?: "raised" | "sunken" | "flat";
10
+ /** Custom card background. Accepts CSS colors, theme tokens, color-mix and gradients. */
11
+ background?: React.CSSProperties["background"];
10
12
  /** Inner padding. */
11
13
  padding?: "none" | "sm" | "md" | "lg";
12
14
  /** When true, the card raises and lifts on hover. */
package/dist/Card.js CHANGED
@@ -1,2 +1,2 @@
1
- export { Card } from './chunk-HEBBQZUT.js';
1
+ export { Card } from './chunk-RBDBEXUU.js';
2
2
  import './chunk-3GJZRYTD.js';
@@ -79,11 +79,10 @@
79
79
  isolation: isolate;
80
80
  transition: transform var(--dur-fast) var(--ease);
81
81
  }
82
- .table.cards tbody tr::before {
83
- content: "";
82
+ .table.cards .card-row-surface {
84
83
  position: absolute;
85
84
  inset: 0;
86
- z-index: 0;
85
+ z-index: -1;
87
86
  border-radius: var(--r-md);
88
87
  background: var(--bg);
89
88
  box-shadow: var(--neu-shadow-control);
@@ -105,6 +104,7 @@
105
104
  box-shadow: none;
106
105
  }
107
106
  .table.cards tbody td:first-child {
107
+ position: static;
108
108
  border-radius: var(--r-md) 0 0 var(--r-md);
109
109
  }
110
110
  .table.cards tbody td:last-child {
@@ -113,7 +113,7 @@
113
113
  .table.cards.hoverable tbody tr:hover {
114
114
  transform: translateY(-1px);
115
115
  }
116
- .table.cards.hoverable tbody tr:hover::before { box-shadow: var(--neu-shadow-panel); }
116
+ .table.cards.hoverable tbody tr:hover .card-row-surface { box-shadow: var(--neu-shadow-panel); }
117
117
  .table.cards.hoverable tbody tr:hover td { background: transparent; }
118
118
 
119
119
  .table .row-check { width: 44px; }
package/dist/Table.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPPDPKPLE_cjs = require('./chunk-PPDPKPLE.cjs');
3
+ var chunkHXQWVPT3_cjs = require('./chunk-HXQWVPT3.cjs');
4
4
  require('./chunk-XVDD6JEU.cjs');
5
5
  require('./chunk-F65KYGPX.cjs');
6
6
  require('./chunk-76OH42CM.cjs');
@@ -14,5 +14,5 @@ require('./chunk-GJAEGIPM.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "Table", {
16
16
  enumerable: true,
17
- get: function () { return chunkPPDPKPLE_cjs.Table; }
17
+ get: function () { return chunkHXQWVPT3_cjs.Table; }
18
18
  });
package/dist/Table.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Table } from './chunk-QMZBOB7Q.js';
1
+ export { Table } from './chunk-5JNRCBTF.js';
2
2
  import './chunk-5CWTC3I2.js';
3
3
  import './chunk-MOLKLUSQ.js';
4
4
  import './chunk-I5XCHN67.js';
package/dist/TablePro.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ2KV6K23_cjs = require('./chunk-J2KV6K23.cjs');
4
- require('./chunk-PPDPKPLE.cjs');
3
+ var chunk73T32MII_cjs = require('./chunk-73T32MII.cjs');
4
+ require('./chunk-HXQWVPT3.cjs');
5
5
  require('./chunk-XVDD6JEU.cjs');
6
6
  require('./chunk-F65KYGPX.cjs');
7
7
  require('./chunk-76OH42CM.cjs');
@@ -15,5 +15,5 @@ require('./chunk-GJAEGIPM.cjs');
15
15
 
16
16
  Object.defineProperty(exports, "TablePro", {
17
17
  enumerable: true,
18
- get: function () { return chunkJ2KV6K23_cjs.TablePro; }
18
+ get: function () { return chunk73T32MII_cjs.TablePro; }
19
19
  });
package/dist/TablePro.js CHANGED
@@ -1,5 +1,5 @@
1
- export { TablePro } from './chunk-KWIHEE4D.js';
2
- import './chunk-QMZBOB7Q.js';
1
+ export { TablePro } from './chunk-CBZJ4UL4.js';
2
+ import './chunk-5JNRCBTF.js';
3
3
  import './chunk-5CWTC3I2.js';
4
4
  import './chunk-MOLKLUSQ.js';
5
5
  import './chunk-I5XCHN67.js';
@@ -4,7 +4,7 @@ import { useFloating } from './chunk-DUFRASGO.js';
4
4
  import { Icon } from './chunk-SNX4FZYB.js';
5
5
  import './tokens-RGFJKRC7.css';
6
6
  import './shared-NJHRNLRH.css';
7
- import './Table-5XJNZWLF.css';
7
+ import './Table-IWHIIGRJ.css';
8
8
  import * as React from 'react';
9
9
  import { createPortal } from 'react-dom';
10
10
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -287,6 +287,8 @@ var TableInner = ({
287
287
  const selProps = rowSelection?.getCheckboxProps?.(row);
288
288
  const canExpand = hasExpandable && (expandable?.rowExpandable?.(row) ?? true);
289
289
  const isExpanded = canExpand && expandedKeys.includes(k);
290
+ const cardSurfaceTarget = showExpandCol ? "__expand" : showSelCol ? "__select" : columns[0]?.key;
291
+ const cardRowSurface = v === "cards" ? /* @__PURE__ */ jsx("span", { className: "card-row-surface", "aria-hidden": "true" }) : null;
290
292
  return /* @__PURE__ */ jsxs(React.Fragment, { children: [
291
293
  /* @__PURE__ */ jsxs(
292
294
  "tr",
@@ -294,7 +296,7 @@ var TableInner = ({
294
296
  className: `${onRowClick ? "clickable" : ""} ${isSel ? "selected" : ""}`,
295
297
  onClick: onRowClick ? () => onRowClick(row, i) : void 0,
296
298
  children: [
297
- showExpandCol && /* @__PURE__ */ jsx(
299
+ showExpandCol && /* @__PURE__ */ jsxs(
298
300
  "td",
299
301
  {
300
302
  className: "row-expand",
@@ -302,23 +304,26 @@ var TableInner = ({
302
304
  e.stopPropagation();
303
305
  if (canExpand) toggleExpand(row, k);
304
306
  },
305
- children: canExpand && /* @__PURE__ */ jsx(
306
- "button",
307
- {
308
- type: "button",
309
- className: `expand-btn ${isExpanded ? "open" : ""}`,
310
- "aria-expanded": isExpanded,
311
- "aria-label": isExpanded ? "Collapse row" : "Expand row",
312
- onClick: (e) => {
313
- e.stopPropagation();
314
- toggleExpand(row, k);
315
- },
316
- children: /* @__PURE__ */ jsx(Icon, { name: "chevRight", size: 12 })
317
- }
318
- )
307
+ children: [
308
+ cardSurfaceTarget === "__expand" && cardRowSurface,
309
+ canExpand && /* @__PURE__ */ jsx(
310
+ "button",
311
+ {
312
+ type: "button",
313
+ className: `expand-btn ${isExpanded ? "open" : ""}`,
314
+ "aria-expanded": isExpanded,
315
+ "aria-label": isExpanded ? "Collapse row" : "Expand row",
316
+ onClick: (e) => {
317
+ e.stopPropagation();
318
+ toggleExpand(row, k);
319
+ },
320
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevRight", size: 12 })
321
+ }
322
+ )
323
+ ]
319
324
  }
320
325
  ),
321
- showSelCol && /* @__PURE__ */ jsx(
326
+ showSelCol && /* @__PURE__ */ jsxs(
322
327
  "td",
323
328
  {
324
329
  className: "row-check",
@@ -326,32 +331,38 @@ var TableInner = ({
326
331
  e.stopPropagation();
327
332
  toggleRow(row, k);
328
333
  },
329
- children: selectionType === "radio" ? /* @__PURE__ */ jsx(
330
- "button",
331
- {
332
- type: "button",
333
- role: "radio",
334
- "aria-checked": isSel,
335
- disabled: selProps?.disabled,
336
- className: `radio-dot ${isSel ? "checked" : ""}`,
337
- onClick: (e) => {
338
- e.stopPropagation();
339
- toggleRow(row, k);
334
+ children: [
335
+ cardSurfaceTarget === "__select" && cardRowSurface,
336
+ selectionType === "radio" ? /* @__PURE__ */ jsx(
337
+ "button",
338
+ {
339
+ type: "button",
340
+ role: "radio",
341
+ "aria-checked": isSel,
342
+ disabled: selProps?.disabled,
343
+ className: `radio-dot ${isSel ? "checked" : ""}`,
344
+ onClick: (e) => {
345
+ e.stopPropagation();
346
+ toggleRow(row, k);
347
+ }
348
+ }
349
+ ) : /* @__PURE__ */ jsx(
350
+ Checkbox,
351
+ {
352
+ checked: isSel,
353
+ disabled: selProps?.disabled,
354
+ onChange: () => toggleRow(row, k)
340
355
  }
341
- }
342
- ) : /* @__PURE__ */ jsx(
343
- Checkbox,
344
- {
345
- checked: isSel,
346
- disabled: selProps?.disabled,
347
- onChange: () => toggleRow(row, k)
348
- }
349
- )
356
+ )
357
+ ]
350
358
  }
351
359
  ),
352
360
  columns.map((c) => {
353
361
  const val = c.dataIndex ? row[c.dataIndex] : void 0;
354
- return /* @__PURE__ */ jsx("td", { style: { textAlign: c.align ?? "left" }, children: c.render ? c.render(val, row, i) : val }, c.key);
362
+ return /* @__PURE__ */ jsxs("td", { style: { textAlign: c.align ?? "left" }, children: [
363
+ cardSurfaceTarget === c.key && cardRowSurface,
364
+ c.render ? c.render(val, row, i) : val
365
+ ] }, c.key);
355
366
  })
356
367
  ]
357
368
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPPDPKPLE_cjs = require('./chunk-PPDPKPLE.cjs');
3
+ var chunkHXQWVPT3_cjs = require('./chunk-HXQWVPT3.cjs');
4
4
  require('./tokens-RGFJKRC7.css');
5
5
  require('./shared-NJHRNLRH.css');
6
6
  require('./TablePro-3NGWERWT.css');
@@ -71,7 +71,7 @@ var TableProInner = ({
71
71
  actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "table-toolbar-actions", children: actions })
72
72
  ] }),
73
73
  /* @__PURE__ */ jsxRuntime.jsx(
74
- chunkPPDPKPLE_cjs.Table,
74
+ chunkHXQWVPT3_cjs.Table,
75
75
  {
76
76
  columns,
77
77
  data,
@@ -1,4 +1,4 @@
1
- import { Table } from './chunk-QMZBOB7Q.js';
1
+ import { Table } from './chunk-5JNRCBTF.js';
2
2
  import './tokens-RGFJKRC7.css';
3
3
  import './shared-NJHRNLRH.css';
4
4
  import './TablePro-3NGWERWT.css';
@@ -6,7 +6,7 @@ var chunkYB3IWIOJ_cjs = require('./chunk-YB3IWIOJ.cjs');
6
6
  var chunkGJAEGIPM_cjs = require('./chunk-GJAEGIPM.cjs');
7
7
  require('./tokens-RGFJKRC7.css');
8
8
  require('./shared-NJHRNLRH.css');
9
- require('./Table-5XJNZWLF.css');
9
+ require('./Table-IWHIIGRJ.css');
10
10
  var React = require('react');
11
11
  var reactDom = require('react-dom');
12
12
  var jsxRuntime = require('react/jsx-runtime');
@@ -309,6 +309,8 @@ var TableInner = ({
309
309
  const selProps = rowSelection?.getCheckboxProps?.(row);
310
310
  const canExpand = hasExpandable && (expandable?.rowExpandable?.(row) ?? true);
311
311
  const isExpanded = canExpand && expandedKeys.includes(k);
312
+ const cardSurfaceTarget = showExpandCol ? "__expand" : showSelCol ? "__select" : columns[0]?.key;
313
+ const cardRowSurface = v === "cards" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "card-row-surface", "aria-hidden": "true" }) : null;
312
314
  return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.Fragment, { children: [
313
315
  /* @__PURE__ */ jsxRuntime.jsxs(
314
316
  "tr",
@@ -316,7 +318,7 @@ var TableInner = ({
316
318
  className: `${onRowClick ? "clickable" : ""} ${isSel ? "selected" : ""}`,
317
319
  onClick: onRowClick ? () => onRowClick(row, i) : void 0,
318
320
  children: [
319
- showExpandCol && /* @__PURE__ */ jsxRuntime.jsx(
321
+ showExpandCol && /* @__PURE__ */ jsxRuntime.jsxs(
320
322
  "td",
321
323
  {
322
324
  className: "row-expand",
@@ -324,23 +326,26 @@ var TableInner = ({
324
326
  e.stopPropagation();
325
327
  if (canExpand) toggleExpand(row, k);
326
328
  },
327
- children: canExpand && /* @__PURE__ */ jsxRuntime.jsx(
328
- "button",
329
- {
330
- type: "button",
331
- className: `expand-btn ${isExpanded ? "open" : ""}`,
332
- "aria-expanded": isExpanded,
333
- "aria-label": isExpanded ? "Collapse row" : "Expand row",
334
- onClick: (e) => {
335
- e.stopPropagation();
336
- toggleExpand(row, k);
337
- },
338
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkGJAEGIPM_cjs.Icon, { name: "chevRight", size: 12 })
339
- }
340
- )
329
+ children: [
330
+ cardSurfaceTarget === "__expand" && cardRowSurface,
331
+ canExpand && /* @__PURE__ */ jsxRuntime.jsx(
332
+ "button",
333
+ {
334
+ type: "button",
335
+ className: `expand-btn ${isExpanded ? "open" : ""}`,
336
+ "aria-expanded": isExpanded,
337
+ "aria-label": isExpanded ? "Collapse row" : "Expand row",
338
+ onClick: (e) => {
339
+ e.stopPropagation();
340
+ toggleExpand(row, k);
341
+ },
342
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkGJAEGIPM_cjs.Icon, { name: "chevRight", size: 12 })
343
+ }
344
+ )
345
+ ]
341
346
  }
342
347
  ),
343
- showSelCol && /* @__PURE__ */ jsxRuntime.jsx(
348
+ showSelCol && /* @__PURE__ */ jsxRuntime.jsxs(
344
349
  "td",
345
350
  {
346
351
  className: "row-check",
@@ -348,32 +353,38 @@ var TableInner = ({
348
353
  e.stopPropagation();
349
354
  toggleRow(row, k);
350
355
  },
351
- children: selectionType === "radio" ? /* @__PURE__ */ jsxRuntime.jsx(
352
- "button",
353
- {
354
- type: "button",
355
- role: "radio",
356
- "aria-checked": isSel,
357
- disabled: selProps?.disabled,
358
- className: `radio-dot ${isSel ? "checked" : ""}`,
359
- onClick: (e) => {
360
- e.stopPropagation();
361
- toggleRow(row, k);
356
+ children: [
357
+ cardSurfaceTarget === "__select" && cardRowSurface,
358
+ selectionType === "radio" ? /* @__PURE__ */ jsxRuntime.jsx(
359
+ "button",
360
+ {
361
+ type: "button",
362
+ role: "radio",
363
+ "aria-checked": isSel,
364
+ disabled: selProps?.disabled,
365
+ className: `radio-dot ${isSel ? "checked" : ""}`,
366
+ onClick: (e) => {
367
+ e.stopPropagation();
368
+ toggleRow(row, k);
369
+ }
370
+ }
371
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
372
+ chunk5KGGB3EH_cjs.Checkbox,
373
+ {
374
+ checked: isSel,
375
+ disabled: selProps?.disabled,
376
+ onChange: () => toggleRow(row, k)
362
377
  }
363
- }
364
- ) : /* @__PURE__ */ jsxRuntime.jsx(
365
- chunk5KGGB3EH_cjs.Checkbox,
366
- {
367
- checked: isSel,
368
- disabled: selProps?.disabled,
369
- onChange: () => toggleRow(row, k)
370
- }
371
- )
378
+ )
379
+ ]
372
380
  }
373
381
  ),
374
382
  columns.map((c) => {
375
383
  const val = c.dataIndex ? row[c.dataIndex] : void 0;
376
- return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { textAlign: c.align ?? "left" }, children: c.render ? c.render(val, row, i) : val }, c.key);
384
+ return /* @__PURE__ */ jsxRuntime.jsxs("td", { style: { textAlign: c.align ?? "left" }, children: [
385
+ cardSurfaceTarget === c.key && cardRowSurface,
386
+ c.render ? c.render(val, row, i) : val
387
+ ] }, c.key);
377
388
  })
378
389
  ]
379
390
  }
@@ -3,7 +3,7 @@
3
3
  var chunkMZCKPLHQ_cjs = require('./chunk-MZCKPLHQ.cjs');
4
4
  require('./tokens-RGFJKRC7.css');
5
5
  require('./shared-NJHRNLRH.css');
6
- require('./Card-4DKCXWFU.css');
6
+ require('./Card-W3ATFUJW.css');
7
7
  var React = require('react');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
 
@@ -35,6 +35,7 @@ var Card = React__namespace.forwardRef(
35
35
  title,
36
36
  description,
37
37
  actions,
38
+ background,
38
39
  fill = false,
39
40
  bodyLayout,
40
41
  bodyClassName = "",
@@ -43,6 +44,7 @@ var Card = React__namespace.forwardRef(
43
44
  loading = false,
44
45
  loadingOverlay,
45
46
  className = "",
47
+ style,
46
48
  children,
47
49
  ...rest
48
50
  }, ref) => {
@@ -62,7 +64,11 @@ var Card = React__namespace.forwardRef(
62
64
  loading && "loading",
63
65
  bodyClassName
64
66
  ].filter(Boolean).join(" ");
65
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cls, "aria-busy": loading || void 0, ...rest, children: [
67
+ const cardStyle = background ? {
68
+ "--card-bg": background,
69
+ ...style
70
+ } : style;
71
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cls, style: cardStyle, "aria-busy": loading || void 0, ...rest, children: [
66
72
  (title || description || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "card-head", children: [
67
73
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "card-titles", children: [
68
74
  title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "card-title", children: title }),
@@ -1,7 +1,7 @@
1
1
  import { Spin } from './chunk-3GJZRYTD.js';
2
2
  import './tokens-RGFJKRC7.css';
3
3
  import './shared-NJHRNLRH.css';
4
- import './Card-4DKCXWFU.css';
4
+ import './Card-W3ATFUJW.css';
5
5
  import * as React from 'react';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
@@ -13,6 +13,7 @@ var Card = React.forwardRef(
13
13
  title,
14
14
  description,
15
15
  actions,
16
+ background,
16
17
  fill = false,
17
18
  bodyLayout,
18
19
  bodyClassName = "",
@@ -21,6 +22,7 @@ var Card = React.forwardRef(
21
22
  loading = false,
22
23
  loadingOverlay,
23
24
  className = "",
25
+ style,
24
26
  children,
25
27
  ...rest
26
28
  }, ref) => {
@@ -40,7 +42,11 @@ var Card = React.forwardRef(
40
42
  loading && "loading",
41
43
  bodyClassName
42
44
  ].filter(Boolean).join(" ");
43
- return /* @__PURE__ */ jsxs("div", { ref, className: cls, "aria-busy": loading || void 0, ...rest, children: [
45
+ const cardStyle = background ? {
46
+ "--card-bg": background,
47
+ ...style
48
+ } : style;
49
+ return /* @__PURE__ */ jsxs("div", { ref, className: cls, style: cardStyle, "aria-busy": loading || void 0, ...rest, children: [
44
50
  (title || description || actions) && /* @__PURE__ */ jsxs("div", { className: "card-head", children: [
45
51
  /* @__PURE__ */ jsxs("div", { className: "card-titles", children: [
46
52
  title && /* @__PURE__ */ jsx("div", { className: "card-title", children: title }),
package/dist/index.cjs CHANGED
@@ -12,8 +12,8 @@ var chunk4LOOWTRX_cjs = require('./chunk-4LOOWTRX.cjs');
12
12
  require('./chunk-6EOSMK34.cjs');
13
13
  var chunkDGB6KVU3_cjs = require('./chunk-DGB6KVU3.cjs');
14
14
  var chunkHFM4YKM5_cjs = require('./chunk-HFM4YKM5.cjs');
15
- var chunkJ2KV6K23_cjs = require('./chunk-J2KV6K23.cjs');
16
- var chunkPPDPKPLE_cjs = require('./chunk-PPDPKPLE.cjs');
15
+ var chunk73T32MII_cjs = require('./chunk-73T32MII.cjs');
16
+ var chunkHXQWVPT3_cjs = require('./chunk-HXQWVPT3.cjs');
17
17
  var chunkZ35Q432P_cjs = require('./chunk-Z35Q432P.cjs');
18
18
  var chunkZGDAYWWC_cjs = require('./chunk-ZGDAYWWC.cjs');
19
19
  var chunkXVDD6JEU_cjs = require('./chunk-XVDD6JEU.cjs');
@@ -29,7 +29,7 @@ var chunkN4JH6HHA_cjs = require('./chunk-N4JH6HHA.cjs');
29
29
  var chunk3NSBPQBT_cjs = require('./chunk-3NSBPQBT.cjs');
30
30
  var chunkPEFIXNAV_cjs = require('./chunk-PEFIXNAV.cjs');
31
31
  var chunk4N64ZL5M_cjs = require('./chunk-4N64ZL5M.cjs');
32
- var chunkOUSJMIZX_cjs = require('./chunk-OUSJMIZX.cjs');
32
+ var chunkKZZ5Y56R_cjs = require('./chunk-KZZ5Y56R.cjs');
33
33
  var chunkMZCKPLHQ_cjs = require('./chunk-MZCKPLHQ.cjs');
34
34
  var chunkAA2FRQUQ_cjs = require('./chunk-AA2FRQUQ.cjs');
35
35
  var chunk5KGGB3EH_cjs = require('./chunk-5KGGB3EH.cjs');
@@ -51,7 +51,7 @@ var chunkHTW62OMX_cjs = require('./chunk-HTW62OMX.cjs');
51
51
  var chunkGJAEGIPM_cjs = require('./chunk-GJAEGIPM.cjs');
52
52
 
53
53
  // src/index.ts
54
- var VERSION = "0.6.10";
54
+ var VERSION = "0.6.12";
55
55
 
56
56
  Object.defineProperty(exports, "Tabs", {
57
57
  enumerable: true,
@@ -167,11 +167,11 @@ Object.defineProperty(exports, "Switch", {
167
167
  });
168
168
  Object.defineProperty(exports, "TablePro", {
169
169
  enumerable: true,
170
- get: function () { return chunkJ2KV6K23_cjs.TablePro; }
170
+ get: function () { return chunk73T32MII_cjs.TablePro; }
171
171
  });
172
172
  Object.defineProperty(exports, "Table", {
173
173
  enumerable: true,
174
- get: function () { return chunkPPDPKPLE_cjs.Table; }
174
+ get: function () { return chunkHXQWVPT3_cjs.Table; }
175
175
  });
176
176
  Object.defineProperty(exports, "MessageContainer", {
177
177
  enumerable: true,
@@ -271,7 +271,7 @@ Object.defineProperty(exports, "List", {
271
271
  });
272
272
  Object.defineProperty(exports, "Card", {
273
273
  enumerable: true,
274
- get: function () { return chunkOUSJMIZX_cjs.Card; }
274
+ get: function () { return chunkKZZ5Y56R_cjs.Card; }
275
275
  });
276
276
  Object.defineProperty(exports, "Spin", {
277
277
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -49,6 +49,6 @@ import 'react/jsx-runtime';
49
49
  import 'react';
50
50
 
51
51
  /** Package version — bumped by release scripts. */
52
- declare const VERSION = "0.6.10";
52
+ declare const VERSION = "0.6.12";
53
53
 
54
54
  export { VERSION };
package/dist/index.d.ts CHANGED
@@ -49,6 +49,6 @@ import 'react/jsx-runtime';
49
49
  import 'react';
50
50
 
51
51
  /** Package version — bumped by release scripts. */
52
- declare const VERSION = "0.6.10";
52
+ declare const VERSION = "0.6.12";
53
53
 
54
54
  export { VERSION };
package/dist/index.js CHANGED
@@ -10,8 +10,8 @@ export { SURFACE_THEME_PRESETS, Surface } from './chunk-WIZVOZNO.js';
10
10
  import './chunk-6SPMHY54.js';
11
11
  export { ACCENT_PRESETS, ACCENT_PRESETS_DARK, FONT_STACKS, ThemeProvider, applyTheme, normalizeAccentInput, resolveThemeColorScheme, resolveThemeMode, useTheme, useThemeOptional } from './chunk-7ZCTEIOW.js';
12
12
  export { Switch } from './chunk-6VSNO7IH.js';
13
- export { TablePro } from './chunk-KWIHEE4D.js';
14
- export { Table } from './chunk-QMZBOB7Q.js';
13
+ export { TablePro } from './chunk-CBZJ4UL4.js';
14
+ export { Table } from './chunk-5JNRCBTF.js';
15
15
  export { MessageContainer, ToastContainer, message, toast } from './chunk-62RPBEAW.js';
16
16
  export { Modal } from './chunk-SGNDIRZC.js';
17
17
  export { Pagination } from './chunk-5CWTC3I2.js';
@@ -27,7 +27,7 @@ export { Form, FormItem, useForm } from './chunk-ACZA7HHP.js';
27
27
  export { Image, ImageGrid, LayeredImage, SpriteImage } from './chunk-GEANNF4T.js';
28
28
  export { InputNumber } from './chunk-3VXBSLPT.js';
29
29
  export { List } from './chunk-Q77BWQNG.js';
30
- export { Card } from './chunk-HEBBQZUT.js';
30
+ export { Card } from './chunk-RBDBEXUU.js';
31
31
  export { Spin } from './chunk-3GJZRYTD.js';
32
32
  export { Cascader } from './chunk-FPII6I52.js';
33
33
  export { Checkbox } from './chunk-PHONNUK2.js';
@@ -49,6 +49,6 @@ export { Calendar } from './chunk-W72IIGOV.js';
49
49
  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-SNX4FZYB.js';
50
50
 
51
51
  // src/index.ts
52
- var VERSION = "0.6.10";
52
+ var VERSION = "0.6.12";
53
53
 
54
54
  export { VERSION };
package/dist/styles.css CHANGED
@@ -1136,7 +1136,9 @@ input, textarea, select { font-family: inherit; color: inherit; }
1136
1136
  /* center is default (both flex: 1) */
1137
1137
  /* ============ Card ============ */
1138
1138
  .card {
1139
- background: var(--bg);
1139
+ --card-bg: var(--bg);
1140
+ --card-loading-bg: color-mix(in srgb, var(--bg) 72%, var(--bg-sunken));
1141
+ background: var(--card-bg);
1140
1142
  border-radius: var(--r-lg);
1141
1143
  box-shadow: var(--neu-shadow-panel);
1142
1144
  padding: var(--gap-5);
@@ -1199,7 +1201,7 @@ input, textarea, select { font-family: inherit; color: inherit; }
1199
1201
  border-radius: var(--r-md);
1200
1202
  display: grid;
1201
1203
  place-items: center;
1202
- background: color-mix(in srgb, var(--bg) 72%, var(--bg-sunken));
1204
+ background: var(--card-loading-bg);
1203
1205
  box-shadow:
1204
1206
  inset calc(var(--shadow-inset-offset) * 0.45) calc(var(--shadow-inset-offset) * 0.45) calc(var(--shadow-inset-blur) * 0.45) color-mix(in oklch, var(--shadow-dark) 55%, transparent),
1205
1207
  inset calc(var(--shadow-inset-offset) * -0.45) calc(var(--shadow-inset-offset) * -0.45) calc(var(--shadow-inset-blur) * 0.45) color-mix(in oklch, var(--shadow-light) 72%, transparent);
@@ -2103,11 +2105,10 @@ input, textarea, select { font-family: inherit; color: inherit; }
2103
2105
  isolation: isolate;
2104
2106
  transition: transform var(--dur-fast) var(--ease);
2105
2107
  }
2106
- .table.cards tbody tr::before {
2107
- content: "";
2108
+ .table.cards .card-row-surface {
2108
2109
  position: absolute;
2109
2110
  inset: 0;
2110
- z-index: 0;
2111
+ z-index: -1;
2111
2112
  border-radius: var(--r-md);
2112
2113
  background: var(--bg);
2113
2114
  box-shadow: var(--neu-shadow-control);
@@ -2129,6 +2130,7 @@ input, textarea, select { font-family: inherit; color: inherit; }
2129
2130
  box-shadow: none;
2130
2131
  }
2131
2132
  .table.cards tbody td:first-child {
2133
+ position: static;
2132
2134
  border-radius: var(--r-md) 0 0 var(--r-md);
2133
2135
  }
2134
2136
  .table.cards tbody td:last-child {
@@ -2137,7 +2139,7 @@ input, textarea, select { font-family: inherit; color: inherit; }
2137
2139
  .table.cards.hoverable tbody tr:hover {
2138
2140
  transform: translateY(-1px);
2139
2141
  }
2140
- .table.cards.hoverable tbody tr:hover::before { box-shadow: var(--neu-shadow-panel); }
2142
+ .table.cards.hoverable tbody tr:hover .card-row-surface { box-shadow: var(--neu-shadow-panel); }
2141
2143
  .table.cards.hoverable tbody tr:hover td { background: transparent; }
2142
2144
  .table .row-check { width: 44px; }
2143
2145
  .table .row-check .checkbox { display: inline-flex; }
package/docs/llms/card.md CHANGED
@@ -28,6 +28,26 @@ hoverable 在鼠标悬浮时轻微上移并加强阴影,适合可点击的卡片
28
28
  <Card hoverable>可点击卡片</Card>
29
29
  ```
30
30
 
31
+ ### 自定义背景色
32
+
33
+ background 可覆盖卡片根节点背景,纯色、主题 token、color-mix 与渐变都走同一个字段。
34
+
35
+ ```tsx
36
+ <Card background="color-mix(in oklch, var(--accent-soft) 70%, var(--bg))">
37
+ 主题强调底色
38
+ </Card>
39
+ ```
40
+
41
+ ### 渐变背景
42
+
43
+ background 支持完整 CSS 背景值,适合给看板、概览指标或状态卡片做轻量分层。
44
+
45
+ ```tsx
46
+ <Card background="linear-gradient(135deg, var(--bg-raised), var(--accent-soft))">
47
+ 渐变卡片
48
+ </Card>
49
+ ```
50
+
31
51
  ### 带标题
32
52
 
33
53
  带标题、描述、操作区。
@@ -76,6 +96,7 @@ loading 会在正文区域显示中性 overlay;默认 Spin 跟随主题色,l
76
96
  | Prop | 类型 | 默认 | 说明 |
77
97
  | --- | --- | --- | --- |
78
98
  | variant | `"raised" | "flat" | "sunken"` | `"raised"` | 视觉变体 |
99
+ | background | `CSSProperties["background"]` | — | 自定义卡片根节点背景,支持主题 token / color-mix / linear-gradient / radial-gradient 等 CSS 背景值 |
79
100
  | padding | `"none" | "sm" | "md" | "lg"` | `"md"` | 内边距 |
80
101
  | hoverable | `boolean` | `false` | 悬浮时抬起 |
81
102
  | title | `ReactNode` | — | 标题 |
package/docs/llms.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > 拟态风格的 React 18 组件库,目标是 Electron 桌面应用。**写给 AI 编程助手**的按需文档 —— 每个组件单独一个 `.md`,避免一次性读取全部。示例源自 playground 的 demo,可直接复制运行。
4
4
 
5
5
  - **包名**: `@fangxinyan/lumina`
6
- - **版本**: `0.6.10`
6
+ - **版本**: `0.6.12`
7
7
  - **React 最低版本**: 18
8
8
  - **环境**: 带打包器的 React 工程(Vite / Next.js / Webpack / Remix / Electron + Vite 等)
9
9
  - **零运行时依赖**: 只依赖 `react` / `react-dom` (peer deps)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fangxinyan/lumina",
3
- "version": "0.6.10",
3
+ "version": "0.6.12",
4
4
  "description": "Lumina — Neumorphic component library for Electron & React apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",