@uni-design-system/uni-core 2.0.3 → 2.0.4
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 +32 -0
- package/dist/cjs/index.cjs +870 -494
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +867 -494
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/animation/index.d.ts +2 -0
- package/dist/types/concepts/animation/index.d.ts.map +1 -0
- package/dist/types/concepts/animation/keyframes.constants.d.ts +26 -0
- package/dist/types/concepts/animation/keyframes.constants.d.ts.map +1 -0
- package/dist/types/concepts/component/component.types.d.ts +1 -2
- package/dist/types/concepts/component/component.types.d.ts.map +1 -1
- package/dist/types/concepts/index.d.ts +7 -4
- package/dist/types/concepts/index.d.ts.map +1 -1
- package/dist/types/concepts/layout/layout.model.d.ts +1 -1
- package/dist/types/concepts/layout/layout.model.d.ts.map +1 -1
- package/dist/types/concepts/layout/layout.types.d.ts +3 -0
- package/dist/types/concepts/layout/layout.types.d.ts.map +1 -1
- package/dist/types/concepts/style/index.d.ts +2 -0
- package/dist/types/concepts/style/index.d.ts.map +1 -0
- package/dist/types/concepts/style/style.types.d.ts +3 -0
- package/dist/types/concepts/style/style.types.d.ts.map +1 -0
- package/dist/types/concepts/theme/palettes/theme.palette.d.ts +23 -0
- package/dist/types/concepts/theme/palettes/theme.palette.d.ts.map +1 -0
- package/dist/types/concepts/theme/themes/base.theme.d.ts +0 -16
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @uni-design-system/uni-core
|
|
2
|
+
|
|
3
|
+
The single source of truth for the **Uni Design System**. This package contains foundational design tokens, branding themes, layout dimensions, and global styling variables.
|
|
4
|
+
|
|
5
|
+
It is structured as a pure, dependency-free library designed to be consumed by any framework implementation.
|
|
6
|
+
|
|
7
|
+
## 📦 Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Using npm
|
|
11
|
+
npm install @uni-design-system/uni-core
|
|
12
|
+
|
|
13
|
+
# Using pnpm
|
|
14
|
+
pnpm add @uni-design-system/uni-core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 🚚 Distribution Formats
|
|
18
|
+
|
|
19
|
+
This package is compiled using **Vite** as a dual-package distribution to ensure broad ecosystem compatibility with no strict ESM extension path errors:
|
|
20
|
+
- **ESM (`dist/esm/index.js`)**: For modern, tree-shakable environments.
|
|
21
|
+
- **CommonJS (`dist/cjs/index.cjs`)**: Explicit fallback extensions for legacy bundlers (like Webpack 5).
|
|
22
|
+
- **Types (`dist/types/`)**: Pre-isolated TypeScript definitions.
|
|
23
|
+
|
|
24
|
+
## 🧩 Usage Example
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { Theme, ColorToken, Size } from '@uni-design-system/uni-core';
|
|
28
|
+
|
|
29
|
+
// Accessing standard token primitives
|
|
30
|
+
const brandColor = ColorToken.BrandPrimary;
|
|
31
|
+
const paddingSize = Size.Medium;
|
|
32
|
+
```
|