mgv-backoffice 1.0.4 → 1.0.7
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 +111 -0
- package/dist/components/BaseBreadcrumb.vue.d.ts +31 -0
- package/dist/index.d.ts +2 -0
- package/dist/ui-lib.mjs +345 -276
- package/dist/ui-lib.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/BaseBadge.vue +18 -6
- package/src/components/BaseBreadcrumb.vue +67 -0
- package/src/components/BaseRow.vue +1 -1
- package/src/index.ts +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
npm login
|
|
2
|
+
|
|
3
|
+
# mgv-backoffice
|
|
4
|
+
|
|
5
|
+
Shared Vue 3 UI component library.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js 18+
|
|
10
|
+
- npm
|
|
11
|
+
|
|
12
|
+
## Setup
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Development
|
|
19
|
+
|
|
20
|
+
Watch mode rebuilds on every file change:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm run dev
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Publishing a new version
|
|
27
|
+
|
|
28
|
+
### 1. Build the library
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm run build
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This outputs the bundled files to `dist/` (UMD, ESM, type declarations, and CSS).
|
|
35
|
+
|
|
36
|
+
### 2. Bump the version
|
|
37
|
+
|
|
38
|
+
Use one of the following depending on the type of change:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Patch (bug fixes, small tweaks): 1.0.4 → 1.0.5
|
|
42
|
+
npm version patch
|
|
43
|
+
|
|
44
|
+
# Minor (new components, non-breaking features): 1.0.4 → 1.1.0
|
|
45
|
+
npm version minor
|
|
46
|
+
|
|
47
|
+
# Major (breaking changes): 1.0.4 → 2.0.0
|
|
48
|
+
npm version major
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This updates `package.json` and creates a git tag automatically.
|
|
52
|
+
|
|
53
|
+
### 3. Publish to npm
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm publish
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If publishing to a private registry or GitHub Packages, make sure your `.npmrc` is configured with the correct registry URL and auth token.
|
|
60
|
+
|
|
61
|
+
### 4. Verify
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm info mgv-backoffice version
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Quick one-liner
|
|
68
|
+
|
|
69
|
+
Build, bump patch, and publish in one go:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run build && npm version patch && npm publish
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Usage in consuming projects
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install mgv-backoffice
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { BaseButton, BaseBadge, BaseBreadcrumb } from 'mgv-backoffice'
|
|
83
|
+
import 'mgv-backoffice/dist/style.css'
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Components
|
|
87
|
+
|
|
88
|
+
| Component | Description |
|
|
89
|
+
|---|---|
|
|
90
|
+
| BaseAlert | Dismissible alert banner |
|
|
91
|
+
| BaseBadge | Colored status badge |
|
|
92
|
+
| BaseBreadcrumb | Auto-generated or manual breadcrumb nav |
|
|
93
|
+
| BaseButton | Button with color, size, loading, and routing support |
|
|
94
|
+
| BaseLine | Horizontal divider |
|
|
95
|
+
| BaseLogo | SVG brand logo |
|
|
96
|
+
| BaseModal | Confirmation modal dialog |
|
|
97
|
+
| BaseRow | Card-like content container |
|
|
98
|
+
| BaseSpinner | Loading spinner |
|
|
99
|
+
| BaseToast | Toast notification |
|
|
100
|
+
| ColoredSquares | Colored square indicator |
|
|
101
|
+
| EuroAmount | Formatted euro currency display |
|
|
102
|
+
| Pagination | Page navigation |
|
|
103
|
+
| TrendArrow | Up/down trend indicator with badge |
|
|
104
|
+
|
|
105
|
+
## Peer dependencies
|
|
106
|
+
|
|
107
|
+
These must be installed in the consuming project:
|
|
108
|
+
|
|
109
|
+
- `vue` ^3.3.0
|
|
110
|
+
- `vue-router` ^4.0.0
|
|
111
|
+
- `@heroicons/vue` ^2.0.0
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface BreadCrumb {
|
|
2
|
+
name: string;
|
|
3
|
+
url: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
|
+
items: {
|
|
7
|
+
type: () => BreadCrumb[];
|
|
8
|
+
required: false;
|
|
9
|
+
default: undefined;
|
|
10
|
+
};
|
|
11
|
+
path: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: false;
|
|
14
|
+
default: undefined;
|
|
15
|
+
};
|
|
16
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
items: {
|
|
18
|
+
type: () => BreadCrumb[];
|
|
19
|
+
required: false;
|
|
20
|
+
default: undefined;
|
|
21
|
+
};
|
|
22
|
+
path: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
required: false;
|
|
25
|
+
default: undefined;
|
|
26
|
+
};
|
|
27
|
+
}>> & Readonly<{}>, {
|
|
28
|
+
path: string;
|
|
29
|
+
items: BreadCrumb[];
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
31
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as BaseAlert } from './components/BaseAlert.vue';
|
|
2
2
|
export { default as BaseBadge } from './components/BaseBadge.vue';
|
|
3
|
+
export { default as BaseBreadcrumb } from './components/BaseBreadcrumb.vue';
|
|
3
4
|
export { default as BaseButton } from './components/BaseButton.vue';
|
|
4
5
|
export { default as BaseLine } from './components/BaseLine.vue';
|
|
5
6
|
export { default as BaseLogo } from './components/BaseLogo.vue';
|
|
@@ -21,4 +22,5 @@ export { BaseToastEnum } from './enums/BaseToastEnum';
|
|
|
21
22
|
export { ColorsEnums } from './enums/ColorsEnums';
|
|
22
23
|
export { LineEnum } from './enums/LineEnum';
|
|
23
24
|
export { PositioningEnum } from './enums/PositioningEnum';
|
|
25
|
+
export type { BreadCrumb } from './components/BaseBreadcrumb.vue';
|
|
24
26
|
export { getBaseColor, getBaseColorOf } from './utils/util';
|