@viglet/viglet-design-system 2026.2.9 → 2026.2.10
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 +12 -12
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/viglet-design-system.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Shared component library, design tokens, hooks, utilities, and i18n for Viglet p
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @viglet/viglet-design-system
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Setup
|
|
@@ -15,19 +15,19 @@ npm install @openviglet/viglet-design-system
|
|
|
15
15
|
In your app's entry CSS (e.g., `index.css`):
|
|
16
16
|
|
|
17
17
|
```css
|
|
18
|
-
@import "@
|
|
18
|
+
@import "@viglet/viglet-design-system/styles";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Or in your entry TypeScript/JavaScript:
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import "@
|
|
24
|
+
import "@viglet/viglet-design-system/styles";
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
### 2. Initialize i18n
|
|
28
28
|
|
|
29
29
|
```ts
|
|
30
|
-
import { initVigI18n } from "@
|
|
30
|
+
import { initVigI18n } from "@viglet/viglet-design-system/i18n";
|
|
31
31
|
|
|
32
32
|
// With app-specific translations merged in
|
|
33
33
|
initVigI18n({
|
|
@@ -39,7 +39,7 @@ initVigI18n({
|
|
|
39
39
|
Or register into an existing i18n instance:
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
|
-
import { registerVigTranslations } from "@
|
|
42
|
+
import { registerVigTranslations } from "@viglet/viglet-design-system/i18n";
|
|
43
43
|
import i18n from "i18next";
|
|
44
44
|
|
|
45
45
|
registerVigTranslations(i18n);
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
BreadcrumbProvider,
|
|
54
54
|
UserProvider,
|
|
55
55
|
Toaster,
|
|
56
|
-
} from "@
|
|
56
|
+
} from "@viglet/viglet-design-system";
|
|
57
57
|
|
|
58
58
|
function App() {
|
|
59
59
|
return (
|
|
@@ -72,7 +72,7 @@ function App() {
|
|
|
72
72
|
### 4. Setup Axios CSRF protection
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
|
-
import { setupAxiosInterceptors } from "@
|
|
75
|
+
import { setupAxiosInterceptors } from "@viglet/viglet-design-system";
|
|
76
76
|
|
|
77
77
|
setupAxiosInterceptors({
|
|
78
78
|
baseURL: "/api",
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
TabsList,
|
|
101
101
|
TabsTrigger,
|
|
102
102
|
TabsContent,
|
|
103
|
-
} from "@
|
|
103
|
+
} from "@viglet/viglet-design-system";
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
### App Components
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
AppFooter,
|
|
118
118
|
LanguageSelect,
|
|
119
119
|
ModeToggle,
|
|
120
|
-
} from "@
|
|
120
|
+
} from "@viglet/viglet-design-system";
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
### Hooks
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
useTheme,
|
|
132
132
|
useBreadcrumb,
|
|
133
133
|
useCurrentUser,
|
|
134
|
-
} from "@
|
|
134
|
+
} from "@viglet/viglet-design-system";
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
### Utilities
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
getHashedColor,
|
|
144
144
|
getFlagEmoji,
|
|
145
145
|
exportToXlsx,
|
|
146
|
-
} from "@
|
|
146
|
+
} from "@viglet/viglet-design-system";
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
### Models
|
|
@@ -153,7 +153,7 @@ import type {
|
|
|
153
153
|
VigUser,
|
|
154
154
|
VigLocale,
|
|
155
155
|
VigGridItem,
|
|
156
|
-
} from "@
|
|
156
|
+
} from "@viglet/viglet-design-system";
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
## What's Included
|