@undefine-ui/design-system 1.0.0 → 2.0.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,35 @@ import {
71
72
 
72
73
  Storybook (`pnpm dev:storybook`) documents each component and token surface.
73
74
 
75
+ ### Logo assets
76
+
77
+ `<Logo />` renders logo images hosted on Cloudinary by default. The component automatically selects the appropriate variant based on props:
78
+
79
+ | Variant flag combo | Asset served |
80
+ | -------------------------- | ----------------------------------- |
81
+ | `isFull={false}` (default) | Single logo (60px width) |
82
+ | `isFull` | Full logo with text (120px width) |
83
+ | `isWhite` | White variant for dark backgrounds |
84
+ | `isBlack` | Black variant for light backgrounds |
85
+ | `isWhite` + `isFull` | White full logo |
86
+ | `isBlack` + `isFull` | Black full logo |
87
+
88
+ All logo assets are served from Cloudinary and don't require any local files in your host app.
89
+
90
+ If you need to use custom logo assets, pass `src` to override the default image, and use `href` / `LinkComponent` to control the click behavior:
91
+
92
+ ```tsx
93
+ <Logo
94
+ href="https://undefine.io"
95
+ src="https://cdn.myapp.com/brand/undefine-light.svg"
96
+ sx={{ width: 140 }}
97
+ disableLink={false}
98
+ alt="Custom logo"
99
+ />
100
+ ```
101
+
102
+ Use `disableLink={true}` to render just the image without any link wrapper. All other props from `BoxProps` are forwarded to the underlying `<img>`.
103
+
74
104
  ## Export surface
75
105
 
76
106
  Everything is re-exported from `src/index.ts`. Key groups:
package/dist/index.cjs CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  CheckboxDefault: () => CheckboxDefault,
34
34
  CheckboxIndeterminate: () => CheckboxIndeterminate,
35
35
  CheckboxSelect: () => CheckboxSelect,
@@ -155,7 +155,7 @@ __export(src_exports, {
155
155
  varAlpha: () => varAlpha,
156
156
  warning: () => warning
157
157
  });
158
- module.exports = __toCommonJS(src_exports);
158
+ module.exports = __toCommonJS(index_exports);
159
159
 
160
160
  // src/libs/helpers.ts
161
161
  var isEqual = (a, b) => {
@@ -5586,14 +5586,14 @@ var import_Box2 = __toESM(require("@mui/material/Box"), 1);
5586
5586
  var import_jsx_runtime37 = require("react/jsx-runtime");
5587
5587
  var LOGO_MAP = {
5588
5588
  full: {
5589
- black: "/logos/logo-full-black.png",
5590
- white: "/logos/logo-full-white.png",
5591
- default: "/logos/logo-full.png"
5589
+ black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black-full_mjngwu.png",
5590
+ white: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077836/define-agency/logos/logo-white-full_nsf6ge.png",
5591
+ default: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077836/define-agency/logos/logo-full_xzon1i.png"
5592
5592
  },
5593
5593
  single: {
5594
- black: "/logos/logo-black.png",
5595
- white: "/logos/logo-white.png",
5596
- default: "/logos/logo.png"
5594
+ black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black_xskhha.png",
5595
+ white: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-white_tssio4.png",
5596
+ default: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077835/define-agency/logos/logo_ypolky.png"
5597
5597
  }
5598
5598
  };
5599
5599
  var Logo = ({
@@ -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
  }