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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets/javascripts/uniform/checkbox.js +12 -12
  3. data/lib/assets/javascripts/uniform/component.js +17 -13
  4. data/lib/assets/javascripts/uniform/dropdown.js +54 -54
  5. data/lib/assets/javascripts/uniform/dropzone.js +107 -0
  6. data/lib/assets/javascripts/uniform/floating-label-input.js +8 -8
  7. data/lib/assets/javascripts/uniform/modal.js +12 -12
  8. data/lib/assets/javascripts/uniform/popover.js +54 -33
  9. data/lib/assets/javascripts/uniform/resizer.js +20 -20
  10. data/lib/assets/javascripts/uniform/select.js +186 -162
  11. data/lib/assets/javascripts/uniform/sticker.js +26 -0
  12. data/lib/assets/javascripts/uniform/tooltip.js +29 -16
  13. data/lib/assets/javascripts/uniform.js +12 -10
  14. data/lib/assets/stylesheets/uniform/base.scss +20 -5
  15. data/lib/assets/stylesheets/uniform/components/buttons.scss +4 -5
  16. data/lib/assets/stylesheets/uniform/components/checkbox.scss +2 -0
  17. data/lib/assets/stylesheets/uniform/components/container.scss +8 -7
  18. data/lib/assets/stylesheets/uniform/components/dropzone.scss +40 -0
  19. data/lib/assets/stylesheets/uniform/components/pointer.scss +4 -4
  20. data/lib/assets/stylesheets/uniform/components/select.scss +7 -2
  21. data/lib/assets/stylesheets/uniform/components/thumb.scss +0 -1
  22. data/lib/assets/stylesheets/uniform/components/z-input.scss +1 -1
  23. data/lib/assets/stylesheets/uniform/config.scss +156 -0
  24. data/lib/assets/stylesheets/uniform/defaults.scss +2 -23
  25. data/lib/assets/stylesheets/uniform/functions/icons.scss +29 -0
  26. data/lib/assets/stylesheets/uniform/functions/map.scss +95 -0
  27. data/lib/assets/stylesheets/uniform/functions/string.scss +15 -0
  28. data/lib/assets/stylesheets/uniform/functions.scss +4 -79
  29. data/lib/assets/stylesheets/uniform/mixins.scss +34 -26
  30. data/lib/assets/stylesheets/uniform/utilities/effects.scss +31 -0
  31. data/lib/assets/stylesheets/uniform/utilities/layout.scss +13 -20
  32. data/lib/assets/stylesheets/uniform/utilities/position.scss +4 -0
  33. data/lib/assets/stylesheets/uniform/utilities/text.scss +1 -0
  34. data/lib/assets/stylesheets/uniform/utilities.scss +6 -0
  35. data/lib/uniform/version.rb +1 -1
  36. metadata +9 -3
  37. 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
