@thednp/color-picker 0.0.1-alpha1 → 0.0.1-alpha2
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/README.md +40 -19
- package/dist/css/color-picker.css +481 -337
- package/dist/css/color-picker.min.css +2 -0
- package/dist/css/color-picker.rtl.css +506 -0
- package/dist/css/color-picker.rtl.min.css +2 -0
- package/dist/js/color-picker-element-esm.js +3810 -2
- package/dist/js/color-picker-element-esm.min.js +2 -0
- package/dist/js/color-picker-element.js +2009 -1242
- package/dist/js/color-picker-element.min.js +2 -2
- package/dist/js/color-picker-esm.js +3704 -0
- package/dist/js/color-picker-esm.min.js +2 -0
- package/dist/js/color-picker.js +1962 -1256
- package/dist/js/color-picker.min.js +2 -2
- package/package.json +18 -9
- package/src/js/color-palette.js +62 -0
- package/src/js/color-picker-element.js +55 -13
- package/src/js/color-picker.js +686 -595
- package/src/js/color.js +615 -349
- package/src/js/index.js +0 -9
- package/src/js/util/colorNames.js +2 -152
- package/src/js/util/colorPickerLabels.js +22 -0
- package/src/js/util/getColorControls.js +103 -0
- package/src/js/util/getColorForm.js +27 -19
- package/src/js/util/getColorMenu.js +95 -0
- package/src/js/util/isValidJSON.js +13 -0
- package/src/js/util/nonColors.js +5 -0
- package/src/js/util/templates.js +1 -0
- package/src/scss/color-picker.rtl.scss +23 -0
- package/src/scss/color-picker.scss +430 -0
- package/types/cp.d.ts +263 -160
- package/types/index.d.ts +9 -2
- package/types/source/source.ts +2 -1
- package/types/source/types.d.ts +28 -5
- package/dist/js/color-picker.esm.js +0 -2998
- package/dist/js/color-picker.esm.min.js +0 -2
- package/src/js/util/getColorControl.js +0 -49
- package/src/js/util/init.js +0 -14
@@ -1,338 +1,482 @@
|
|
1
|
-
|
2
|
-
color-picker
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
color-picker
|
9
|
-
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
.
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
/*
|
69
|
-
.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
}
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
/*
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
.
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
.light .
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
.light .
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
:
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
.menu-toggle
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
.
|
159
|
-
|
160
|
-
|
161
|
-
.
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
.
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
.
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
186
|
-
|
187
|
-
.
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
.
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
.
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
}
|
205
|
-
|
206
|
-
.
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
}
|
224
|
-
|
225
|
-
|
226
|
-
max-
|
227
|
-
|
228
|
-
|
229
|
-
.color-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
.color-
|
240
|
-
|
241
|
-
|
242
|
-
}
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
.
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
.
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
.
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
:
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
:
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
1
|
+
/*!
|
2
|
+
* ColorPicker v0.0.1alpha2 (http://thednp.github.io/color-picker)
|
3
|
+
* Copyright 2022 © thednp
|
4
|
+
* Licensed under MIT (https://github.com/thednp/color-picker/blob/master/LICENSE)
|
5
|
+
*/
|
6
|
+
/* :host */
|
7
|
+
color-picker,
|
8
|
+
.color-picker {
|
9
|
+
position: relative;
|
10
|
+
display: flex;
|
11
|
+
}
|
12
|
+
|
13
|
+
color-picker:focus,
|
14
|
+
.color-picker:focus {
|
15
|
+
outline: none;
|
16
|
+
}
|
17
|
+
|
18
|
+
/* color-dropdown */
|
19
|
+
.color-dropdown {
|
20
|
+
position: absolute;
|
21
|
+
z-index: 50;
|
22
|
+
display: none;
|
23
|
+
flex-direction: column;
|
24
|
+
width: min-content;
|
25
|
+
padding: 0.5rem;
|
26
|
+
color: rgba(255, 255, 255, 0.8);
|
27
|
+
background: rgba(0, 0, 0, 0.75);
|
28
|
+
border-radius: 0.5rem;
|
29
|
+
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
|
30
|
+
opacity: 0;
|
31
|
+
transition: transform 0.33s ease, opacity 0.33s ease;
|
32
|
+
}
|
33
|
+
|
34
|
+
.color-dropdown.picker {
|
35
|
+
left: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.color-dropdown.menu {
|
39
|
+
right: 0;
|
40
|
+
}
|
41
|
+
|
42
|
+
.open .color-dropdown.top {
|
43
|
+
top: auto;
|
44
|
+
bottom: 100%;
|
45
|
+
}
|
46
|
+
|
47
|
+
.color-dropdown.bottom {
|
48
|
+
top: 100%;
|
49
|
+
}
|
50
|
+
|
51
|
+
.open .color-dropdown.top,
|
52
|
+
.open .color-dropdown.bottom {
|
53
|
+
display: flex;
|
54
|
+
}
|
55
|
+
|
56
|
+
.color-dropdown.show {
|
57
|
+
opacity: 1;
|
58
|
+
}
|
59
|
+
|
60
|
+
.color-dropdown.show.top {
|
61
|
+
transform: translate(0, -5px);
|
62
|
+
}
|
63
|
+
|
64
|
+
.color-dropdown.show.bottom {
|
65
|
+
transform: translate(0, 5px);
|
66
|
+
}
|
67
|
+
|
68
|
+
/* color-controls */
|
69
|
+
.color-controls {
|
70
|
+
display: none;
|
71
|
+
flex-wrap: wrap;
|
72
|
+
justify-content: space-between;
|
73
|
+
width: max-content;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* btn-appearance */
|
77
|
+
.btn-appearance {
|
78
|
+
width: 100%;
|
79
|
+
height: 1.5rem;
|
80
|
+
padding: 0.6rem 1rem;
|
81
|
+
font-size: 1rem;
|
82
|
+
line-height: 1.5;
|
83
|
+
border: 0;
|
84
|
+
border-radius: 0.25rem;
|
85
|
+
outline: none;
|
86
|
+
appearance: none;
|
87
|
+
transition-duration: 0.33s;
|
88
|
+
transition-property: box-shadow, border;
|
89
|
+
}
|
90
|
+
|
91
|
+
.btn-appearance:focus,
|
92
|
+
.btn-appearance:hover {
|
93
|
+
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
|
94
|
+
}
|
95
|
+
|
96
|
+
/* color-preview */
|
97
|
+
.color-preview {
|
98
|
+
box-shadow: 0 0 0 1px rgba(120, 120, 120, 0.33) inset;
|
99
|
+
direction: ltr;
|
100
|
+
/* color value can never be rtl */
|
101
|
+
}
|
102
|
+
|
103
|
+
.txt-dark .color-preview {
|
104
|
+
color: rgba(255, 255, 255, 0.8);
|
105
|
+
}
|
106
|
+
|
107
|
+
.txt-dark .color-preview:focus {
|
108
|
+
box-shadow: 0 0 0 1px white inset, 0 0 0 3px rgba(0, 0, 0, 0.15);
|
109
|
+
}
|
110
|
+
|
111
|
+
.txt-dark .color-preview::placeholder {
|
112
|
+
color: rgba(255, 255, 255, 0.6);
|
113
|
+
}
|
114
|
+
|
115
|
+
.txt-light .color-preview {
|
116
|
+
color: rgba(0, 0, 0, 0.8);
|
117
|
+
}
|
118
|
+
|
119
|
+
.txt-light .color-preview:focus {
|
120
|
+
color: rgba(0, 0, 0, 0.8);
|
121
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset, 0 0 0 3px rgba(0, 0, 0, 0.15);
|
122
|
+
}
|
123
|
+
|
124
|
+
.txt-light .color-preview::placeholder {
|
125
|
+
color: rgba(0, 0, 0, 0.6);
|
126
|
+
}
|
127
|
+
|
128
|
+
/* picker-toggle */
|
129
|
+
.picker-toggle {
|
130
|
+
position: absolute;
|
131
|
+
top: 0;
|
132
|
+
left: 0;
|
133
|
+
width: 100%;
|
134
|
+
height: 100%;
|
135
|
+
background: transparent;
|
136
|
+
border: 0;
|
137
|
+
}
|
138
|
+
|
139
|
+
.open .picker-toggle {
|
140
|
+
z-index: -1;
|
141
|
+
}
|
142
|
+
|
143
|
+
/* menu-toggle */
|
144
|
+
.menu-toggle {
|
145
|
+
position: absolute;
|
146
|
+
top: 0;
|
147
|
+
right: 0;
|
148
|
+
display: flex;
|
149
|
+
width: 3rem;
|
150
|
+
height: 100%;
|
151
|
+
padding: 0 0.25rem;
|
152
|
+
cursor: pointer;
|
153
|
+
border: 0;
|
154
|
+
border-radius: 0 0.25rem 0.25rem 0;
|
155
|
+
}
|
156
|
+
|
157
|
+
.txt-light .menu-toggle {
|
158
|
+
background: rgba(0, 0, 0, 0.5);
|
159
|
+
}
|
160
|
+
|
161
|
+
.txt-light .menu-toggle:focus,
|
162
|
+
.txt-light .menu-toggle:focus {
|
163
|
+
background: rgba(0, 0, 0, 0.7);
|
164
|
+
}
|
165
|
+
|
166
|
+
.txt-dark .menu-toggle {
|
167
|
+
background: rgba(255, 255, 255, 0.33);
|
168
|
+
}
|
169
|
+
|
170
|
+
.txt-dark .menu-toggle:focus,
|
171
|
+
.txt-dark .menu-toggle:focus {
|
172
|
+
background: rgba(255, 255, 255, 0.5);
|
173
|
+
}
|
174
|
+
|
175
|
+
.menu-toggle svg {
|
176
|
+
width: auto;
|
177
|
+
height: 100%;
|
178
|
+
}
|
179
|
+
|
180
|
+
/* scrollable */
|
181
|
+
.scrollable {
|
182
|
+
overflow-x: hidden;
|
183
|
+
overflow-y: auto;
|
184
|
+
scrollbar-width: thin;
|
185
|
+
}
|
186
|
+
|
187
|
+
.scrollable::-webkit-scrollbar {
|
188
|
+
width: 0.5rem;
|
189
|
+
}
|
190
|
+
|
191
|
+
.scrollable::-webkit-scrollbar-track {
|
192
|
+
background-color: transparent;
|
193
|
+
}
|
194
|
+
|
195
|
+
.scrollable::-webkit-scrollbar-thumb {
|
196
|
+
width: 0.5rem;
|
197
|
+
background-color: transparent;
|
198
|
+
background-clip: content-box;
|
199
|
+
border: 0;
|
200
|
+
}
|
201
|
+
|
202
|
+
.scrollable:hover::-webkit-scrollbar-thumb {
|
203
|
+
background-color: rgba(255, 255, 255, 0.33);
|
204
|
+
}
|
205
|
+
|
206
|
+
.scrollable::-webkit-scrollbar-thumb:hover {
|
207
|
+
background-color: #fff;
|
208
|
+
}
|
209
|
+
|
210
|
+
/* color-defaults */
|
211
|
+
.color-defaults {
|
212
|
+
display: none;
|
213
|
+
flex-wrap: wrap;
|
214
|
+
flex-flow: column;
|
215
|
+
margin: 0;
|
216
|
+
list-style: none;
|
217
|
+
padding-inline: 0;
|
218
|
+
}
|
219
|
+
|
220
|
+
.color-dropdown.menu .color-defaults,
|
221
|
+
.color-dropdown.picker .color-controls {
|
222
|
+
display: flex;
|
223
|
+
}
|
224
|
+
|
225
|
+
.color-dropdown.menu {
|
226
|
+
max-height: 230px;
|
227
|
+
}
|
228
|
+
|
229
|
+
.color-defaults .color-option {
|
230
|
+
padding: 0.25rem 0.5rem;
|
231
|
+
color: inherit;
|
232
|
+
}
|
233
|
+
|
234
|
+
.color-option {
|
235
|
+
cursor: pointer;
|
236
|
+
}
|
237
|
+
|
238
|
+
.color-defaults .color-option:focus,
|
239
|
+
.color-defaults .color-option:hover {
|
240
|
+
background: rgba(255, 255, 255, 0.3);
|
241
|
+
outline: none;
|
242
|
+
}
|
243
|
+
|
244
|
+
.color-defaults .color-option:active,
|
245
|
+
.color-defaults .color-option.active {
|
246
|
+
color: #000;
|
247
|
+
background: #fff;
|
248
|
+
}
|
249
|
+
|
250
|
+
/* color-options grid */
|
251
|
+
.color-options {
|
252
|
+
display: grid;
|
253
|
+
padding: 0;
|
254
|
+
margin: 0;
|
255
|
+
list-style: none;
|
256
|
+
}
|
257
|
+
|
258
|
+
.color-options.scrollable {
|
259
|
+
margin: 0 -0.5rem 0 0;
|
260
|
+
overflow-y: scroll;
|
261
|
+
transition: height 0.33s ease;
|
262
|
+
}
|
263
|
+
|
264
|
+
.multiline + .color-defaults {
|
265
|
+
flex-direction: row;
|
266
|
+
flex-wrap: wrap;
|
267
|
+
margin-top: 0.25rem;
|
268
|
+
}
|
269
|
+
.multiline + .color-defaults .color-option {
|
270
|
+
padding: 0.25rem 0.33rem;
|
271
|
+
font-size: 12px;
|
272
|
+
}
|
273
|
+
|
274
|
+
.color-options .color-option {
|
275
|
+
position: relative;
|
276
|
+
overflow: hidden;
|
277
|
+
text-indent: 2.1rem;
|
278
|
+
background: #eee;
|
279
|
+
opacity: 0.8;
|
280
|
+
}
|
281
|
+
|
282
|
+
.color-options .color-option:hover,
|
283
|
+
.color-options .color-option:active,
|
284
|
+
.color-options .color-option:focus {
|
285
|
+
opacity: 1;
|
286
|
+
}
|
287
|
+
|
288
|
+
.color-options .color-option:active,
|
289
|
+
.color-options .color-option:focus {
|
290
|
+
outline: none;
|
291
|
+
}
|
292
|
+
|
293
|
+
.color-options .color-option:active,
|
294
|
+
.color-options .color-option:focus {
|
295
|
+
box-shadow: 0 0 0 4px rgba(125, 125, 125, 0.75) inset;
|
296
|
+
}
|
297
|
+
|
298
|
+
.color-options .color-option.active {
|
299
|
+
opacity: 1;
|
300
|
+
}
|
301
|
+
.color-options .color-option.active:after {
|
302
|
+
position: absolute;
|
303
|
+
top: 50%;
|
304
|
+
left: 50%;
|
305
|
+
width: 4px;
|
306
|
+
height: 4px;
|
307
|
+
margin: -2px 0 0 -2px;
|
308
|
+
content: " ";
|
309
|
+
border-radius: 4px;
|
310
|
+
}
|
311
|
+
|
312
|
+
.txt-dark .color-options .color-option.active:after {
|
313
|
+
box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
|
314
|
+
}
|
315
|
+
|
316
|
+
.txt-light .color-options .color-option.active:after {
|
317
|
+
box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.9);
|
318
|
+
}
|
319
|
+
|
320
|
+
/* color-form */
|
321
|
+
.color-form {
|
322
|
+
display: flex;
|
323
|
+
flex-direction: row;
|
324
|
+
flex-wrap: wrap;
|
325
|
+
align-items: center;
|
326
|
+
padding: 0.5rem 0 0;
|
327
|
+
font: 12px sans-serif;
|
328
|
+
}
|
329
|
+
|
330
|
+
.color-form.hex {
|
331
|
+
max-width: initial;
|
332
|
+
}
|
333
|
+
|
334
|
+
.color-form > * {
|
335
|
+
flex: 1 0 0%;
|
336
|
+
width: 17.5%;
|
337
|
+
max-width: 17.5%;
|
338
|
+
}
|
339
|
+
|
340
|
+
.color-form label {
|
341
|
+
width: 7.5%;
|
342
|
+
max-width: 7.5%;
|
343
|
+
text-align: center;
|
344
|
+
}
|
345
|
+
|
346
|
+
.color-input {
|
347
|
+
color: inherit;
|
348
|
+
text-align: right;
|
349
|
+
background: transparent;
|
350
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
351
|
+
outline: none;
|
352
|
+
}
|
353
|
+
|
354
|
+
.color-input.hex {
|
355
|
+
width: 92.5%;
|
356
|
+
max-width: 92.5%;
|
357
|
+
/* width: calc(100% - 4% - 1rem); */
|
358
|
+
}
|
359
|
+
|
360
|
+
.color-input:active,
|
361
|
+
.color-input:focus {
|
362
|
+
background: rgba(0, 0, 0, 0.25);
|
363
|
+
border: 1px solid rgba(255, 255, 255, 0.33);
|
364
|
+
}
|
365
|
+
|
366
|
+
/* visual control */
|
367
|
+
.visual-control {
|
368
|
+
height: 150px;
|
369
|
+
}
|
370
|
+
|
371
|
+
.visual-control1 {
|
372
|
+
width: 150px;
|
373
|
+
}
|
374
|
+
|
375
|
+
.visual-control2,
|
376
|
+
.visual-control3 {
|
377
|
+
width: 21px;
|
378
|
+
cursor: ns-resize;
|
379
|
+
}
|
380
|
+
|
381
|
+
@media (min-width: 578px) {
|
382
|
+
.visual-control {
|
383
|
+
height: 230px;
|
384
|
+
}
|
385
|
+
|
386
|
+
.visual-control1 {
|
387
|
+
width: 230px;
|
388
|
+
}
|
389
|
+
}
|
390
|
+
@media (min-width: 1200px) {
|
391
|
+
.visual-control {
|
392
|
+
height: 300px;
|
393
|
+
}
|
394
|
+
|
395
|
+
.visual-control1 {
|
396
|
+
width: 300px;
|
397
|
+
}
|
398
|
+
}
|
399
|
+
.color-control {
|
400
|
+
position: relative;
|
401
|
+
display: inline-block;
|
402
|
+
}
|
403
|
+
|
404
|
+
.color-slider {
|
405
|
+
left: 0;
|
406
|
+
width: calc(100% - 2px);
|
407
|
+
cursor: ns-resize;
|
408
|
+
}
|
409
|
+
|
410
|
+
.color-control + .color-control {
|
411
|
+
margin-left: 0.5rem;
|
412
|
+
}
|
413
|
+
|
414
|
+
/* knob */
|
415
|
+
.knob {
|
416
|
+
position: absolute;
|
417
|
+
top: 0;
|
418
|
+
left: 0;
|
419
|
+
height: 7px;
|
420
|
+
user-select: none;
|
421
|
+
background-color: #000;
|
422
|
+
border: 1px solid #fff;
|
423
|
+
outline: none;
|
424
|
+
will-change: transform;
|
425
|
+
}
|
426
|
+
|
427
|
+
.knob:hover {
|
428
|
+
box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.5);
|
429
|
+
}
|
430
|
+
|
431
|
+
.knob:focus,
|
432
|
+
.knob:active {
|
433
|
+
z-index: 1;
|
434
|
+
box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9);
|
435
|
+
}
|
436
|
+
|
437
|
+
/* color-pointer */
|
438
|
+
.color-pointer {
|
439
|
+
width: 7px;
|
440
|
+
background-color: transparent;
|
441
|
+
border: 0;
|
442
|
+
border-radius: 5px;
|
443
|
+
}
|
444
|
+
|
445
|
+
.txt-dark .color-pointer {
|
446
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.5);
|
447
|
+
}
|
448
|
+
|
449
|
+
.txt-light .color-pointer {
|
450
|
+
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.5);
|
451
|
+
}
|
452
|
+
|
453
|
+
.txt-dark .color-pointer:hover {
|
454
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.75);
|
455
|
+
}
|
456
|
+
|
457
|
+
.txt-light .color-pointer:hover {
|
458
|
+
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.75);
|
459
|
+
}
|
460
|
+
|
461
|
+
.txt-dark .color-pointer:focus,
|
462
|
+
.txt-dark .color-pointer:active {
|
463
|
+
box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9);
|
464
|
+
}
|
465
|
+
|
466
|
+
.txt-light .color-pointer:focus,
|
467
|
+
.txt-light .color-pointer:active {
|
468
|
+
box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.9);
|
469
|
+
}
|
470
|
+
|
471
|
+
/* utility */
|
472
|
+
.v-hidden {
|
473
|
+
position: absolute !important;
|
474
|
+
width: 1px !important;
|
475
|
+
height: 1px !important;
|
476
|
+
padding: 0 !important;
|
477
|
+
margin: -1px !important;
|
478
|
+
overflow: hidden !important;
|
479
|
+
clip: rect(0, 0, 0, 0) !important;
|
480
|
+
white-space: nowrap !important;
|
481
|
+
border: 0 !important;
|
338
482
|
}
|