@bizapps/design-system-testing 0.4.3 → 1.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 +38 -43
- package/dist/inter-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/inter-cyrillic-wght-normal.woff2 +0 -0
- package/dist/inter-greek-ext-wght-normal.woff2 +0 -0
- package/dist/inter-greek-wght-normal.woff2 +0 -0
- package/dist/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/inter-latin-wght-normal.woff2 +0 -0
- package/dist/inter-vietnamese-wght-normal.woff2 +0 -0
- package/dist/main.cjs +7627 -11
- package/dist/main.cjs.map +1 -1
- package/dist/main.css +1 -1
- package/dist/main.d.cts +1930 -5
- package/dist/main.d.ts +1930 -5
- package/dist/main.js +7351 -13
- package/dist/main.js.map +1 -1
- package/package.json +61 -26
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total.ai +13 -2789
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total.pdf +13 -2947
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_AW.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CB.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CBT.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_CC.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_M.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction/Entrega_Logo_Total_NT.png +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_AW.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CB.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CBT.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_CC.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_M.webp +0 -0
- package/dist/assets/brand/Logo_Total_Civil_Construction_Optimize/Entrega_Logo_Total_NT.webp +0 -0
- package/dist/assets/brand/favicon.svg +0 -7
- package/dist/assets/fonts/Dax-Bold/Dax-Bold.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBlack.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBlackItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBold.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueBoldItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueHeavy.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueHeavyItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueItalic.ttf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueLight.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueLightItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueMedium.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueMediumItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueRoman.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueThin.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueThinItalic.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueUltraLight.otf +0 -0
- package/dist/assets/fonts/Helvetica-Neue/HelveticaNeueUltraLightItalic.otf +0 -0
- package/dist/assets/fonts/dax-regular/dax-regular.ttf +0 -0
package/README.md
CHANGED
|
@@ -22,12 +22,12 @@ A React component library built for TCCE CRM applications. Provides reusable, co
|
|
|
22
22
|
|
|
23
23
|
Your project must have the following installed before using this library:
|
|
24
24
|
|
|
25
|
-
| Package
|
|
26
|
-
|
|
27
|
-
| `react`
|
|
28
|
-
| `react-dom`
|
|
29
|
-
| `tailwindcss`
|
|
30
|
-
| `@tailwindcss/vite` | ^4
|
|
25
|
+
| Package | Version |
|
|
26
|
+
| ------------------- | ------- |
|
|
27
|
+
| `react` | ^19 |
|
|
28
|
+
| `react-dom` | ^19 |
|
|
29
|
+
| `tailwindcss` | ^4 |
|
|
30
|
+
| `@tailwindcss/vite` | ^4 |
|
|
31
31
|
|
|
32
32
|
> **Note:** `shadcn`, `tw-animate-css`, and font packages are already bundled inside the library's CSS. You do **not** need to install them separately.
|
|
33
33
|
|
|
@@ -48,16 +48,13 @@ pnpm add @bizapps/design-system-testing
|
|
|
48
48
|
Add the Tailwind CSS plugin to your `vite.config.ts`:
|
|
49
49
|
|
|
50
50
|
```ts
|
|
51
|
-
import { defineConfig } from 'vite'
|
|
52
|
-
import react from '@vitejs/plugin-react'
|
|
53
|
-
import tailwindcss from '@tailwindcss/vite'
|
|
51
|
+
import { defineConfig } from 'vite';
|
|
52
|
+
import react from '@vitejs/plugin-react';
|
|
53
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
54
54
|
|
|
55
55
|
export default defineConfig({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
tailwindcss(),
|
|
59
|
-
],
|
|
60
|
-
})
|
|
56
|
+
plugins: [react(), tailwindcss()],
|
|
57
|
+
});
|
|
61
58
|
```
|
|
62
59
|
|
|
63
60
|
### 2. Import the styles
|
|
@@ -65,8 +62,8 @@ export default defineConfig({
|
|
|
65
62
|
In your main CSS file (e.g. `src/index.css`), add these two lines **in this order**:
|
|
66
63
|
|
|
67
64
|
```css
|
|
68
|
-
@import
|
|
69
|
-
@import
|
|
65
|
+
@import 'tailwindcss';
|
|
66
|
+
@import '@bizapps/design-system-testing/styles';
|
|
70
67
|
```
|
|
71
68
|
|
|
72
69
|
> **Important:** `tailwindcss` must come **before** the library styles so that Tailwind's base layer is available when the library's theme tokens are applied.
|
|
@@ -76,7 +73,7 @@ In your main CSS file (e.g. `src/index.css`), add these two lines **in this orde
|
|
|
76
73
|
Make sure your `src/main.tsx` imports the CSS file:
|
|
77
74
|
|
|
78
75
|
```tsx
|
|
79
|
-
import './index.css'
|
|
76
|
+
import './index.css';
|
|
80
77
|
```
|
|
81
78
|
|
|
82
79
|
That's it. No further configuration is needed.
|
|
@@ -88,14 +85,14 @@ That's it. No further configuration is needed.
|
|
|
88
85
|
Import components directly from the package:
|
|
89
86
|
|
|
90
87
|
```tsx
|
|
91
|
-
import { Button } from '@bizapps/design-system-testing'
|
|
88
|
+
import { Button } from '@bizapps/design-system-testing';
|
|
92
89
|
|
|
93
90
|
function App() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
return (
|
|
92
|
+
<Button variant='primary' size='md'>
|
|
93
|
+
Click me
|
|
94
|
+
</Button>
|
|
95
|
+
);
|
|
99
96
|
}
|
|
100
97
|
```
|
|
101
98
|
|
|
@@ -106,18 +103,18 @@ function App() {
|
|
|
106
103
|
### Button
|
|
107
104
|
|
|
108
105
|
```tsx
|
|
109
|
-
import { Button } from '@bizapps/design-system-testing'
|
|
106
|
+
import { Button } from '@bizapps/design-system-testing';
|
|
110
107
|
```
|
|
111
108
|
|
|
112
109
|
#### Props
|
|
113
110
|
|
|
114
|
-
| Prop
|
|
115
|
-
|
|
116
|
-
| `variant`
|
|
117
|
-
| `size`
|
|
118
|
-
| `isLoading` | `boolean`
|
|
119
|
-
| `disabled`
|
|
120
|
-
| `asChild`
|
|
111
|
+
| Prop | Type | Default | Description |
|
|
112
|
+
| ----------- | -------------------------------------------------------------- | ----------- | ----------------------------------------- |
|
|
113
|
+
| `variant` | `'primary' \| 'secondary' \| 'cancel' \| 'outline' \| 'ghost'` | `'primary'` | Visual style of the button |
|
|
114
|
+
| `size` | `'sm' \| 'md' \| 'lg' \| 'icon-sm'` | `'md'` | Size of the button |
|
|
115
|
+
| `isLoading` | `boolean` | `false` | Shows a loading state |
|
|
116
|
+
| `disabled` | `boolean` | `false` | Disables the button |
|
|
117
|
+
| `asChild` | `boolean` | `false` | Renders as child element (via Radix Slot) |
|
|
121
118
|
|
|
122
119
|
#### Examples
|
|
123
120
|
|
|
@@ -202,13 +199,13 @@ The library includes the following fonts, loaded automatically:
|
|
|
202
199
|
|
|
203
200
|
```css
|
|
204
201
|
.my-card {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
202
|
+
background: var(--color-main-white);
|
|
203
|
+
border-radius: var(--border-radius-card);
|
|
204
|
+
box-shadow: var(--shadow-black-card);
|
|
208
205
|
}
|
|
209
206
|
|
|
210
207
|
.my-card:hover {
|
|
211
|
-
|
|
208
|
+
box-shadow: var(--shadow-hover-black-card);
|
|
212
209
|
}
|
|
213
210
|
```
|
|
214
211
|
|
|
@@ -217,9 +214,7 @@ The library includes the following fonts, loaded automatically:
|
|
|
217
214
|
The tokens are also registered as Tailwind theme values, so you can use them as utility classes:
|
|
218
215
|
|
|
219
216
|
```tsx
|
|
220
|
-
<div className=
|
|
221
|
-
Hello
|
|
222
|
-
</div>
|
|
217
|
+
<div className='bg-main-blue-primary text-main-white rounded-card shadow-black-card'>Hello</div>
|
|
223
218
|
```
|
|
224
219
|
|
|
225
220
|
---
|
|
@@ -273,9 +268,9 @@ git commit -m "feat: description of changes"
|
|
|
273
268
|
```
|
|
274
269
|
|
|
275
270
|
2. Update the version in `package.json` following [semver](https://semver.org/):
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
- `patch` (0.4.x) → bug fixes
|
|
272
|
+
- `minor` (0.x.0) → new components or features
|
|
273
|
+
- `major` (x.0.0) → breaking changes
|
|
279
274
|
|
|
280
275
|
3. Build the library:
|
|
281
276
|
|
|
@@ -300,8 +295,8 @@ npm publish --access public
|
|
|
300
295
|
Make sure the import order in your CSS file is correct — `tailwindcss` must come first:
|
|
301
296
|
|
|
302
297
|
```css
|
|
303
|
-
@import
|
|
304
|
-
@import
|
|
298
|
+
@import 'tailwindcss'; /* ✅ first */
|
|
299
|
+
@import '@bizapps/design-system-testing/styles'; /* ✅ second */
|
|
305
300
|
```
|
|
306
301
|
|
|
307
302
|
### `Cannot resolve './tokens.css'` or similar errors
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|