@ldmjs/ui 1.0.0-dev-2 → 1.0.0-dev-3
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 +33 -1
- package/config/rules.js +51 -0
- package/config/webpack.config.build.js +14 -30
- package/config/webpack.config.dev.js +3 -31
- package/dist/css/index.css +86 -0
- package/dist/index.js +654 -5
- package/dist/scss/_colors.scss +73 -0
- package/dist/scss/_variables.scss +5 -0
- package/dist/scss/index.scss +2 -0
- package/dist/utils.d.ts +4 -0
- package/main.ts +25 -3
- package/package.json +14 -10
- package/src/app.vue +4 -1
- package/src/css/index.css +86 -0
- package/src/index.ts +18 -2
- package/src/ld-icon/index.ts +2 -2
- package/src/ld-loader/index.ts +8 -0
- package/src/ld-loader/ld-loader.ts +123 -0
- package/src/ld-loader/ld-loader.vue +133 -0
- package/src/scss/_colors.scss +73 -0
- package/src/scss/_variables.scss +5 -0
- package/src/scss/index.scss +2 -0
- package/src/utils/isDefined.ts +5 -0
- package/src/utils/zIndex.ts +11 -0
- package/src/utils.d.ts +4 -0
package/README.md
CHANGED
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
# Dependencies
|
|
2
|
+
|
|
3
|
+
- vue: >=3.4
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
```cmd
|
|
8
|
+
npm i @ldmjs/ui@latest
|
|
9
|
+
```
|
|
10
|
+
OR
|
|
11
|
+
```cmd
|
|
12
|
+
yarn add @ldmjs/ui@latest
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
# Use
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { createApp } from 'vue';
|
|
19
|
+
import '@ldmjs/ui/dist/css';
|
|
20
|
+
import '@ldmjs/ui/dist/scss';
|
|
21
|
+
import ldmui from '@ldmjs/ui';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
const appComponent = createApp(App);
|
|
26
|
+
appComponent.use(ldmui);
|
|
27
|
+
appComponent.mount('#app');
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
# Library
|
|
31
|
+
|
|
32
|
+
- ld-icon
|
|
33
|
+
- loader
|
package/config/rules.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
rules: [
|
|
3
|
+
{
|
|
4
|
+
test: /\.vue$/,
|
|
5
|
+
use: [
|
|
6
|
+
{
|
|
7
|
+
loader: 'vue-loader',
|
|
8
|
+
options: {
|
|
9
|
+
compilerOptions: {
|
|
10
|
+
whitespace: 'preserve',
|
|
11
|
+
},
|
|
12
|
+
hotReload: true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
test: /\.ts$/,
|
|
19
|
+
exclude: /node_modules|\.(spec|e2e|d)\.ts$|vue\/src/,
|
|
20
|
+
use: [
|
|
21
|
+
{
|
|
22
|
+
loader: 'ts-loader',
|
|
23
|
+
options: {
|
|
24
|
+
appendTsSuffixTo: [/\.vue$/],
|
|
25
|
+
transpileOnly: true,
|
|
26
|
+
happyPackMode: false,
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
test: /\.(css|scss)$/,
|
|
33
|
+
use: [
|
|
34
|
+
'style-loader',
|
|
35
|
+
{
|
|
36
|
+
loader: 'css-loader',
|
|
37
|
+
options: {
|
|
38
|
+
importLoaders: 1,
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
'postcss-loader',
|
|
42
|
+
{
|
|
43
|
+
loader: 'sass-loader',
|
|
44
|
+
options: {
|
|
45
|
+
implementation: require('node-sass'),
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
}
|
|
@@ -3,6 +3,7 @@ const { VueLoaderPlugin } = require('vue-loader');
|
|
|
3
3
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
4
4
|
const DefinePlugin = require('webpack/lib/DefinePlugin');
|
|
5
5
|
const path = require('path');
|
|
6
|
+
const { rules } = require('./rules');
|
|
6
7
|
|
|
7
8
|
module.exports = {
|
|
8
9
|
mode: 'production',
|
|
@@ -31,36 +32,7 @@ module.exports = {
|
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
module: {
|
|
34
|
-
rules
|
|
35
|
-
{
|
|
36
|
-
test: /\.vue$/,
|
|
37
|
-
use: [
|
|
38
|
-
{
|
|
39
|
-
loader: 'vue-loader',
|
|
40
|
-
options: {
|
|
41
|
-
compilerOptions: {
|
|
42
|
-
whitespace: 'preserve',
|
|
43
|
-
},
|
|
44
|
-
hotReload: true
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
test: /\.ts$/,
|
|
51
|
-
exclude: /node_modules|\.(spec|e2e|d)\.ts$|vue\/src/,
|
|
52
|
-
use: [
|
|
53
|
-
{
|
|
54
|
-
loader: 'ts-loader',
|
|
55
|
-
options: {
|
|
56
|
-
appendTsSuffixTo: [/\.vue$/],
|
|
57
|
-
transpileOnly: true,
|
|
58
|
-
happyPackMode: false,
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
],
|
|
35
|
+
rules
|
|
64
36
|
},
|
|
65
37
|
optimization: {
|
|
66
38
|
minimize: false,
|
|
@@ -131,6 +103,18 @@ module.exports = {
|
|
|
131
103
|
{
|
|
132
104
|
from: 'src/index.d.ts',
|
|
133
105
|
to: './index.d.ts'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
from: 'src/utils.d.ts',
|
|
109
|
+
to: './utils.d.ts'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
from: 'src/css/index.css',
|
|
113
|
+
to: './css/index.css'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
from: 'src/scss',
|
|
117
|
+
to: './scss'
|
|
134
118
|
}
|
|
135
119
|
]
|
|
136
120
|
})
|
|
@@ -3,6 +3,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
|
3
3
|
const DefinePlugin = require('webpack/lib/DefinePlugin');
|
|
4
4
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
5
5
|
const path = require('path');
|
|
6
|
+
const { rules } = require('./rules');
|
|
6
7
|
|
|
7
8
|
module.exports = {
|
|
8
9
|
mode: 'development',
|
|
@@ -10,41 +11,12 @@ module.exports = {
|
|
|
10
11
|
'main': './main.ts',
|
|
11
12
|
},
|
|
12
13
|
module: {
|
|
13
|
-
rules
|
|
14
|
-
{
|
|
15
|
-
test: /\.vue$/,
|
|
16
|
-
use: [
|
|
17
|
-
{
|
|
18
|
-
loader: 'vue-loader',
|
|
19
|
-
options: {
|
|
20
|
-
compilerOptions: {
|
|
21
|
-
whitespace: 'preserve',
|
|
22
|
-
},
|
|
23
|
-
hotReload: true
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
test: /\.ts$/,
|
|
30
|
-
exclude: /node_modules|\.(spec|e2e|d)\.ts$|vue\/src/,
|
|
31
|
-
use: [
|
|
32
|
-
{
|
|
33
|
-
loader: 'ts-loader',
|
|
34
|
-
options: {
|
|
35
|
-
appendTsSuffixTo: [/\.vue$/],
|
|
36
|
-
transpileOnly: true,
|
|
37
|
-
happyPackMode: false,
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
],
|
|
14
|
+
rules,
|
|
43
15
|
},
|
|
44
16
|
resolve: {
|
|
45
17
|
symlinks: true,
|
|
46
18
|
modules: [path.join(__dirname, '../'), 'node_modules'],
|
|
47
|
-
extensions: ['*', '.ts', '.js', '.vue', '.html', '.json', '.scss'],
|
|
19
|
+
extensions: ['*', '.ts', '.js', '.vue', '.html', '.json', '.scss', '.css'],
|
|
48
20
|
alias: {
|
|
49
21
|
'vue$': 'vue/dist/vue.esm-bundler.js',
|
|
50
22
|
'@': 'src',
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--primary-d-1: hsla(210, 100%, 18%, 100%);
|
|
3
|
+
--primary: hsla(210, 100%, 26%, 100%);
|
|
4
|
+
--primary-l-1: hsla(210, 100%, 34%, 100%);
|
|
5
|
+
--primary-l-2: hsla(210, 100%, 42%, 100%);
|
|
6
|
+
--primary-l-3: hsla(210, 100%, 50%, 100%);
|
|
7
|
+
--primary-l-4: hsla(210, 100%, 58%, 100%);
|
|
8
|
+
--primary-l-5: hsla(210, 100%, 66%, 100%);
|
|
9
|
+
--primary-l-6: hsla(210, 100%, 74%, 100%);
|
|
10
|
+
--primary-l-7: hsla(210, 100%, 82%, 100%);
|
|
11
|
+
--primary-l-8: hsla(210, 100%, 90%, 100%);
|
|
12
|
+
|
|
13
|
+
--dark: hsla(219, 83%, 14%, 100%);
|
|
14
|
+
--dark-l-1-09: hsla(219, 83%, 14%, 90%);
|
|
15
|
+
--dark-l-2-08: hsla(219, 83%, 14%, 80%);
|
|
16
|
+
--dark-l-3-07: hsla(219, 83%, 14%, 70%);
|
|
17
|
+
--dark-l-4-06: hsla(219, 83%, 14%, 60%);
|
|
18
|
+
--dark-l-5-05: hsla(219, 83%, 14%, 50%);
|
|
19
|
+
--dark-l-6-04: hsla(219, 83%, 14%, 40%);
|
|
20
|
+
--dark-l-7-03: hsla(219, 83%, 14%, 30%);
|
|
21
|
+
--dark-l-8-02: hsla(219, 83%, 14%, 20%);
|
|
22
|
+
--dark-l-9-01: hsla(219, 83%, 14%, 10%);
|
|
23
|
+
|
|
24
|
+
--secondary-d-4: hsla(204, 100%, 18%, 100%);
|
|
25
|
+
--secondary-d-3: hsla(204, 100%, 26%, 100%);
|
|
26
|
+
--secondary-d-2: hsla(204, 100%, 34%, 100%);
|
|
27
|
+
--secondary-d-1: hsla(204, 100%, 42%, 100%);
|
|
28
|
+
--secondary: hsla(204, 100%, 50%, 100%);
|
|
29
|
+
--secondary-l-1: hsla(204, 100%, 58%, 100%);
|
|
30
|
+
--secondary-l-2: hsla(204, 100%, 66%, 100%);
|
|
31
|
+
--secondary-l-3: hsla(204, 100%, 74%, 100%);
|
|
32
|
+
--secondary-l-4: hsla(204, 100%, 82%, 100%);
|
|
33
|
+
--secondary-l-5: hsla(204, 100%, 90%, 100%);
|
|
34
|
+
|
|
35
|
+
--success-d-3: hsla(135, 59%, 17%, 100%);
|
|
36
|
+
--success-d-2: hsla(135, 59%, 25%, 100%);
|
|
37
|
+
--success-d-1: hsla(135, 59%, 33%, 100%);
|
|
38
|
+
--success: hsla(135, 59%, 41%, 100%);
|
|
39
|
+
--success-l-1: hsla(135, 59%, 49%, 100%);
|
|
40
|
+
--success-l-2: hsla(135, 59%, 57%, 100%);
|
|
41
|
+
--success-l-3: hsla(135, 59%, 65%, 100%);
|
|
42
|
+
--success-l-4: hsla(135, 59%, 73%, 100%);
|
|
43
|
+
--success-l-5: hsla(135, 59%, 81%, 100%);
|
|
44
|
+
--success-l-6: hsla(135, 59%, 89%, 100%);
|
|
45
|
+
|
|
46
|
+
--error-d-3: hsla(7, 82%, 18%, 100%);
|
|
47
|
+
--error-d-2: hsla(7, 82%, 26%, 100%);
|
|
48
|
+
--error-d-1: hsla(7, 82%, 34%, 100%);
|
|
49
|
+
--error: hsla(7, 82%, 42%, 100%);
|
|
50
|
+
--error-l-1: hsla(7, 82%, 50%, 100%);
|
|
51
|
+
--error-l-2: hsla(7, 82%, 58%, 100%);
|
|
52
|
+
--error-l-3: hsla(7, 82%, 66%, 100%);
|
|
53
|
+
--error-l-4: hsla(7, 82%, 74%, 100%);
|
|
54
|
+
--error-l-5: hsla(7, 82%, 82%, 100%);
|
|
55
|
+
--error-l-6: hsla(7, 82%, 90%, 100%);
|
|
56
|
+
|
|
57
|
+
--warning-d-4: hsla(24, 100%, 18%, 100%);
|
|
58
|
+
--warning-d-3: hsla(24, 100%, 26%, 100%);
|
|
59
|
+
--warning-d-2: hsla(24, 100%, 34%, 100%);
|
|
60
|
+
--warning-d-1: hsla(24, 100%, 42%, 100%);
|
|
61
|
+
--warning: hsla(24, 100%, 50%, 100%);
|
|
62
|
+
--warning-l-1: hsla(24, 100%, 58%, 100%);
|
|
63
|
+
--warning-l-2: hsla(24, 100%, 66%, 100%);
|
|
64
|
+
--warning-l-3: hsla(24, 100%, 74%, 100%);
|
|
65
|
+
--warning-l-4: hsla(24, 100%, 82%, 100%);
|
|
66
|
+
--warning-l-5: hsla(24, 100%, 90%, 100%);
|
|
67
|
+
|
|
68
|
+
--grey-d-3: hsla(0, 0%, 14%, 100%);
|
|
69
|
+
--grey-d-2: hsla(0, 0%, 23%, 100%);
|
|
70
|
+
--grey-d-1: hsla(0, 0%, 32%, 100%);
|
|
71
|
+
--grey: hsla(0, 0%, 41%, 100%);
|
|
72
|
+
--grey-l-1: hsla(0, 0%, 50%, 100%);
|
|
73
|
+
--grey-l-2: hsla(0, 0%, 59%, 100%);
|
|
74
|
+
--grey-l-3: hsla(0, 0%, 68%, 100%);
|
|
75
|
+
--grey-l-4: hsla(0, 0%, 77%, 100%);
|
|
76
|
+
--grey-l-5: hsla(0, 0%, 86%, 100%);
|
|
77
|
+
--grey-l-6: hsla(0, 0%, 95%, 100%);
|
|
78
|
+
|
|
79
|
+
--black: hsla(0, 0%, 0%, 100%);
|
|
80
|
+
|
|
81
|
+
--white: hsla(0, 0%, 100%, 100%);
|
|
82
|
+
|
|
83
|
+
--text: hsla(0, 0%, 13%, 100%);
|
|
84
|
+
|
|
85
|
+
--label: hsla(0, 0%, 47%, 100%);
|
|
86
|
+
}
|