uniform-ui 3.0.0.beta8 → 3.0.0.beta10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets/javascripts/uniform/checkbox.js +12 -12
- data/lib/assets/javascripts/uniform/component.js +17 -13
- data/lib/assets/javascripts/uniform/dropdown.js +54 -54
- data/lib/assets/javascripts/uniform/dropzone.js +107 -0
- data/lib/assets/javascripts/uniform/floating-label-input.js +8 -8
- data/lib/assets/javascripts/uniform/modal.js +12 -12
- data/lib/assets/javascripts/uniform/popover.js +54 -33
- data/lib/assets/javascripts/uniform/resizer.js +20 -20
- data/lib/assets/javascripts/uniform/select.js +186 -162
- data/lib/assets/javascripts/uniform/sticker.js +26 -0
- data/lib/assets/javascripts/uniform/tooltip.js +29 -16
- data/lib/assets/javascripts/uniform.js +12 -10
- data/lib/assets/stylesheets/uniform/base.scss +20 -5
- data/lib/assets/stylesheets/uniform/components/buttons.scss +4 -5
- data/lib/assets/stylesheets/uniform/components/checkbox.scss +2 -0
- data/lib/assets/stylesheets/uniform/components/container.scss +8 -7
- data/lib/assets/stylesheets/uniform/components/dropzone.scss +40 -0
- data/lib/assets/stylesheets/uniform/components/pointer.scss +4 -4
- data/lib/assets/stylesheets/uniform/components/select.scss +7 -2
- data/lib/assets/stylesheets/uniform/components/thumb.scss +0 -1
- data/lib/assets/stylesheets/uniform/components/z-input.scss +1 -1
- data/lib/assets/stylesheets/uniform/config.scss +156 -0
- data/lib/assets/stylesheets/uniform/defaults.scss +2 -23
- data/lib/assets/stylesheets/uniform/functions/icons.scss +29 -0
- data/lib/assets/stylesheets/uniform/functions/map.scss +95 -0
- data/lib/assets/stylesheets/uniform/functions/string.scss +15 -0
- data/lib/assets/stylesheets/uniform/functions.scss +4 -79
- data/lib/assets/stylesheets/uniform/mixins.scss +34 -26
- data/lib/assets/stylesheets/uniform/utilities/effects.scss +31 -0
- data/lib/assets/stylesheets/uniform/utilities/layout.scss +13 -20
- data/lib/assets/stylesheets/uniform/utilities/position.scss +4 -0
- data/lib/assets/stylesheets/uniform/utilities/text.scss +1 -0
- data/lib/assets/stylesheets/uniform/utilities.scss +6 -0
- data/lib/uniform/version.rb +1 -1
- metadata +9 -3
- data/lib/assets/stylesheets/uniform/variables.scss +0 -145
@@ -7,8 +7,8 @@ export default class Resizer extends Component {
|
|
7
7
|
const breakpoints = getComputedStyle(window.document.body).getPropertyValue('--breakpoints')
|
8
8
|
this.breakpoints = {}
|
9
9
|
breakpoints.split(",").forEach(breakpoint => {
|
10
|
-
|
11
|
-
|
10
|
+
const [key, value] = breakpoint.split("/")
|
11
|
+
this.breakpoints[key.trim()] = value;
|
12
12
|
})
|
13
13
|
|
14
14
|
this.listenTo(window, 'resize', this.resize);
|
@@ -16,24 +16,24 @@ export default class Resizer extends Component {
|
|
16
16
|
}
|
17
17
|
|
18
18
|
resize () {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
const width = this.el.offsetWidth;
|
20
|
+
Object.keys(this.breakpoints).forEach(size => {
|
21
|
+
const query = this.breakpoints[size]
|
22
|
+
const css_class = size + '-container'
|
23
|
+
let [attribute, value] = query.split(":")
|
24
|
+
if(value.match("px")){
|
25
|
+
value = parseInt(value)
|
26
|
+
} else {
|
27
|
+
throw "unsupported media units"
|
28
|
+
}
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
30
|
+
if(attribute == "min-width") {
|
31
|
+
this.el.classList.toggle(css_class, width > value)
|
32
|
+
} else if (attribute == "max-width") {
|
33
|
+
this.el.classList.toggle(css_class, width < value)
|
34
|
+
} else {
|
35
|
+
throw "unsupported media feature"
|
36
|
+
}
|
37
|
+
});
|
38
38
|
}
|
39
39
|
}
|
@@ -23,196 +23,220 @@ import { createElement, HTML_ATTRIBUTES, filter, css, isEmpty, trigger } from 'd
|
|
23
23
|
*/
|
24
24
|
export default class Select extends Component {
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
text: option
|
26
|
+
initialize (options = {}) {
|
27
|
+
this.options = {
|
28
|
+
multiple: false,
|
29
|
+
limit: 8,
|
30
|
+
container: false
|
32
31
|
}
|
33
|
-
|
34
|
-
return {
|
35
|
-
value: option[1],
|
36
|
-
text: option[0],
|
37
|
-
selected: option[2]
|
38
|
-
}
|
39
|
-
} else if (typeof option == "object") {
|
40
|
-
return option
|
41
|
-
} else {
|
42
|
-
throw "option of unexpected type"
|
43
|
-
}
|
44
|
-
});
|
45
|
-
this.options = {
|
46
|
-
multiple: false,
|
47
|
-
limit: 8,
|
48
|
-
container: false
|
49
|
-
}
|
50
|
-
Object.assign(this.options, this.pick(options, Object.keys(this.options)));
|
32
|
+
Object.assign(this.options, this.pick(options, Object.keys(this.options)));
|
51
33
|
|
52
|
-
|
53
|
-
|
54
|
-
|
34
|
+
this.el_options = Object.assign({}, this.pick(options, HTML_ATTRIBUTES));
|
35
|
+
this.el = createElement('button', this.el_options);
|
36
|
+
this.el.type = "button";
|
37
|
+
this.el.classList.add('uniformSelect');
|
55
38
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
39
|
+
this.listenTo(this.el, 'click', this.toggleOptions);
|
40
|
+
this.listenTo(this.el, 'click', '.uniformSelect-remove', this.removeSelection);
|
41
|
+
this.listenTo(this.el, 'change', 'select', this.renderValue);
|
42
|
+
this.listenTo(this.el, 'close', 'select', this.removeOptions);
|
43
|
+
|
44
|
+
if (options.options) {
|
45
|
+
this.htmlOptions = options.options.map(option => {
|
46
|
+
if(typeof option == "string") {
|
47
|
+
return {
|
48
|
+
value: option,
|
49
|
+
text: option
|
50
|
+
}
|
51
|
+
} else if (Array.isArray(option)){
|
52
|
+
return {
|
53
|
+
value: option[1],
|
54
|
+
text: option[0],
|
55
|
+
selected: option[2]
|
56
|
+
}
|
57
|
+
} else if (typeof option == "object") {
|
58
|
+
return option
|
59
|
+
} else {
|
60
|
+
throw "option of unexpected type"
|
61
|
+
}
|
62
|
+
});
|
63
|
+
}
|
64
|
+
|
65
|
+
if (options.el) {
|
66
|
+
this.select = options.el;
|
67
|
+
this.el.setAttribute('class', this.select.getAttribute('class'))
|
68
|
+
this.el.classList.add('uniformSelect')
|
69
|
+
if (!this.htmlOptions) {
|
70
|
+
this.htmlOptions = Array.from(this.select.querySelectorAll('option')).map(option => {
|
71
|
+
return {
|
72
|
+
value: option.value,
|
73
|
+
text: option.innerHTML,
|
74
|
+
selected: option.selected
|
75
|
+
}
|
76
|
+
})
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
61
80
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
81
|
+
render () {
|
82
|
+
this.valueEl = createElement('span');
|
83
|
+
this.valueEl.classList.add('uniformSelect-value')
|
84
|
+
this.el.append(this.valueEl);
|
66
85
|
|
67
|
-
|
68
|
-
|
69
|
-
|
86
|
+
this.indicatorEl = createElement('span', {children: arrowIcon})
|
87
|
+
this.indicatorEl.classList.add('uniformSelect-indicator')
|
88
|
+
this.el.append(this.indicatorEl);
|
70
89
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
90
|
+
if (this.select) {
|
91
|
+
this.select.replaceWith(this.el);
|
92
|
+
this.select.innerHTML = '';
|
93
|
+
} else {
|
94
|
+
this.select = createElement('select', this.el_options);
|
95
|
+
}
|
96
|
+
this.htmlOptions.forEach(option => {
|
97
|
+
this.select.append(createElement('option', Object.assign({}, {children: option.text}, option)))
|
98
|
+
});
|
99
|
+
this.el.append(this.select);
|
76
100
|
|
77
101
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
102
|
+
// Append placeholder of longest option, to set width
|
103
|
+
const longestText = this.htmlOptions.map(x => x.text).sort((a, b) => a.length < b.length)[0]
|
104
|
+
const placeholder = createElement('span', {class: 'uniformSelect-placeholder', children: longestText})
|
105
|
+
this.el.append(placeholder);
|
82
106
|
|
83
|
-
|
84
|
-
|
85
|
-
|
107
|
+
this.renderValue();
|
108
|
+
return this;
|
109
|
+
}
|
86
110
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
111
|
+
renderValue () {
|
112
|
+
const selectedOptions = filter(this.select.querySelectorAll("option"), el => el.selected);
|
113
|
+
const html = selectedOptions.map(el => this.options.multiple ? `
|
114
|
+
<span class="uniformSelect-selection">
|
115
|
+
<span>${el.textContent}</span><span class="uniformSelect-remove">${xIcon}</span>
|
116
|
+
</span>
|
117
|
+
` : el.textContent).join(" ");
|
94
118
|
|
95
|
-
|
96
|
-
}
|
97
|
-
|
98
|
-
selectOption (e) {
|
99
|
-
const makeActive = !e.target.option.selected;
|
100
|
-
if (!this.options.multiple && makeActive) {
|
101
|
-
e.target.offsetParent.querySelectorAll('.active').forEach(el => el.classList.remove('active'));
|
119
|
+
this.valueEl.innerHTML = html;
|
102
120
|
}
|
103
|
-
|
104
|
-
e
|
121
|
+
|
122
|
+
selectOption (e) {
|
123
|
+
const makeActive = !e.target.option.selected;
|
124
|
+
if (!this.options.multiple && makeActive) {
|
125
|
+
e.target.offsetParent.querySelectorAll('.active').forEach(el => el.classList.remove('active'));
|
126
|
+
}
|
127
|
+
e.target.classList.toggle('active', makeActive);
|
128
|
+
e.target.option.selected = makeActive;
|
105
129
|
|
106
|
-
|
107
|
-
|
108
|
-
|
130
|
+
if (!this.options.multiple) {
|
131
|
+
this.removeOptions();
|
132
|
+
}
|
109
133
|
|
110
|
-
|
111
|
-
|
134
|
+
trigger(this.select, 'change');
|
135
|
+
}
|
112
136
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
137
|
+
removeSelection (e) {
|
138
|
+
e.preventDefault();
|
139
|
+
e.stopPropagation();
|
140
|
+
var option = filter(this.select.querySelectorAll("option"), function(el){
|
141
|
+
return el.innerText.trim() == e.target.closest('.uniformSelect-selection').innerText.trim();
|
142
|
+
})[0];
|
143
|
+
if(!option) return;
|
144
|
+
option.selected = false;
|
145
|
+
option.button.classList.remove('active');
|
122
146
|
|
123
|
-
|
124
|
-
}
|
125
|
-
|
126
|
-
toggleOptions (e) {
|
127
|
-
if(e && (e.target.matches('.uniformSelect-remove') || e.target.closest('.uniformSelect-remove'))){
|
128
|
-
return;
|
147
|
+
trigger(this.select, 'change');
|
129
148
|
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
149
|
+
|
150
|
+
toggleOptions (e) {
|
151
|
+
if(e && (e.target.matches('.uniformSelect-remove') || e.target.closest('.uniformSelect-remove'))){
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
this.el.classList.toggle('active')
|
155
|
+
if(this.el.classList.contains('active')){
|
156
|
+
this.renderOptions()
|
157
|
+
} else {
|
158
|
+
this.popover.toggle(false)
|
159
|
+
}
|
135
160
|
}
|
136
|
-
}
|
137
161
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
162
|
+
renderOptions () {
|
163
|
+
const options = createElement("div", {
|
164
|
+
class: 'uniformSelect-options'
|
165
|
+
});
|
142
166
|
|
143
|
-
|
167
|
+
options.style.fontSize = css(this.el, 'font-size')
|
144
168
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
169
|
+
this.select.querySelectorAll('option').forEach(function(option, index){
|
170
|
+
var button = createElement("button", {
|
171
|
+
type: 'button',
|
172
|
+
class: 'uniformSelect-option'
|
173
|
+
});
|
174
|
+
button.option = option;
|
175
|
+
option.button = button;
|
176
|
+
button.textContent = option.textContent;
|
177
|
+
button.value = option.value;
|
178
|
+
if (button.textContent == "") button.innerHTML = "<span class='text-italic text-muted'>None</span>";
|
179
|
+
button.classList.toggle('active', option.selected);
|
156
180
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
}, this);
|
181
|
+
if (this.options.limit && (index + 1) > this.options.limit) {
|
182
|
+
button.classList.add('hide')
|
183
|
+
}
|
184
|
+
options.append(button);
|
185
|
+
}, this);
|
163
186
|
|
164
|
-
|
187
|
+
this.listenTo(options, 'click', '.uniformSelect-option', this.selectOption);
|
165
188
|
|
166
189
|
|
167
|
-
|
168
|
-
|
169
|
-
|
190
|
+
const actions = createElement('div', {
|
191
|
+
class: 'uniformSelect-actions'
|
192
|
+
});
|
170
193
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
194
|
+
if (this.options.limit && this.htmlOptions.length > this.options.limit) {
|
195
|
+
const button = createElement('button', {
|
196
|
+
type: 'button',
|
197
|
+
class: 'uniformSelect-show-all',
|
198
|
+
children: 'Show All'
|
199
|
+
});
|
200
|
+
this.listenTo(button, 'click', this.showAllOptions.bind(this))
|
201
|
+
actions.append(button);
|
202
|
+
}
|
203
|
+
if (this.options.multiple) {
|
204
|
+
const button = createElement('button', {
|
205
|
+
type: 'button',
|
206
|
+
class: 'uniformSelect-done',
|
207
|
+
children: ['Done']
|
208
|
+
});
|
209
|
+
this.listenTo(button, 'click', this.removeOptions.bind(this));
|
210
|
+
actions.append(button);
|
211
|
+
}
|
212
|
+
if (!isEmpty(actions)) {
|
213
|
+
options.append(actions);
|
214
|
+
}
|
192
215
|
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
216
|
+
this.popover = new Popover({
|
217
|
+
offset: {top: 1},
|
218
|
+
align: '0px bottom',
|
219
|
+
anchor: this.el,
|
220
|
+
content: options,
|
221
|
+
container: this.options.container,
|
222
|
+
transition: 'transition-fade-up'
|
223
|
+
}).render()
|
200
224
|
|
201
|
-
|
202
|
-
|
225
|
+
this.listenTo(this.popover, 'hidden', this.removeOptions);
|
226
|
+
}
|
203
227
|
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
228
|
+
removeOptions () {
|
229
|
+
this.el.classList.remove('active')
|
230
|
+
if (!this.popover) return;
|
231
|
+
this.popover.remove()
|
232
|
+
}
|
209
233
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
234
|
+
showAllOptions (e) {
|
235
|
+
e.preventDefault();
|
236
|
+
e.stopPropagation();
|
237
|
+
if(!this.popover) return;
|
238
|
+
this.popover.el.querySelectorAll('button.hide').forEach(el => el.classList.remove('hide'));
|
239
|
+
var button = this.popover.el.querySelector('.uniformSelect-show-all');
|
240
|
+
button.parentNode.removeChild(button);
|
241
|
+
}
|
218
242
|
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export default class Sticker {
|
2
|
+
constructor (el) {
|
3
|
+
if (!window.uniformObserver) {
|
4
|
+
window.uniformObserver = new IntersectionObserver(
|
5
|
+
entries => entries.forEach(entry => {
|
6
|
+
if (entry.intersectionRatio == 0) {
|
7
|
+
this.stick(el)
|
8
|
+
} else {
|
9
|
+
this.unstick(el)
|
10
|
+
}
|
11
|
+
}),
|
12
|
+
{threshold: [0.994, 0.00001]},
|
13
|
+
)
|
14
|
+
}
|
15
|
+
|
16
|
+
window.uniformObserver.observe(el)
|
17
|
+
}
|
18
|
+
|
19
|
+
stick (el) {
|
20
|
+
|
21
|
+
}
|
22
|
+
|
23
|
+
unstick (el) {
|
24
|
+
|
25
|
+
}
|
26
|
+
}
|
@@ -13,6 +13,7 @@ import Popover from './popover';
|
|
13
13
|
disable
|
14
14
|
hide
|
15
15
|
show
|
16
|
+
timeout
|
16
17
|
*/
|
17
18
|
export default class Tooltip extends Component {
|
18
19
|
initialize (options) {
|
@@ -27,6 +28,7 @@ export default class Tooltip extends Component {
|
|
27
28
|
this.enabled = true;
|
28
29
|
this.content = options.content;
|
29
30
|
this.el.tooltip = this;
|
31
|
+
this.timeout = options.timeout
|
30
32
|
|
31
33
|
this.listenTo(this.el, 'mouseenter', this.show);
|
32
34
|
this.listenTo(this.el, 'mouseleave', this.hide);
|
@@ -41,27 +43,38 @@ export default class Tooltip extends Component {
|
|
41
43
|
clearTimeout(this.hide_timeout);
|
42
44
|
this.el.classList.add('-active');
|
43
45
|
if (this.popup) {
|
44
|
-
|
46
|
+
this.popup.show()
|
45
47
|
} else {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
48
|
+
const pointerDirection = {
|
49
|
+
top: 'bottom',
|
50
|
+
bottom: 'top',
|
51
|
+
left: 'right',
|
52
|
+
right: 'left'
|
53
|
+
}[this.options.align]
|
54
|
+
const align = {
|
55
|
+
left: 'left center',
|
56
|
+
right: 'right center',
|
57
|
+
top: 'center top',
|
58
|
+
bottom: 'center bottom'
|
59
|
+
}[this.options.align]
|
60
|
+
const offset = { [this.options.align]: -7}
|
61
|
+
this.popup = new Popover({
|
62
|
+
content: this.content,
|
63
|
+
class: `uniformPointer -${pointerDirection} bg-gray-70 bg-opacity-85 text-white rounded pad-1/2x text-sm max-width-300-px `,
|
64
|
+
anchor: this.el,
|
65
|
+
align: align || this.options.align || 'center 100%',
|
66
|
+
offset: offset,
|
67
|
+
container: this.options.container
|
68
|
+
}).render();
|
56
69
|
}
|
57
70
|
}
|
58
71
|
|
59
72
|
hide () {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
73
|
+
this.hide_timeout = setTimeout(() => {
|
74
|
+
this.popup.remove();
|
75
|
+
this.el.classList.remove('-active');
|
76
|
+
delete this.popup;
|
77
|
+
}, this.timeout)
|
65
78
|
}
|
66
79
|
|
67
80
|
disable () {
|
@@ -5,17 +5,19 @@ import FloatingLabelInput from './uniform/floating-label-input';
|
|
5
5
|
import Resizer from './uniform/resizer';
|
6
6
|
import Tooltip from './uniform/tooltip';
|
7
7
|
import Popover from './uniform/popover';
|
8
|
+
import Dropzone from './uniform/dropzone';
|
8
9
|
import {Checkbox, Radio, Toggle} from './uniform/checkbox';
|
9
10
|
|
10
11
|
export {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
Dropdown,
|
13
|
+
Modal,
|
14
|
+
Select,
|
15
|
+
FloatingLabelInput,
|
16
|
+
Resizer,
|
17
|
+
Tooltip,
|
18
|
+
Popover,
|
19
|
+
Checkbox,
|
20
|
+
Radio,
|
21
|
+
Toggle,
|
22
|
+
Dropzone
|
21
23
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
+
@import 'uniform/config';
|
1
2
|
@import 'uniform/functions';
|
2
|
-
@import 'uniform/variables';
|
3
3
|
@import 'uniform/mixins';
|
4
4
|
*{
|
5
5
|
border-width: 0;
|
@@ -9,14 +9,29 @@
|
|
9
9
|
|
10
10
|
.uniformInput,
|
11
11
|
.uniformInputGroup,
|
12
|
-
.uniformSelect{
|
12
|
+
.uniformSelect {
|
13
13
|
--focus-color: #{red(color('blue'))}, #{green(color('blue'))}, #{blue(color('blue'))};
|
14
14
|
}
|
15
15
|
|
16
|
-
body{
|
17
|
-
--breakpoints: #{mapToString($breakpoints)};
|
16
|
+
body {
|
17
|
+
--breakpoints: #{mapToString(map-get($uniform_configs, 'breakpoints'))};
|
18
18
|
--bg-opacity: 1.0;
|
19
19
|
--shadow-opacity: 0.1;
|
20
20
|
--border-opacity: 1.0;
|
21
21
|
--border-color: #{red(color('gray'))}, #{green(color('gray'))}, #{blue(color('gray'))};
|
22
|
-
}
|
22
|
+
}
|
23
|
+
|
24
|
+
@include responsive-rule('base') {
|
25
|
+
--breakpoints: #{mapToString(map-get($uniform_configs, 'breakpoints'))};
|
26
|
+
--bg-opacity: 1.0;
|
27
|
+
--shadow-opacity: 0.1;
|
28
|
+
--border-opacity: 1.0;
|
29
|
+
--border-color: #{red(color('gray'))}, #{green(color('gray'))}, #{blue(color('gray'))};
|
30
|
+
}
|
31
|
+
|
32
|
+
/*
|
33
|
+
The following is used to pass configs in scss
|
34
|
+
UNIFORM CONFIGS
|
35
|
+
#{mapToJSON($uniform_configs)}
|
36
|
+
UNIFORM CONFIGS END
|
37
|
+
*/
|
@@ -44,7 +44,7 @@
|
|
44
44
|
//----------------------------------------------------------------
|
45
45
|
// Color
|
46
46
|
//----------------------------------------------------------------
|
47
|
-
@each $name, $color in $
|
47
|
+
@each $name, $color in map-get($uniform_configs, 'colors') {
|
48
48
|
.uniformButton.-#{$name},
|
49
49
|
.uniformButtonGroup.-#{$name} > *{
|
50
50
|
background-color: rgba($color, var(--bg-opacity));
|
@@ -108,10 +108,6 @@
|
|
108
108
|
linear-gradient(hsla(0,0%,50%, .5), hsla(0,0%,50%, .5));
|
109
109
|
background-blend-mode: saturation, luminosity;
|
110
110
|
}
|
111
|
-
|
112
|
-
&:visited{
|
113
|
-
color: currentColor;
|
114
|
-
}
|
115
111
|
}
|
116
112
|
|
117
113
|
.uniformButton{
|
@@ -155,6 +151,9 @@
|
|
155
151
|
--pad-h: 3em;
|
156
152
|
--border-radius: 0.5em;
|
157
153
|
}
|
154
|
+
&.-input {
|
155
|
+
--pad-v: 0.75em;
|
156
|
+
}
|
158
157
|
}
|
159
158
|
|
160
159
|
|