@brandup/ui-kit 1.0.2 → 1.0.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 +7 -4
- package/package.json +1 -1
- package/source/common.less +1 -1
- package/source/inputs.less +86 -10
package/README.md
CHANGED
|
@@ -101,9 +101,12 @@ See [common.less](source/common.less) file.
|
|
|
101
101
|
### Input styles
|
|
102
102
|
|
|
103
103
|
Styles for:
|
|
104
|
-
|
|
105
|
-
- input
|
|
106
|
-
-
|
|
104
|
+
|
|
105
|
+
- reset for input, textarea, button
|
|
106
|
+
- input[type=text]
|
|
107
|
+
- input[type=checkbox]
|
|
108
|
+
- textarea
|
|
109
|
+
- select
|
|
107
110
|
|
|
108
111
|
See [inputs.less](source/inputs.less) file.
|
|
109
112
|
|
|
@@ -134,4 +137,4 @@ Open popup by only popup element:
|
|
|
134
137
|
PopupManager.open(DOM.getById("popup3"));
|
|
135
138
|
```
|
|
136
139
|
|
|
137
|
-
If the initiator is specified, then when the popup is opened again, it will be closed.
|
|
140
|
+
If the initiator is specified, then when the popup is opened again, it will be closed.
|
package/package.json
CHANGED
package/source/common.less
CHANGED
package/source/inputs.less
CHANGED
|
@@ -40,22 +40,30 @@
|
|
|
40
40
|
--invalid--input-border-color: red;
|
|
41
41
|
--invalid--input-fill: var(--input-fill);
|
|
42
42
|
--invalid--input-color: var(--input-color);
|
|
43
|
+
|
|
44
|
+
// toggler
|
|
45
|
+
--toggler-height: 30px;
|
|
46
|
+
--toggler-padding: 3px;
|
|
47
|
+
--toggler-round-fill: var(--hover--input-border-color); // цвет круглешка
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
input,
|
|
46
51
|
textarea,
|
|
47
|
-
button
|
|
48
|
-
|
|
52
|
+
button,
|
|
53
|
+
select {
|
|
49
54
|
font-family: inherit;
|
|
50
|
-
font-size:
|
|
55
|
+
font-size: var(--input-font-size);
|
|
56
|
+
font-weight: var(--input-font-weidth);
|
|
57
|
+
font-style: var(--input-font-style);
|
|
58
|
+
color: var(--input-color);
|
|
51
59
|
line-height: unset;
|
|
52
|
-
color: unset;
|
|
53
60
|
box-sizing: border-box;
|
|
54
61
|
padding: 0;
|
|
55
62
|
margin: 0;
|
|
56
63
|
}
|
|
57
64
|
|
|
58
|
-
input[type=text], textarea {
|
|
65
|
+
input[type=text], textarea, select {
|
|
66
|
+
appearance: none;
|
|
59
67
|
outline: none;
|
|
60
68
|
border-style: var(--input-border-type);
|
|
61
69
|
border-width: var(--input-border-width);
|
|
@@ -67,11 +75,6 @@ input[type=text], textarea {
|
|
|
67
75
|
padding-left: var(--input-padding-lr);
|
|
68
76
|
padding-right: var(--input-padding-lr);
|
|
69
77
|
|
|
70
|
-
font-size: var(--input-font-size);
|
|
71
|
-
font-weight: var(--input-font-weidth);
|
|
72
|
-
font-style: var(--input-font-style);
|
|
73
|
-
color: var(--input-color);
|
|
74
|
-
|
|
75
78
|
&::placeholder {
|
|
76
79
|
font-weight: var(--placeholder-font-weidth);
|
|
77
80
|
font-style: var(--placeholder-font-style);
|
|
@@ -101,7 +104,80 @@ input[type=text], textarea {
|
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
select {
|
|
108
|
+
appearance: auto;
|
|
109
|
+
}
|
|
110
|
+
|
|
104
111
|
textarea {
|
|
105
112
|
padding-top: calc(1em / 2);
|
|
106
113
|
padding-bottom: calc(1em / 2);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
input[type=checkbox] {
|
|
117
|
+
appearance: none;
|
|
118
|
+
position: relative;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
background-color: var(--input-fill);
|
|
122
|
+
border-style: var(--input-border-type);
|
|
123
|
+
border-width: var(--input-border-width);
|
|
124
|
+
border-color: var(--input-border-color);
|
|
125
|
+
border-radius: calc(var(--toggler-height) / 2);
|
|
126
|
+
|
|
127
|
+
height: var(--toggler-height);
|
|
128
|
+
width: calc(var(--toggler-height) * 2);
|
|
129
|
+
|
|
130
|
+
--round-size: calc(var(--toggler-height) - var(--toggler-padding) * 2 - var(--input-border-width) * 2);
|
|
131
|
+
|
|
132
|
+
&:after {
|
|
133
|
+
content: '';
|
|
134
|
+
position: absolute;
|
|
135
|
+
background-color: var(--toggler-round-fill);
|
|
136
|
+
width: var(--round-size);
|
|
137
|
+
height: var(--round-size);
|
|
138
|
+
border-radius: 50%;
|
|
139
|
+
left: var(--toggler-padding);
|
|
140
|
+
margin-top: auto;
|
|
141
|
+
margin-bottom: auto;
|
|
142
|
+
top: 0;
|
|
143
|
+
bottom: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:hover, &:focus {
|
|
147
|
+
border-color: var(--hover--input-border-color);
|
|
148
|
+
background: var(--hover--input-fill);
|
|
149
|
+
color: var(--hover--input-color);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&[readonly] {
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:checked {
|
|
157
|
+
background-color: var(--toggler-round-fill);
|
|
158
|
+
|
|
159
|
+
&:after {
|
|
160
|
+
background-color: var(--input-fill);
|
|
161
|
+
right: var(--toggler-padding);
|
|
162
|
+
left: auto;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:disabled {
|
|
167
|
+
border-color: var(--disabled--input-border-color);
|
|
168
|
+
background: var(--disabled--input-fill);
|
|
169
|
+
color: var(--disabled--input-color);
|
|
170
|
+
cursor: default;
|
|
171
|
+
|
|
172
|
+
&:after {
|
|
173
|
+
background-color: var(--toggler-round-fill);
|
|
174
|
+
opacity: 0.4;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:user-invalid {
|
|
179
|
+
border-color: var(--invalid--input-border-color);
|
|
180
|
+
background: var(--invalid--input-fill);
|
|
181
|
+
color: var(--invalid--input-color);
|
|
182
|
+
}
|
|
107
183
|
}
|