@winchsa/ui 0.1.6 → 0.1.8
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 +122 -31
- package/dist/components/table/StaticTable.vue.d.ts +1 -3
- package/dist/styles/assets/scss/variables/_template.scss +1 -1
- package/dist/styles/assets/scss/variables/_vuetify.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_components.scss +2 -2
- package/dist/styles/{@core/scss → core}/base/_dark.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_default-layout-w-vertical-nav.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_layouts.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_mixins.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_utilities.scss +2 -2
- package/dist/styles/{@core/scss → core}/base/_utils.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/_variables.scss +4 -4
- package/dist/styles/{@core/scss → core}/base/_vertical-nav.scss +2 -2
- package/dist/styles/{@core/scss → core}/base/libs/vuetify/_overrides.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/placeholders/_default-layout-vertical-nav.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/placeholders/_vertical-nav.scss +1 -1
- package/dist/styles/{@core/scss → core}/base/skins/_bordered.scss +1 -1
- package/dist/styles/{@core/scss → core}/template/_components.scss +3 -3
- package/dist/styles/{@core/scss → core}/template/_vertical-nav.scss +1 -1
- package/dist/styles/{@core/scss → core}/template/placeholders/_default-layout-vertical-nav.scss +1 -1
- package/dist/styles/{@core/scss → core}/template/skins/_bordered.scss +1 -1
- package/dist/styles/{@layouts/styles → layouts}/_dashboard-layout.scss +1 -1
- package/dist/styles/{@layouts/styles → layouts}/_mixins.scss +1 -1
- package/dist/styles/{@layouts/styles → layouts}/_placeholders.scss +1 -1
- package/package.json +3 -11
- /package/dist/styles/{@core/scss → core}/base/_default-layout.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/_index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/_misc.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/_route-transitions.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/libs/_perfect-scrollbar.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/libs/vuetify/_index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/libs/vuetify/_variables.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/placeholders/_default-layout.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/placeholders/_index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/placeholders/_misc.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/placeholders/_nav.scss +0 -0
- /package/dist/styles/{@core/scss → core}/base/skins/_index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/_default-layout-w-vertical-nav.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/_utilities.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/_variables.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/index.css +0 -0
- /package/dist/styles/{@core/scss → core}/template/index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/libs/vuetify/_variables.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/libs/vuetify/index.css +0 -0
- /package/dist/styles/{@core/scss → core}/template/libs/vuetify/index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/pages/misc.css +0 -0
- /package/dist/styles/{@core/scss → core}/template/pages/misc.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/placeholders/_index.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/placeholders/_nav.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/placeholders/_vertical-nav.scss +0 -0
- /package/dist/styles/{@core/scss → core}/template/skins/_index.scss +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/_classes.scss +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/_global.scss +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/_rtl.scss +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/_variables.scss +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/index.css +0 -0
- /package/dist/styles/{@layouts/styles → layouts}/index.scss +0 -0
package/README.md
CHANGED
|
@@ -2,55 +2,146 @@
|
|
|
2
2
|
|
|
3
3
|
# Winch UI
|
|
4
4
|
|
|
5
|
-
A Vue 3 + Vuetify UI component library for Winch
|
|
5
|
+
A Vue 3 + Vuetify UI component library for Winch projects.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Winch UI is a comprehensive Vue 3 + Vuetify component library designed specifically for Winch projects. It provides pre-built components, utilities, and styling that follow Winch design standards.
|
|
10
|
+
|
|
11
|
+
## Getting Started
|
|
12
|
+
|
|
13
|
+
### Installation
|
|
8
14
|
|
|
9
15
|
```bash
|
|
10
|
-
# Using pnpm
|
|
11
16
|
pnpm add @winchsa/ui
|
|
17
|
+
```
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
npm install @winchsa/ui
|
|
19
|
+
### Basic Usage
|
|
15
20
|
|
|
16
|
-
# Using yarn
|
|
17
|
-
yarn add @winchsa/ui
|
|
18
|
-
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
```javascript
|
|
23
|
+
// main.ts
|
|
24
|
+
import { createApp } from 'vue'
|
|
25
|
+
import '@winchsa/ui/core/template/index.scss'; // <- WINCH styles
|
|
26
|
+
import './assets/scss/styles.scss'; //<- overwritten styles
|
|
21
27
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<!-- Your Winch UI components here -->
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
+
const app = createApp(App)
|
|
29
|
+
app.mount('#app')
|
|
30
|
+
```
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
### Vite Configuration
|
|
35
|
+
|
|
36
|
+
To use the Winch UI package in your Vite project, add the following configuration to your `vite.config.ts`:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { defineConfig } from 'vite'
|
|
40
|
+
import vue from '@vitejs/plugin-vue'
|
|
41
|
+
import vuetify from 'vite-plugin-vuetify'
|
|
42
|
+
import Components from 'unplugin-vue-components/vite'
|
|
43
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
|
44
|
+
import { fileURLToPath } from 'node:url'
|
|
45
|
+
|
|
46
|
+
export default defineConfig({
|
|
47
|
+
plugins: [
|
|
48
|
+
vue(),
|
|
49
|
+
vuetify({
|
|
50
|
+
styles: {
|
|
51
|
+
configFile: 'node_modules/@winchsa/ui/dist/styles/assets/scss/variables/_vuetify.scss'
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
Components({
|
|
55
|
+
resolvers: [
|
|
56
|
+
(name) => {
|
|
57
|
+
if (name.startsWith('W')) {
|
|
58
|
+
return { name, from: '@winchsa/ui' }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
dts: true
|
|
63
|
+
}),
|
|
64
|
+
AutoImport({
|
|
65
|
+
imports: [
|
|
66
|
+
{
|
|
67
|
+
'@winchsa/ui/utils': [
|
|
68
|
+
'buildApiUrl',
|
|
69
|
+
'printPdf',
|
|
70
|
+
'saveFile',
|
|
71
|
+
'formValidator',
|
|
72
|
+
'getErrorMessage',
|
|
73
|
+
'formatDate',
|
|
74
|
+
'formatNumber',
|
|
75
|
+
'toaster',
|
|
76
|
+
'responseAlert'
|
|
77
|
+
...
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
dts: true
|
|
82
|
+
})
|
|
83
|
+
],
|
|
84
|
+
resolve: {
|
|
85
|
+
alias: {
|
|
86
|
+
'@styles': fileURLToPath(new URL('node_modules/@winchsa/ui/dist/styles', import.meta.url))
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
})
|
|
33
90
|
```
|
|
34
91
|
|
|
35
|
-
|
|
92
|
+
This configuration:
|
|
93
|
+
- Sets up Vuetify with custom styles
|
|
94
|
+
- Auto-imports Winch UI components that start with 'W'
|
|
95
|
+
- Auto-imports utility functions from the package
|
|
96
|
+
- Creates proper TypeScript definitions
|
|
97
|
+
- Sets up the alias for styles
|
|
98
|
+
|
|
99
|
+
## Development
|
|
100
|
+
|
|
101
|
+
### Playground
|
|
102
|
+
|
|
103
|
+
The playground is located in the `playground/` directory and provides a development environment for testing and showcasing components.
|
|
104
|
+
|
|
105
|
+
#### Running the Playground
|
|
36
106
|
|
|
37
107
|
```bash
|
|
38
|
-
|
|
108
|
+
cd playground
|
|
39
109
|
pnpm install
|
|
110
|
+
pnpm dev
|
|
111
|
+
```
|
|
40
112
|
|
|
41
|
-
|
|
42
|
-
pnpm run dev
|
|
113
|
+
### Building and Installing Locally in an Actual Project
|
|
43
114
|
|
|
44
|
-
|
|
45
|
-
|
|
115
|
+
This script compiles the UI package, generates a tarball, and installs it into your project for local development and testing.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
./build-and-install.sh
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Release Process
|
|
46
122
|
|
|
47
|
-
|
|
48
|
-
pnpm run lint
|
|
123
|
+
This project uses a **tag-based release system** that automatically publishes to npm only when you push version tags. This ensures you have full control over when releases are published.
|
|
49
124
|
|
|
50
|
-
# Fix linting issues
|
|
51
|
-
pnpm run lint:fix
|
|
52
125
|
|
|
53
|
-
|
|
54
|
-
|
|
126
|
+
### **Option 1: Using the Release Script (Recommended)**
|
|
127
|
+
```bash
|
|
128
|
+
# Complete automated release process
|
|
129
|
+
pnpm run release
|
|
55
130
|
```
|
|
56
131
|
|
|
132
|
+
### **Option 2: Manual Tag-Based Release**
|
|
133
|
+
```bash
|
|
134
|
+
# 1. Update version in package.json
|
|
135
|
+
# 2. Build the package
|
|
136
|
+
pnpm run build
|
|
137
|
+
|
|
138
|
+
# 3. Commit your changes
|
|
139
|
+
git add .
|
|
140
|
+
git commit -m "feat: new features"
|
|
141
|
+
|
|
142
|
+
# 4. Create and push a tag
|
|
143
|
+
git tag v1.2.3
|
|
144
|
+
git push origin master --tags
|
|
145
|
+
|
|
146
|
+
# GitHub Actions will automatically trigger and publish to npm
|
|
147
|
+
```
|
|
@@ -14,9 +14,7 @@ declare const _default: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>
|
|
|
14
14
|
attrs: any;
|
|
15
15
|
slots: __VLS_PrettifyGlobal<any>;
|
|
16
16
|
emit: {};
|
|
17
|
-
}>) => import("vue").VNode
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}> & {
|
|
17
|
+
}>) => import("vue").VNode & {
|
|
20
18
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
19
|
};
|
|
22
20
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward '
|
|
1
|
+
@forward '../../../core/template/variables';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@forward '
|
|
1
|
+
@forward '../../../core/template/libs/vuetify/variables';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
1
|
+
@use '../../assets/scss/variables/template' as variables;
|
|
2
|
+
@use '../../layouts/mixins' as layoutsMixins;
|
|
3
3
|
|
|
4
4
|
// Demo spacers
|
|
5
5
|
// TODO: Use vuetify SCSS variable here
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:list';
|
|
3
|
-
@use '
|
|
3
|
+
@use '../../assets/scss/variables/template' as variables;
|
|
4
4
|
|
|
5
5
|
// Thanks: https://css-tricks.com/snippets/sass/deep-getset-maps/
|
|
6
6
|
@function map-deep-get($map, $keys...) {
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
- You can also use variable for consistency (e.g. mx 1 rem should be applied to both vertical nav items and vertical nav header)
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
@forward '
|
|
14
|
+
@forward '../../layouts/variables' with (
|
|
15
15
|
// Adjust z-index so vertical nav & overlay stays on top of v-layout in v-main. E.g. Email app
|
|
16
16
|
$layout-vertical-nav-z-index: 1004,
|
|
17
17
|
$layout-overlay-z-index: 1003
|
|
18
18
|
);
|
|
19
|
-
@use '
|
|
19
|
+
@use '../../layouts/variables' as *;
|
|
20
20
|
|
|
21
21
|
// Default layout
|
|
22
22
|
|
|
23
23
|
$navbar-high-emphasis-text: true !default;
|
|
24
24
|
|
|
25
|
-
// @forward "
|
|
25
|
+
// @forward "layouts/variables" with (
|
|
26
26
|
// $layout-vertical-nav-width: 350px !default,
|
|
27
27
|
// );
|
|
28
28
|
|
|
@@ -105,7 +105,7 @@ $plugin-ps-thumb-y-dark: rgba(var(--v-theme-surface-variant), 0.35) !default;
|
|
|
105
105
|
|
|
106
106
|
// Vuetify
|
|
107
107
|
|
|
108
|
-
// Used in src
|
|
108
|
+
// Used in src/core/base/libs/vuetify/_overrides.scss
|
|
109
109
|
$vuetify-reduce-default-compact-button-icon-size: true !default;
|
|
110
110
|
|
|
111
111
|
// Custom variables
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'placeholders' as *;
|
|
2
2
|
@use '../template/placeholders' as *;
|
|
3
|
-
@use '
|
|
4
|
-
@use '
|
|
3
|
+
@use '../../layouts/mixins' as layoutsMixins;
|
|
4
|
+
@use '../../assets/scss/variables/template' as variables;
|
|
5
5
|
@use 'mixins' as mixins;
|
|
6
6
|
@use 'vuetify/lib/styles/tools/states' as vuetifyStates;
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use '../base/mixins';
|
|
4
|
-
@use '
|
|
5
|
-
@use '
|
|
6
|
-
@use '
|
|
4
|
+
@use '../../layouts/mixins' as layoutsMixins;
|
|
5
|
+
@use '../../assets/scss/variables/template' as variables;
|
|
6
|
+
@use '../../assets/scss/variables/vuetify';
|
|
7
7
|
|
|
8
8
|
// Autocomplete
|
|
9
9
|
.v-input--density-compact .v-field--variant-plain,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winchsa/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"eslint-plugin-import": "^2.31.0",
|
|
53
53
|
"eslint-plugin-vue": "^9.32.0",
|
|
54
54
|
"sass": "1.86.0",
|
|
55
|
-
"typescript": "5.
|
|
55
|
+
"typescript": "^5.8.3",
|
|
56
56
|
"unbuild": "^3.0.0",
|
|
57
57
|
"vite": "^4.5.14",
|
|
58
58
|
"vite-plugin-vuetify": "1.0.2",
|
|
@@ -62,16 +62,8 @@
|
|
|
62
62
|
"scripts": {
|
|
63
63
|
"dev": "vite",
|
|
64
64
|
"build": "unbuild",
|
|
65
|
-
"test": "vitest --run",
|
|
66
65
|
"lint": "eslint \"**/*.{ts,vue,mjs,json}\"",
|
|
67
66
|
"lint:fix": "eslint \"**/*.{ts,vue,mjs,json}\" --fix",
|
|
68
|
-
"
|
|
69
|
-
"version:minor": "pnpm version minor --no-git-tag-version",
|
|
70
|
-
"version:major": "pnpm version major --no-git-tag-version",
|
|
71
|
-
"publish:patch": "pnpm run version:patch && git add package.json && git commit -m \"chore: bump version\" && git push origin master",
|
|
72
|
-
"publish:minor": "pnpm run version:minor && git add package.json && git commit -m \"chore: bump version\" && git push origin master",
|
|
73
|
-
"publish:major": "pnpm run version:major && git add package.json && git commit -m \"chore: bump version\" && git push origin master",
|
|
74
|
-
"release": "pnpm run build && pnpm publish",
|
|
75
|
-
"release:dry-run": "pnpm run build && pnpm publish --dry-run"
|
|
67
|
+
"release": "pnpm version patch && pnpm run build && git add . && git commit -m \"chore: release v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\") && git push origin master --tags && pnpm publish"
|
|
76
68
|
}
|
|
77
69
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|