@undefine-ui/design-system 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -63,6 +63,7 @@ import {
63
63
  Field,
64
64
  Form,
65
65
  Icon,
66
+ Logo,
66
67
  LoadingScreen,
67
68
  Table,
68
69
  Upload
@@ -71,6 +72,31 @@ import {
71
72
 
72
73
  Storybook (`pnpm dev:storybook`) documents each component and token surface.
73
74
 
75
+ ### Logo asset paths
76
+
77
+ `<Logo />` renders image files that your host app must expose under `/logos/*`. The defaults map as follows:
78
+
79
+ | Variant flag combo | Expected path |
80
+ | -------------------------- | ---------------------------- |
81
+ | `isFull={false}` (default) | `/logos/logo.png` |
82
+ | `isFull` | `/logos/logo-full.png` |
83
+ | `isWhite` | `/logos/logo-white.png` |
84
+ | `isWhite` + `isFull` | `/logos/logo-full-white.png` |
85
+ | `isBlack` | `/logos/logo-black.png` |
86
+ | `isBlack` + `isFull` | `/logos/logo-full-black.png` |
87
+
88
+ If your asset pipeline lives elsewhere, pass `src` to override the image while keeping the same sizing, and use `href` / `LinkComponent` to control the click target:
89
+
90
+ ```tsx
91
+ <Logo
92
+ href="https://undefine.io"
93
+ src="https://cdn.myapp.com/brand/undefine-light.svg"
94
+ sx={{ width: 140 }}
95
+ />
96
+ ```
97
+
98
+ All other props from `BoxProps` are forwarded to the underlying `<img>`.
99
+
74
100
  ## Export surface
75
101
 
76
102
  Everything is re-exported from `src/index.ts`. Key groups:
package/dist/index.cjs CHANGED
@@ -5604,16 +5604,19 @@ var Logo = ({
5604
5604
  disableLink = false,
5605
5605
  LinkComponent = "a",
5606
5606
  href = "/",
5607
+ src,
5608
+ alt = "Undefine UI logo",
5607
5609
  ...rest
5608
5610
  }) => {
5609
5611
  const type = isFull ? "full" : "single";
5610
5612
  const color = isWhite ? "white" : isBlack ? "black" : "default";
5611
- const logoImg = LOGO_MAP[type][color];
5613
+ const logoImg = src ?? LOGO_MAP[type][color];
5612
5614
  const logo = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5613
5615
  import_Box2.default,
5614
5616
  {
5615
5617
  component: "img",
5616
5618
  src: logoImg,
5619
+ alt,
5617
5620
  sx: { width: isFull ? 120 : 60, cursor: "pointer", ...sx },
5618
5621
  ...rest
5619
5622
  }