@iris-ui-kit/react 0.3.0 → 0.3.2

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 (42) hide show
  1. package/dist/admin.cjs +11 -7
  2. package/dist/admin.cjs.map +1 -1
  3. package/dist/admin.js +1 -1
  4. package/dist/async.cjs +16 -7
  5. package/dist/async.cjs.map +1 -1
  6. package/dist/async.d.cts +7 -6
  7. package/dist/async.d.ts +7 -6
  8. package/dist/async.js +1 -1
  9. package/dist/{chunk-KRFZ5KL4.js → chunk-2Z45RXJA.js} +13 -9
  10. package/dist/chunk-2Z45RXJA.js.map +1 -0
  11. package/dist/{chunk-TO7YVSAI.js → chunk-3KYNBLRY.js} +18 -9
  12. package/dist/chunk-3KYNBLRY.js.map +1 -0
  13. package/dist/{chunk-QKDOW7FG.js → chunk-EB5VUIPA.js} +20 -15
  14. package/dist/chunk-EB5VUIPA.js.map +1 -0
  15. package/dist/chunk-JANOOAZ5.js +942 -0
  16. package/dist/chunk-JANOOAZ5.js.map +1 -0
  17. package/dist/{chunk-QZJXMCRR.js → chunk-VLWZSOTH.js} +2 -2
  18. package/dist/chunk-VLWZSOTH.js.map +1 -0
  19. package/dist/data.cjs.map +1 -1
  20. package/dist/data.d.cts +2 -2
  21. package/dist/data.d.ts +2 -2
  22. package/dist/data.js +1 -1
  23. package/dist/grid.cjs +1007 -0
  24. package/dist/grid.cjs.map +1 -0
  25. package/dist/grid.d.cts +324 -0
  26. package/dist/grid.d.ts +324 -0
  27. package/dist/grid.js +5 -0
  28. package/dist/grid.js.map +1 -0
  29. package/dist/index.cjs +7159 -4602
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +294 -9
  32. package/dist/index.d.ts +294 -9
  33. package/dist/index.js +4735 -3148
  34. package/dist/index.js.map +1 -1
  35. package/dist/skeletons.cjs +18 -13
  36. package/dist/skeletons.cjs.map +1 -1
  37. package/dist/skeletons.js +1 -1
  38. package/package.json +19 -14
  39. package/dist/chunk-KRFZ5KL4.js.map +0 -1
  40. package/dist/chunk-QKDOW7FG.js.map +0 -1
  41. package/dist/chunk-QZJXMCRR.js.map +0 -1
  42. package/dist/chunk-TO7YVSAI.js.map +0 -1
package/dist/admin.cjs CHANGED
@@ -312,8 +312,11 @@ function IrisNavMenu({
312
312
  boxSizing: "border-box",
313
313
  border: "none",
314
314
  borderRadius: "var(--iris-radius-md, 6px)",
315
- background: opts.active ? opts.hovered && !opts.disabled ? "var(--iris-nav-item-active-hover, color-mix(in srgb, var(--iris-primary) 88%, black))" : "var(--iris-primary)" : opts.hovered && !opts.disabled ? "var(--iris-surface-hover, var(--iris-surface))" : "transparent",
316
- color: opts.active ? "var(--iris-primary-foreground, #fff)" : opts.trail ? "var(--iris-primary)" : "var(--iris-foreground)",
315
+ background: opts.hovered && !opts.disabled ? horizontal && opts.depth === 0 ? "var(--iris-surface-hover, var(--iris-surface))" : opts.active ? "var(--iris-nav-item-active-hover, color-mix(in srgb, var(--iris-primary) 88%, black))" : "var(--iris-surface-hover, var(--iris-surface))" : opts.active && !(horizontal && opts.depth === 0) ? "var(--iris-primary)" : "transparent",
316
+ // antd 风格:水平模式选中 = 底部下划线(boxShadow 模拟)+ 文字色,
317
+ // 背景透明(hover 时浅背景,与 vertical 整块 primary 区分)
318
+ boxShadow: horizontal && opts.depth === 0 && opts.active ? "inset 0 -2px 0 0 var(--iris-primary)" : void 0,
319
+ color: opts.active ? horizontal && opts.depth === 0 ? "var(--iris-primary)" : "var(--iris-primary-foreground, #fff)" : opts.trail ? "var(--iris-primary)" : "var(--iris-foreground)",
317
320
  font: "inherit",
318
321
  fontSize: "var(--iris-font-size-md, 14px)",
319
322
  fontWeight: opts.active || opts.trail ? 600 : 400,
@@ -358,7 +361,7 @@ function IrisNavMenu({
358
361
  "data-branch": branch ? "true" : void 0,
359
362
  disabled: node.disabled,
360
363
  title: node.title,
361
- "aria-label": branch ? `${node.title} (section)` : node.title,
364
+ "aria-label": branch ? t("admin.section", { title: node.title }) : node.title,
362
365
  "aria-current": active && !branch ? "page" : void 0,
363
366
  style: itemStyle({
364
367
  depth: 0,
@@ -1366,7 +1369,7 @@ function IrisAdminTabs({
1366
1369
  width: 16,
1367
1370
  height: 16,
1368
1371
  border: "none",
1369
- borderRadius: 4,
1372
+ borderRadius: "var(--iris-radius-sm, 4px)",
1370
1373
  background: "transparent",
1371
1374
  color: "inherit",
1372
1375
  cursor: "pointer",
@@ -1469,7 +1472,7 @@ function IrisAdminTabs({
1469
1472
  /* @__PURE__ */ jsxRuntime.jsx(IrisDropdownItem, { onSelect: () => nav.closeRight(activeKey), children: translate("admin.closeRight") }),
1470
1473
  /* @__PURE__ */ jsxRuntime.jsx(IrisDropdownItem, { onSelect: () => nav.closeOthers(activeKey), children: translate("admin.closeOthers") }),
1471
1474
  /* @__PURE__ */ jsxRuntime.jsx(IrisDropdownItem, { onSelect: () => nav.closeAll(), children: translate("admin.closeAll") })
1472
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(IrisDropdownItem, { disabled: true, children: "No active tab" }) })
1475
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(IrisDropdownItem, { disabled: true, children: translate("admin.noActiveTab") }) })
1473
1476
  ] })
1474
1477
  ]
1475
1478
  }
@@ -1530,7 +1533,7 @@ function IrisAdminLayout({
1530
1533
  defaultCollapsed = false,
1531
1534
  onCollapsedChange,
1532
1535
  mode = "sidebar",
1533
- appTitle = "Iris Admin",
1536
+ appTitle,
1534
1537
  tabs,
1535
1538
  showTabs = true,
1536
1539
  showBreadcrumb = true,
@@ -1548,6 +1551,7 @@ function IrisAdminLayout({
1548
1551
  children
1549
1552
  }) {
1550
1553
  const { t } = useI18n();
1554
+ const resolvedAppTitle = appTitle ?? t("admin.title");
1551
1555
  const {
1552
1556
  activeKey: currentActive,
1553
1557
  navigate,
@@ -1604,7 +1608,7 @@ function IrisAdminLayout({
1604
1608
  children: /* @__PURE__ */ jsxRuntime.jsx(IrisIcon, { name: "menu", size: 18 })
1605
1609
  }
1606
1610
  ),
1607
- state.collapsed ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { children: appTitle })
1611
+ state.collapsed ? null : /* @__PURE__ */ jsxRuntime.jsx("span", { children: resolvedAppTitle })
1608
1612
  ]
1609
1613
  }
1610
1614
  );