doph-js 0.0.5 → 0.0.6
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/package.json +4 -5
- package/src/App.vue +0 -57
- package/src/assets/vue.svg +0 -1
- package/src/components/DButton.vue +0 -12
- package/src/components.js +0 -8
- package/src/index.js +0 -14
- package/src/main.js +0 -9
- package/src/scss/components.scss +0 -59
- package/src/scss/global.scss +0 -4
- package/src/scss/themes/buttons.scss +0 -132
- package/src/scss/themes.scss +0 -49
- package/src/scss/variables.scss +0 -63
- package/src/style.css +0 -4
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doph-js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Simple Vue3 component library",
|
|
5
5
|
"author": "Error202",
|
|
6
|
-
"main": "./dist/dophJs.umd.
|
|
6
|
+
"main": "./dist/dophJs.umd.cjs",
|
|
7
7
|
"module": "./dist/dophJs.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"import": "./dist/dophJs.
|
|
10
|
+
"import": "./dist/dophJs.esm.js",
|
|
11
11
|
"require": "./dist/dophJs.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
"src"
|
|
15
|
+
"dist"
|
|
17
16
|
],
|
|
18
17
|
|
|
19
18
|
"type": "module",
|
package/src/App.vue
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
import DButton from "./components/DButton.vue";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<template>
|
|
7
|
-
<div style="display: flex; flex-direction: row;">
|
|
8
|
-
<div class="dark" style="width: 50%; height: 100vh; padding: 20px;">
|
|
9
|
-
<div class="h-list">
|
|
10
|
-
<d-button>Кнопка</d-button>
|
|
11
|
-
<d-button class="button-blue">Кнопка</d-button>
|
|
12
|
-
<d-button class="button-green">Кнопка</d-button>
|
|
13
|
-
<d-button class="button-red">Кнопка</d-button>
|
|
14
|
-
<d-button class="button-orange">Кнопка</d-button>
|
|
15
|
-
<d-button class="button-violet">Кнопка</d-button>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div class="h-list">
|
|
19
|
-
<d-button class="button-outline">Кнопка</d-button>
|
|
20
|
-
<d-button class="button-outline-blue">Кнопка</d-button>
|
|
21
|
-
<d-button class="button-outline-green">Кнопка</d-button>
|
|
22
|
-
<d-button class="button-outline-red">Кнопка</d-button>
|
|
23
|
-
<d-button class="button-outline-orange">Кнопка</d-button>
|
|
24
|
-
<d-button class="button-outline-violet">Кнопка</d-button>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div style="width: 50%; height: 100vh; padding: 20px;">
|
|
28
|
-
<div class="h-list">
|
|
29
|
-
<d-button>Кнопка</d-button>
|
|
30
|
-
<d-button class="button-blue">Кнопка</d-button>
|
|
31
|
-
<d-button class="button-green">Кнопка</d-button>
|
|
32
|
-
<d-button class="button-red">Кнопка</d-button>
|
|
33
|
-
<d-button class="button-orange">Кнопка</d-button>
|
|
34
|
-
<d-button class="button-violet">Кнопка</d-button>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="h-list">
|
|
38
|
-
<d-button class="button-outline">Кнопка</d-button>
|
|
39
|
-
<d-button class="button-outline-blue">Кнопка</d-button>
|
|
40
|
-
<d-button class="button-outline-green">Кнопка</d-button>
|
|
41
|
-
<d-button class="button-outline-red">Кнопка</d-button>
|
|
42
|
-
<d-button class="button-outline-orange">Кнопка</d-button>
|
|
43
|
-
<d-button class="button-outline-violet">Кнопка</d-button>
|
|
44
|
-
</div>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<style scoped>
|
|
50
|
-
.h-list {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
gap: 5px;
|
|
55
|
-
margin-bottom: 20px;
|
|
56
|
-
}
|
|
57
|
-
</style>
|
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
package/src/components.js
DELETED
package/src/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import components from'./components'
|
|
2
|
-
|
|
3
|
-
const plugin = {
|
|
4
|
-
install (Vue) {
|
|
5
|
-
for (const prop in components) {
|
|
6
|
-
if (components.hasOwnProperty(prop)) {
|
|
7
|
-
const component = components[prop]
|
|
8
|
-
Vue.component(component.name, component)
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default plugin
|
package/src/main.js
DELETED
package/src/scss/components.scss
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
.button {
|
|
2
|
-
user-select: none;
|
|
3
|
-
cursor: pointer;
|
|
4
|
-
display: inline-block;
|
|
5
|
-
padding: 8px 16px;
|
|
6
|
-
border-radius: 5px;
|
|
7
|
-
transition: all 200ms;
|
|
8
|
-
font-weight: 500;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.label {
|
|
12
|
-
margin-bottom: 5px;
|
|
13
|
-
font-size: 0.9em;
|
|
14
|
-
opacity: 0.7;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.d-input, .d-select, .d-checkbox {
|
|
18
|
-
margin-bottom: 15px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.d-input input, select {
|
|
22
|
-
font-size: 1.1em;
|
|
23
|
-
border-style: solid;
|
|
24
|
-
border-width: 1px;
|
|
25
|
-
border-radius: 5px;
|
|
26
|
-
padding: 5px 10px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.d-checkbox {
|
|
30
|
-
input[type=checkbox] {
|
|
31
|
-
position: absolute;
|
|
32
|
-
z-index: -1;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
}
|
|
35
|
-
input[type=checkbox]+label {
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
user-select: none;
|
|
39
|
-
}
|
|
40
|
-
input[type=checkbox]+label::before {
|
|
41
|
-
content: '';
|
|
42
|
-
display: inline-block;
|
|
43
|
-
width: 1em;
|
|
44
|
-
height: 1em;
|
|
45
|
-
flex-shrink: 0;
|
|
46
|
-
flex-grow: 0;
|
|
47
|
-
border-radius: 0.25em;
|
|
48
|
-
margin-right: 0.5em;
|
|
49
|
-
background-repeat: no-repeat;
|
|
50
|
-
background-position: center center;
|
|
51
|
-
background-size: 50% 50%;
|
|
52
|
-
transition: all 200ms;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
input[type=checkbox]:checked+label::before {
|
|
56
|
-
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
|
|
57
|
-
background-size: 10px;
|
|
58
|
-
}
|
|
59
|
-
}
|
package/src/scss/global.scss
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
@import "../variables";
|
|
2
|
-
|
|
3
|
-
.button {
|
|
4
|
-
background-color: $light-background-gray;
|
|
5
|
-
color: $light-text-gray;
|
|
6
|
-
&:hover {
|
|
7
|
-
color: darken($light-text-gray, 10);
|
|
8
|
-
background-color: $light-background-gray-hover;
|
|
9
|
-
}
|
|
10
|
-
&.button-blue {
|
|
11
|
-
background-color: $light-background-blue;
|
|
12
|
-
color: $light-text-blue;
|
|
13
|
-
&:hover {
|
|
14
|
-
color: darken($light-text-blue, 10);
|
|
15
|
-
background-color: $light-background-blue-hover;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
&.button-green {
|
|
19
|
-
background-color: $light-background-green;
|
|
20
|
-
color: $light-text-green;
|
|
21
|
-
&:hover {
|
|
22
|
-
color: darken($light-text-green, 10);
|
|
23
|
-
background-color: $light-background-green-hover;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
&.button-red {
|
|
27
|
-
background-color: $light-background-red;
|
|
28
|
-
color: $light-text-red;
|
|
29
|
-
&:hover {
|
|
30
|
-
background-color: $light-background-red-hover;
|
|
31
|
-
color: darken($light-text-red, 10);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
&.button-orange {
|
|
35
|
-
background-color: $light-background-orange;
|
|
36
|
-
color: $light-text-orange;
|
|
37
|
-
&:hover {
|
|
38
|
-
background-color: $light-background-orange-hover;
|
|
39
|
-
color: darken($light-text-orange, 10);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
&.button-violet {
|
|
43
|
-
background-color: $light-background-violet;
|
|
44
|
-
color: $light-text-violet;
|
|
45
|
-
&:hover {
|
|
46
|
-
background-color: $light-background-violet-hover;
|
|
47
|
-
color: darken($light-text-violet, 10);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// OUTLINED
|
|
51
|
-
&.button-outline {
|
|
52
|
-
outline: solid 1px rgba(0,0,0,0.1);
|
|
53
|
-
background-color: transparent;
|
|
54
|
-
&:hover {
|
|
55
|
-
background-color: rgba(0,0,0,0.2);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
&.button-outline-blue {
|
|
59
|
-
outline: solid 1px $light-background-blue;
|
|
60
|
-
background-color: transparent;
|
|
61
|
-
color: $light-background-blue;
|
|
62
|
-
&:hover {
|
|
63
|
-
background-color: $light-background-blue-hover;
|
|
64
|
-
color: white;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
&.button-outline-green {
|
|
68
|
-
background-color: $light-background-green;
|
|
69
|
-
&:hover {
|
|
70
|
-
background-color: $light-background-green-hover;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
&.button-outline-red {
|
|
74
|
-
background-color: $light-background-red;
|
|
75
|
-
&:hover {
|
|
76
|
-
background-color: $light-background-red-hover;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
&.button-outline-orange {
|
|
80
|
-
background-color: $light-background-orange;
|
|
81
|
-
&:hover {
|
|
82
|
-
background-color: $light-background-orange-hover;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
&.button-outline-violet {
|
|
86
|
-
background-color: $light-background-violet;
|
|
87
|
-
&:hover {
|
|
88
|
-
background-color: $light-background-violet-hover;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// DARK ////////////////////////////
|
|
94
|
-
|
|
95
|
-
.dark .button {
|
|
96
|
-
background-color: rgba(255,255,255,0.1);
|
|
97
|
-
color: $black-10;
|
|
98
|
-
&:hover {
|
|
99
|
-
color: $dark-text-default-hover;
|
|
100
|
-
background-color: rgba(255,255,255,0.2);
|
|
101
|
-
}
|
|
102
|
-
&.button-blue {
|
|
103
|
-
background-color: $dark-background-blue;
|
|
104
|
-
&:hover {
|
|
105
|
-
background-color: $dark-background-blue-hover;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
&.button-green {
|
|
109
|
-
background-color: $dark-background-green;
|
|
110
|
-
&:hover {
|
|
111
|
-
background-color: $dark-background-green-hover;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
&.button-red {
|
|
115
|
-
background-color: $dark-background-red;
|
|
116
|
-
&:hover {
|
|
117
|
-
background-color: $dark-background-red-hover;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
&.button-orange {
|
|
121
|
-
background-color: $dark-background-orange;
|
|
122
|
-
&:hover {
|
|
123
|
-
background-color: $dark-background-orange-hover;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
&.button-violet {
|
|
127
|
-
background-color: $dark-background-violet;
|
|
128
|
-
&:hover {
|
|
129
|
-
background-color: $dark-background-violet-hover;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
package/src/scss/themes.scss
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
@import "variables";
|
|
2
|
-
@import "themes/buttons";
|
|
3
|
-
|
|
4
|
-
body {
|
|
5
|
-
background-color: $light-background-default;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.dark {
|
|
9
|
-
background-color: $dark-background-default;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.d-input input, .d-select select {
|
|
13
|
-
color: $dark-text-default;
|
|
14
|
-
background-color: $black-85;
|
|
15
|
-
border-color: rgba(255,255,255,0.2);
|
|
16
|
-
&:focus {
|
|
17
|
-
outline: none !important;
|
|
18
|
-
border-color: rgba(255,255,255,0.4);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.d-checkbox {
|
|
23
|
-
input[type=checkbox]+label::before {
|
|
24
|
-
border: 1px solid rgba(255,255,255,0.2);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
input[type=checkbox]:checked+label::before {
|
|
28
|
-
border-color: $black-60;
|
|
29
|
-
background-color: $black-60;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* стили при наведении курсора на checkbox */
|
|
33
|
-
input[type=checkbox]:not(:disabled):not(:checked)+label:hover::before {
|
|
34
|
-
border-color: rgba(255,255,255,0.4);
|
|
35
|
-
}
|
|
36
|
-
/* стили для активного состояния чекбокса (при нажатии на него) */
|
|
37
|
-
input[type=checkbox]:not(:disabled):active+label::before {
|
|
38
|
-
background-color: #b3d7ff;
|
|
39
|
-
border-color: rgba(255,255,255,0.4);
|
|
40
|
-
}
|
|
41
|
-
/* стили для чекбокса, находящегося в фокусе и не находящегося в состоянии checked */
|
|
42
|
-
input[type=checkbox]:focus:not(:checked)+label::before {
|
|
43
|
-
border-color: rgba(255,255,255,0.4);
|
|
44
|
-
}
|
|
45
|
-
/* стили для чекбокса, находящегося в состоянии disabled */
|
|
46
|
-
input[type=checkbox]:disabled+label::before {
|
|
47
|
-
background-color: #e9ecef;
|
|
48
|
-
}
|
|
49
|
-
}
|
package/src/scss/variables.scss
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
$gray: #cccccc;
|
|
2
|
-
$blue: #51c0e7;
|
|
3
|
-
$green: #90d760;
|
|
4
|
-
$red: #ff9292;
|
|
5
|
-
$orange: #ffc458;
|
|
6
|
-
$violet: #c2a7ff;
|
|
7
|
-
|
|
8
|
-
$light-text-default: #333333;
|
|
9
|
-
$light-text-default-hover: #000000;
|
|
10
|
-
|
|
11
|
-
$light-text-gray: darken($gray, 30);
|
|
12
|
-
$light-text-blue: darken(desaturate($blue, 60), 30);
|
|
13
|
-
$light-text-green: darken(desaturate($green, 60), 30);
|
|
14
|
-
$light-text-red: darken(desaturate($red, 60), 30);
|
|
15
|
-
$light-text-orange: darken(desaturate($orange, 60), 30);
|
|
16
|
-
$light-text-violet: darken(desaturate($violet, 60), 30);
|
|
17
|
-
|
|
18
|
-
$light-background-default: #ffffff;
|
|
19
|
-
|
|
20
|
-
$light-background-gray: rgba($gray, 0.6);
|
|
21
|
-
$light-background-blue: rgba($blue, 0.6);
|
|
22
|
-
$light-background-green: rgba($green, 0.6);
|
|
23
|
-
$light-background-red: rgba($red, 0.6);
|
|
24
|
-
$light-background-orange: rgba($orange, 0.6);
|
|
25
|
-
$light-background-violet: rgba($violet, 0.6);
|
|
26
|
-
|
|
27
|
-
$light-background-gray-hover: rgba($gray, 0.8);
|
|
28
|
-
$light-background-blue-hover: rgba($blue, 0.8);
|
|
29
|
-
$light-background-green-hover: rgba($green, 0.8);
|
|
30
|
-
$light-background-red-hover: rgba($red, 0.8);
|
|
31
|
-
$light-background-orange-hover: rgba($orange, 0.8);
|
|
32
|
-
$light-background-violet-hover: rgba($violet, 0.8);
|
|
33
|
-
|
|
34
|
-
// DARK ///////////////////////////
|
|
35
|
-
|
|
36
|
-
$dark-text-default: #cccccc;
|
|
37
|
-
$dark-text-default-hover: #ffffff;
|
|
38
|
-
|
|
39
|
-
$dark-background-default: #34383e;
|
|
40
|
-
|
|
41
|
-
$dark-background-blue: #1685ac;
|
|
42
|
-
$dark-background-green: #5d9d31;
|
|
43
|
-
$dark-background-red: #c33737;
|
|
44
|
-
$dark-background-orange: #d59622;
|
|
45
|
-
$dark-background-violet: #7750d2;
|
|
46
|
-
|
|
47
|
-
$dark-background-blue-hover: lighten($dark-background-blue, 5);
|
|
48
|
-
$dark-background-green-hover: lighten($dark-background-green, 5);
|
|
49
|
-
$dark-background-red-hover: lighten($dark-background-red, 5);
|
|
50
|
-
$dark-background-orange-hover: lighten($dark-background-orange, 5);
|
|
51
|
-
$dark-background-violet-hover: lighten($dark-background-violet, 5);
|
|
52
|
-
|
|
53
|
-
$black : rgb(0,0,0);
|
|
54
|
-
$black-90: rgb(25,25,25);
|
|
55
|
-
$black-85: rgb(38,38,38);
|
|
56
|
-
$black-80: rgb(51,51,51);
|
|
57
|
-
$black-70: rgb(74,74,74);
|
|
58
|
-
$black-60: rgb(102,102,102);
|
|
59
|
-
$black-50: rgb(127,127,127);
|
|
60
|
-
$black-40: rgb(153,153,153);
|
|
61
|
-
$black-30: rgb(178,178,178);
|
|
62
|
-
$black-20: rgb(204,204,204);
|
|
63
|
-
$black-10: rgb(229,229,229);
|
package/src/style.css
DELETED