@undefine-ui/design-system 1.1.0 → 2.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
@@ -10,6 +10,8 @@ pnpm add @undefine-ui/design-system
10
10
  pnpm add @mui/material @mui/x-data-grid @emotion/react @emotion/styled react react-dom react-hook-form
11
11
  ```
12
12
 
13
+ **Note**: Fonts (Work Sans and Geist) are bundled with the package and automatically loaded by the `ThemeProvider`. You don't need to install or import `@fontsource` packages separately.
14
+
13
15
  ## Usage
14
16
 
15
17
  ### Providers
@@ -29,7 +31,7 @@ export function DesignSystemApp({ children }: { children: React.ReactNode }) {
29
31
  ```
30
32
 
31
33
  - `SettingsProvider` exposes the design-system preferences (mode, contrast, fonts, nav layout) through the `useSettings` hook. Provide your own `settings` object if you want different defaults or if you persist user choices.
32
- - `ThemeProvider` wraps MUIs CssVarsProvider with the Define theme (`createTheme`). It accepts any React children and automatically injects `CssBaseline`.
34
+ - `ThemeProvider` wraps MUI's CssVarsProvider with the Define theme (`createTheme`). It accepts any React children and automatically injects `CssBaseline` and loads the required fonts (Work Sans and Geist).
33
35
  - Both providers are exported from the package root so you can colocate them with your router/root layout.
34
36
 
35
37
  ### Theming hooks
@@ -72,30 +74,34 @@ import {
72
74
 
73
75
  Storybook (`pnpm dev:storybook`) documents each component and token surface.
74
76
 
75
- ### Logo asset paths
77
+ ### Logo assets
78
+
79
+ `<Logo />` renders logo images hosted on Cloudinary by default. The component automatically selects the appropriate variant based on props:
76
80
 
77
- `<Logo />` renders image files that your host app must expose under `/logos/*`. The defaults map as follows:
81
+ | Variant flag combo | Asset served |
82
+ | -------------------------- | ----------------------------------- |
83
+ | `isFull={false}` (default) | Single logo (60px width) |
84
+ | `isFull` | Full logo with text (120px width) |
85
+ | `isWhite` | White variant for dark backgrounds |
86
+ | `isBlack` | Black variant for light backgrounds |
87
+ | `isWhite` + `isFull` | White full logo |
88
+ | `isBlack` + `isFull` | Black full logo |
78
89
 
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` |
90
+ All logo assets are served from Cloudinary and don't require any local files in your host app.
87
91
 
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:
92
+ If you need to use custom logo assets, pass `src` to override the default image, and use `href` / `LinkComponent` to control the click behavior:
89
93
 
90
94
  ```tsx
91
95
  <Logo
92
96
  href="https://undefine.io"
93
97
  src="https://cdn.myapp.com/brand/undefine-light.svg"
94
98
  sx={{ width: 140 }}
99
+ disableLink={false}
100
+ alt="Custom logo"
95
101
  />
96
102
  ```
97
103
 
98
- All other props from `BoxProps` are forwarded to the underlying `<img>`.
104
+ Use `disableLink={true}` to render just the image without any link wrapper. All other props from `BoxProps` are forwarded to the underlying `<img>`.
99
105
 
100
106
  ## Export surface
101
107
 
Binary file
Binary file
Binary file
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) => {
@@ -5562,6 +5562,17 @@ var getInitColorSchemeScript = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5562
5562
  // src/theme/ThemeProvider.tsx
5563
5563
  var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"), 1);
5564
5564
  var import_styles31 = require("@mui/material/styles");
5565
+ var import__ = require("@fontsource/work-sans/300.css");
5566
+ var import__2 = require("@fontsource/work-sans/400.css");
5567
+ var import__3 = require("@fontsource/work-sans/500.css");
5568
+ var import__4 = require("@fontsource/work-sans/600.css");
5569
+ var import__5 = require("@fontsource/work-sans/700.css");
5570
+ var import__6 = require("@fontsource/geist/300.css");
5571
+ var import__7 = require("@fontsource/geist/400.css");
5572
+ var import__8 = require("@fontsource/geist/500.css");
5573
+ var import__9 = require("@fontsource/geist/600.css");
5574
+ var import__10 = require("@fontsource/geist/700.css");
5575
+ var import_satoshi = require("./satoshi-4X3TX4PE.css");
5565
5576
  var import_jsx_runtime36 = require("react/jsx-runtime");
5566
5577
  var ThemeProvider = ({ children }) => {
5567
5578
  const settings = useSettings();
@@ -5586,14 +5597,14 @@ var import_Box2 = __toESM(require("@mui/material/Box"), 1);
5586
5597
  var import_jsx_runtime37 = require("react/jsx-runtime");
5587
5598
  var LOGO_MAP = {
5588
5599
  full: {
5589
- black: "/logos/logo-full-black.png",
5590
- white: "/logos/logo-full-white.png",
5591
- default: "/logos/logo-full.png"
5600
+ black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black-full_mjngwu.png",
5601
+ white: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077836/define-agency/logos/logo-white-full_nsf6ge.png",
5602
+ default: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077836/define-agency/logos/logo-full_xzon1i.png"
5592
5603
  },
5593
5604
  single: {
5594
- black: "/logos/logo-black.png",
5595
- white: "/logos/logo-white.png",
5596
- default: "/logos/logo.png"
5605
+ black: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-black_xskhha.png",
5606
+ white: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077834/define-agency/logos/logo-white_tssio4.png",
5607
+ default: "https://res.cloudinary.com/dvbtbsinu/image/upload/v1763077835/define-agency/logos/logo_ypolky.png"
5597
5608
  }
5598
5609
  };
5599
5610
  var Logo = ({