- const [key, value] = breakpoint.split("/")
11
- this.breakpoints[key.trim()] = value;
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
- 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
- }
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
- 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
- });
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
- initialize (options = {}) {
27
- this.htmlOptions = options.options.map(option => {
28
- if(typeof option == "string") {
29
- return {
30
- value: option,
31
- text: option
26
+ initialize (options = {}) {
27
+ this.options = {
28
+ multiple: false,
29
+ limit: 8,
30
+ container: false
32
31
  }
33
- } else if (Array.isArray(option)){
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
- this.el_options = Object.assign({}, this.pick(options, HTML_ATTRIBUTES));
53
- this.el = createElement('button', this.el_options);
54
- this.el.classList.add('uniformSelect');
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
- this.listenTo(this.el, 'click', this.toggleOptions);
57
- this.listenTo(this.el, 'click', '.uniformSelect-remove', this.removeSelection);
58
- this.listenTo(this.el, 'change', 'select', this.renderValue);
59
- this.listenTo(this.el, 'close', 'select', this.removeOptions);
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
- render () {
63
- this.valueEl = createElement('span');
64
- this.valueEl.classList.add('uniformSelect-value')
65
- this.el.append(this.valueEl);
81
+ render () {
82
+ this.valueEl = createElement('span');
83
+ this.valueEl.classList.add('uniformSelect-value')
84
+ this.el.append(this.valueEl);
66
85
 
67
- this.indicatorEl = createElement('span', {children: arrowIcon})
68
- this.indicatorEl.classList.add('uniformSelect-indicator')
69
- this.el.append(this.indicatorEl);
86
+ this.indicatorEl = createElement('span', {children: arrowIcon})
87
+ this.indicatorEl.classList.add('uniformSelect-indicator')
88
+ this.el.append(this.indicatorEl);
70
89
 
71
- this.select = createElement('select', this.el_options);
72
- this.htmlOptions.forEach(option => {
73
- this.select.append(createElement('option', Object.assign({}, {children: option.text}, option)))
74
- });
75
- this.el.append(this.select);
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
- // Append placeholder of longest option, to set width
79
- const longestText = this.htmlOptions.map(x => x.text).sort((a, b) => a.length < b.length)[0]
80
- const placeholder = createElement('span', {class: 'uniformSelect-placeholder', children: longestText})
81
- this.el.append(placeholder);
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
- this.renderValue();
84
- return this;
85
- }
107
+ this.renderValue();
108
+ return this;
109
+ }
86
110
 
87
- renderValue () {
88
- const selectedOptions = filter(this.select.querySelectorAll("option"), el => el.selected);
89
- const html = selectedOptions.map(el => this.options.multiple ? `
90
- <span class="uniformSelect-selection">
91
- <span>${el.textContent}</span><span class="uniformSelect-remove">${xIcon}</span>
92
- </span>
93
- ` : el.textContent).join(" ");
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
- this.valueEl.innerHTML = html;
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
- e.target.classList.toggle('active', makeActive);
104
- e.target.option.selected = makeActive;
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
- if (!this.options.multiple) {
107
- this.removeOptions();
108
- }
130
+ if (!this.options.multiple) {
131
+ this.removeOptions();
132
+ }
109
133
 
110
- trigger(this.select, 'change');
111
- }
134
+ trigger(this.select, 'change');
135
+ }
112
136
 
113
- removeSelection (e) {
114
- e.preventDefault();
115
- e.stopPropagation();
116
- var option = filter(this.select.querySelectorAll("option"), function(el){
117
- return el.innerText.trim() == e.target.closest('.uniformSelect-selection').innerText.trim();
118
- })[0];
119
- if(!option) return;
120
- option.selected = false;
121
- option.button.classList.remove('active');
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
- trigger(this.select, 'change');
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
- this.el.classList.toggle('active')
131
- if(this.el.contains('active')){
132
- this.renderOptions()
133
- } else {
134
- this.removeOptions()
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
- renderOptions () {
139
- const options = createElement("div", {
140
- class: 'uniformSelect-options'
141
- });
162
+ renderOptions () {
163
+ const options = createElement("div", {
164
+ class: 'uniformSelect-options'
165
+ });
142
166
 
143
- options.style.fontSize = css(this.el, 'font-size')
167
+ options.style.fontSize = css(this.el, 'font-size')
144
168
 
145
- this.select.querySelectorAll('option').forEach(function(option, index){
146
- var button = createElement("button", {
147
- type: 'button',
148
- class: 'uniformSelect-option'
149
- });
150
- button.option = option;
151
- option.button = button;
152
- button.textContent = option.textContent;
153
- button.value = option.value;
154
- if (button.textContent == "") button.innerHTML = "<span class='text-italic text-muted'>None</span>";
155
- button.classList.toggle('active', option.selected);
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
- console.log(this.options.limit, index);
158
- if (this.options.limit && (index + 1) > this.options.limit) {
159
- button.classList.add('hide')
160
- }
161
- options.append(button);
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
- this.listenTo(options, 'click', '.uniformSelect-option', this.selectOption);
187
+ this.listenTo(options, 'click', '.uniformSelect-option', this.selectOption);
165
188
 
166
189
 
167
- const actions = createElement('div', {
168
- class: 'uniformSelect-actions'
169
- });
190
+ const actions = createElement('div', {
191
+ class: 'uniformSelect-actions'
192
+ });
170
193
 
171
- if (this.options.limit && this.htmlOptions.length > this.options.limit) {
172
- const button = createElement('button', {
173
- type: 'button',
174
- class: 'uniformSelect-show-all',
175
- children: 'Show All'
176
- });
177
- this.listenTo(button, 'click', this.showAllOptions.bind(this))
178
- actions.append(button);
179
- }
180
- if (this.options.multiple) {
181
- const button = createElement('button', {
182
- type: 'button',
183
- class: 'uniformSelect-done',
184
- children: ['Done']
185
- });
186
- this.listenTo(button, 'click', this.removeOptions.bind(this));
187
- actions.append(button);
188
- }
189
- if (!isEmpty(actions)) {
190
- options.append(actions);
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
- this.popover = new Popover({
194
- offset: {top: 1},
195
- align: '0px bottom',
196
- anchor: this.el,
197
- content: options,
198
- container: this.options.container
199
- }).render()
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
- this.listenTo(this.popover, 'hidden', this.removeOptions);
202
- }
225
+ this.listenTo(this.popover, 'hidden', this.removeOptions);
226
+ }
203
227
 
204
- removeOptions () {
205
- this.el.classList.remove('active')
206
- if(!this.popover) return;
207
- this.popover.remove()
208
- }
228
+ removeOptions () {
229
+ this.el.classList.remove('active')
230
+ if (!this.popover) return;
231
+ this.popover.remove()
232
+ }
209
233
 
210
- showAllOptions (e) {
211
- e.preventDefault();
212
- e.stopPropagation();
213
- if(!this.popover) return;
214
- this.popover.el.querySelectorAll('button.hide').forEach(el => el.classList.remove('hide'));
215
- var button = this.popover.el.querySelector('.uniformSelect-show-all');
216
- button.parentNode.removeChild(button);
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
- this.popup.show()
46
+ this.popup.show()
45
47
  } else {
46
- this.popup = new Popover({
47
- content: this.content,
48
- class: 'uniformPointer -bottom bg-gray-70 bg-opacity-85 text-white rounded pad-1/2x text-sm max-width-300-px',
49
- anchor: this.el,
50
- align: this.options.align == "top" ? `center top` : 'center 100%',
51
- offset: {
52
- top: -7
53
- },
54
- container: this.options.container
55
- }).render();
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
- this.hide_timeout = setTimeout(() => {
61
- this.popup.remove();
62
- this.el.classList.remove('-active');
63
- delete this.popup;
64
- }, 300)
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
- Dropdown,
12
- Modal,
13
- Select,
14
- FloatingLabelInput,
15
- Resizer,
16
- Tooltip,
17
- Popover,
18
- Checkbox,
19
- Radio,
20
- Toggle
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 $color_spectrum {
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
 
@@ -1,3 +1,5 @@
1
+ @import 'uniform/functions/icons';
2
+
1
3
  .uniformRadio,
2
4
  .uniformCheckbox{
3
5
  display:inline-block;