uniform-ui 2.2.2 → 2.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets/javascripts/uniform/checkbox.js +2 -2
  3. data/lib/assets/javascripts/uniform/component.js +65 -9
  4. data/lib/assets/javascripts/uniform/dom-helpers.js +32 -10
  5. data/lib/assets/javascripts/uniform/dropdown.js +106 -38
  6. data/lib/assets/javascripts/uniform/floating-label.js +3 -3
  7. data/lib/assets/javascripts/uniform/modal.js +21 -14
  8. data/lib/assets/javascripts/uniform/popover.js +186 -0
  9. data/lib/assets/javascripts/uniform/resizer.js +1 -1
  10. data/lib/assets/javascripts/uniform/select.js +51 -24
  11. data/lib/assets/javascripts/uniform/tooltip.js +18 -71
  12. data/lib/assets/javascripts/uniform.es5.js +1 -1
  13. data/lib/assets/javascripts/uniform.jquery.js +28 -0
  14. data/lib/assets/javascripts/uniform.js +3 -1
  15. data/lib/assets/stylesheets/uniform/components/alert.scss +2 -2
  16. data/lib/assets/stylesheets/uniform/components/buttons.scss +31 -15
  17. data/lib/assets/stylesheets/uniform/components/card.scss +3 -3
  18. data/lib/assets/stylesheets/uniform/components/dropdown.scss +23 -22
  19. data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +4 -4
  20. data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +1 -1
  21. data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +2 -1
  22. data/lib/assets/stylesheets/uniform/components/form/input-group.scss +2 -2
  23. data/lib/assets/stylesheets/uniform/components/form/tristate.scss +88 -0
  24. data/lib/assets/stylesheets/uniform/components/form.scss +12 -6
  25. data/lib/assets/stylesheets/uniform/components/grid.scss +21 -0
  26. data/lib/assets/stylesheets/uniform/components/label.scss +9 -7
  27. data/lib/assets/stylesheets/uniform/components/loaders.scss +39 -39
  28. data/lib/assets/stylesheets/uniform/components/nav.scss +8 -4
  29. data/lib/assets/stylesheets/uniform/components/row.scss +18 -10
  30. data/lib/assets/stylesheets/uniform/components/select.scss +42 -5
  31. data/lib/assets/stylesheets/uniform/components/table.scss +43 -9
  32. data/lib/assets/stylesheets/uniform/components/thumb.scss +1 -1
  33. data/lib/assets/stylesheets/uniform/components/tooltip.scss +8 -30
  34. data/lib/assets/stylesheets/uniform/defaults.scss +1 -6
  35. data/lib/assets/stylesheets/uniform/functions.scss +34 -4
  36. data/lib/assets/stylesheets/uniform/helpers/border.scss +10 -1
  37. data/lib/assets/stylesheets/uniform/helpers/colors.scss +3 -2
  38. data/lib/assets/stylesheets/uniform/helpers/position.scss +6 -0
  39. data/lib/assets/stylesheets/uniform/helpers/text.scss +11 -0
  40. data/lib/assets/stylesheets/uniform/helpers.scss +9 -3
  41. data/lib/assets/stylesheets/uniform/variables.scss +8 -6
  42. data/lib/uniform/version.rb +1 -1
  43. data/lib/uniform.rb +11 -3
  44. metadata +5 -4
@@ -79,11 +79,6 @@ button{
79
79
  line-height: inherit;
80
80
  }
81
81
 
82
- #{$text-inputs},
83
- textarea{
84
- border:1px solid lighten(color('gray'), 40);
85
- }
86
-
87
82
  [hidden] {
88
83
  display: none !important;
89
84
  }
@@ -94,6 +89,6 @@ time{
94
89
 
95
90
  button{
96
91
  font-family: $system-font;
97
- color: color('gray');
92
+ color: color('gray-darkest');
98
93
  cursor: pointer;
99
94
  }
@@ -14,18 +14,48 @@
14
14
  @return $string;
15
15
  }
16
16
 
17
+ @function uri-encode($svg) {
18
+ $encoded: '';
19
+ $slice: 2000;
20
+ $index: 0;
21
+ $loops: ceil(str-length($svg) / $slice);
22
+
23
+ @for $i from 1 through $loops {
24
+ $chunk: str-slice($svg, $index, $index + $slice - 1);
25
+ $chunk: str-replace($chunk, '"', "'");
26
+ $chunk: str-replace($chunk, '<', '%3C');
27
+ $chunk: str-replace($chunk, '>', '%3E');
28
+ $chunk: str-replace($chunk, '&', '%26');
29
+ $chunk: str-replace($chunk, '#', '%23');
30
+ $encoded: #{$encoded}#{$chunk};
31
+ $index: $index + $slice;
32
+ }
33
+
34
+ @return $encoded;
35
+ }
36
+
37
+ @function svg-encode ($svg) {
38
+ @return url("data:image/svg+xml;charset=utf8,#{uri-encode($svg)}");
39
+ }
40
+
41
+
42
+
17
43
  @function icon-check($color: #000000){
18
- @return '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><path d="M28.998 8.531l-2.134-2.134c-0.394-0.393-1.030-0.393-1.423 0l-12.795 12.795-6.086-6.13c-0.393-0.393-1.029-0.393-1.423 0l-2.134 2.134c-0.393 0.394-0.393 1.030 0 1.423l8.924 8.984c0.393 0.393 1.030 0.393 1.423 0l15.648-15.649c0.393-0.392 0.393-1.030 0-1.423z" fill="#{$color}"></path></svg>';
44
+ @return svg-encode('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><path d="M28.998 8.531l-2.134-2.134c-0.394-0.393-1.030-0.393-1.423 0l-12.795 12.795-6.086-6.13c-0.393-0.393-1.029-0.393-1.423 0l-2.134 2.134c-0.393 0.394-0.393 1.030 0 1.423l8.924 8.984c0.393 0.393 1.030 0.393 1.423 0l15.648-15.649c0.393-0.392 0.393-1.030 0-1.423z" fill="#{$color}"></path></svg>');
19
45
  }
20
46
 
21
47
  @function icon-x($size: 32, $color: #000000){
22
- @return url("data:image/svg+xml; utf8,<svg version='1.2' baseProfile='tiny' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='#{$size}px' height='#{$size}px' viewBox='0 0 64 64' xml:space='preserve' fill='#{$color}'><g><rect x='-2.352' y='29.385' transform='matrix(0.7071 0.7071 -0.7071 0.7071 32.3545 -14.3899)' width='71.799' height='4.95'/></g><g><rect x='-2.374' y='29.376' transform='matrix(0.7071 -0.7071 0.7071 0.7071 -12.7023 33.0352)' width='71.799' height='4.95'/></g></svg>");
48
+ @return svg-encode('<svg version="1.2" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="#{$size}px" height="#{$size}px" viewBox="0 0 64 64" xml:space="preserve" fill="#{$color}"><g><rect x="-2.352" y="29.385" transform="matrix(0.7071 0.7071 -0.7071 0.7071 32.3545 -14.3899)" width="71.799" height="4.95"/></g><g><rect x="-2.374" y="29.376" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -12.7023 33.0352)" width="71.799" height="4.95"/></g></svg>');
23
49
  }
24
50
 
25
51
  @function icon-circle($width: 2, $height: 2, $radius: 1, $color: #000000){
26
- @return '<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="#{$width}px" height="#{$height}px" viewBox="0 0 #{$width} #{$height}" enable-background="new 0 0 #{$width} #{$height}" xml:space="preserve"><circle cx="#{$width / 2}" cy="#{$height / 2}" r="#{$radius}" fill="#{$color}"/></svg>';
52
+ @return svg-encode('<svg version="1.0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="#{$width}px" height="#{$height}px" viewBox="0 0 #{$width} #{$height}" enable-background="new 0 0 #{$width} #{$height}" xml:space="preserve"><circle cx="#{$width / 2}" cy="#{$height / 2}" r="#{$radius}" fill="#{$color}"/></svg>');
27
53
  }
28
54
 
29
55
  @function color($key) {
30
56
  @return map-get($colors, $key);
31
- }
57
+ }
58
+
59
+ @function icon-x-block($size: 32, $color: #000000){
60
+ @return svg-encode('<svg width="#{$size}px" height="#{$size}px" fill="#{$color}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 10.5 10.5" style="enable-background:new 0 0 10.5 10.5;" xml:space="preserve"><path d="M8.1,1.3C8.4,1,8.9,1,9.2,1.3c0,0,0,0,0,0c0.3,0.3,0.3,0.8,0,1.1L2.4,9.3c-0.3,0.3-0.8,0.3-1.1,0S1,8.4,1.3,8.1L8.1,1.3z"/><path d="M9.2,8.1c0.3,0.3,0.4,0.8,0.1,1.1c0,0,0,0,0,0l0,0c-0.3,0.3-0.8,0.3-1.1,0L1.3,2.4C1,2.1,0.9,1.6,1.3,1.3c0,0,0,0,0,0l0,0 C1.6,1,2.1,1,2.4,1.3L9.2,8.1z"/></svg>');
61
+ }
@@ -1,11 +1,20 @@
1
1
  .border{
2
- border: 1px solid color('gray-light');
2
+ border: 1px solid color('gray');
3
+ }
4
+
5
+ .border-dashed{
6
+ border: 1px dashed color('gray');
3
7
  }
4
8
  @include colors('.border', 'border-color'){
5
9
  border-width: 1px;
6
10
  border-style: solid;
7
11
  }
8
12
 
13
+ @include colors('.border-dashed', 'border-color'){
14
+ border-width: 1px;
15
+ border-style: dashed;
16
+ }
17
+
9
18
  @each $direction in 'top' 'right' 'bottom' 'left' {
10
19
  @include size-rules('.border-#{$direction}'){
11
20
  border-#{$direction}-color: color('gray-light') !important;
@@ -1,7 +1,8 @@
1
1
  @each $key, $value in $colors {
2
2
  .text-#{$key} { color: $value !important;}
3
3
  .a-hover-#{$key} a:hover { color: $value !important;}
4
- .hover-#{$key} :hover { color: $value !important;}
4
+ .hover-#{$key}:hover { color: $value !important;}
5
+ .bg-hover-#{$key}:hover { background-color: $value !important;}
5
6
  .bg-#{$key} { background-color: $value !important;}
6
7
  .a-#{$key} a {
7
8
  color: $value;
@@ -14,7 +15,7 @@
14
15
  }
15
16
  }
16
17
 
17
- @for $i from 1 through 20 {
18
+ @for $i from 0 through 20 {
18
19
  .opacity-#{$i * 5} { opacity: #{$i * 5 / 100.0}; }
19
20
  }
20
21
 
@@ -11,4 +11,10 @@
11
11
  .position-h-center{ @include position-h-center;}
12
12
  @for $i from 1 through 100 {
13
13
  .z-#{$i} { z-index: #{$i}; }
14
+ }
15
+
16
+ .hide-empty{
17
+ &:empty{
18
+ display: none;
19
+ }
14
20
  }
@@ -20,6 +20,9 @@
20
20
  .text-caps{
21
21
  text-transform: uppercase;
22
22
  }
23
+ .text-boldest{
24
+ font-weight: 900;
25
+ }
23
26
  .text-bold{
24
27
  font-weight: 700;
25
28
  }
@@ -41,6 +44,14 @@
41
44
  text-decoration: none;
42
45
  }
43
46
  }
47
+ .text-underline{
48
+ text-decoration: underline;
49
+ }
50
+ .hover-underline{
51
+ &:hover{
52
+ text-decoration: underline;
53
+ }
54
+ }
44
55
 
45
56
  //----------------------------------------------------------------
46
57
  // Styles
@@ -38,12 +38,14 @@
38
38
  //----------------------------------------------------------------
39
39
  // Raw
40
40
  //----------------------------------------------------------------
41
- ul.raw{
41
+ .raw{
42
42
  margin: 0;
43
43
  padding: 0;
44
44
  list-style:none;
45
+ outline: none;
46
+ appearance: none;
45
47
  }
46
- button.raw{
48
+ .reset{
47
49
  outline: none;
48
50
  appearance: none;
49
51
  border: none;
@@ -122,6 +124,10 @@ button.raw{
122
124
  img.disabled{
123
125
  @include grayscale(1, 0.3)
124
126
  }
125
- table.fixed{
127
+ table.layout-fixed{
126
128
  table-layout: fixed;
129
+ }
130
+
131
+ .shadow{
132
+ box-shadow: 0 1px 3px 2px rgba(black, 0.2);
127
133
  }
@@ -10,10 +10,13 @@ $system-font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubu
10
10
  //----------------------------------------------------------------
11
11
  $colors: (
12
12
  'background': #f2f2f2,
13
- 'gray': #505153,
14
- 'gray-light': #cccccc,
15
- 'gray-dark': #373839,
16
- 'gray-background': rgb(238, 238, 238),
13
+ 'gray-lightest': #F8FAFC,
14
+ 'gray-lighter': #F1F5F8,
15
+ 'gray-light': #DAE1E7,
16
+ 'gray': #B8C2CC,
17
+ 'gray-dark': #8795A1,
18
+ 'gray-darker': #606F7B,
19
+ 'gray-darkest': #3D4852,
17
20
  'green': #97C848,
18
21
  'green-light': #BBFF00,
19
22
  'green-dark': #709239,
@@ -29,8 +32,7 @@ $colors: (
29
32
  'yellow-dark': #BBC02C,
30
33
  'yellow-light': #E9F75A,
31
34
  'black': #000000,
32
- 'white': #FFFFFF,
33
- 'muted': #969696
35
+ 'white': #FFFFFF
34
36
  );
35
37
 
36
38
 
@@ -1,3 +1,3 @@
1
1
  module Uniform
2
- VERSION = "2.2.2"
2
+ VERSION = "2.3.2"
3
3
  end
data/lib/uniform.rb CHANGED
@@ -1,9 +1,17 @@
1
1
  if defined?(::Rails)
2
2
  class UniformUi
3
3
  class Engine < ::Rails::Engine
4
-
5
- if Sprockets::VERSION.start_with?('4')
6
- Engine.config.assets.precompile += %w(uniform/manifest.js)
4
+
5
+ if defined?(::Sprockets)
6
+ if Sprockets::VERSION.start_with?('4')
7
+ Engine.config.assets.precompile << 'uniform/manifest.js'
8
+ end
9
+ elsif defined?(::Condenser)
10
+ assets_dir = File.expand_path("../lib/assets", __dir__)
11
+ Dir.each_child(assets_dir) do |child|
12
+ child = File.join(assets_dir, child)
13
+ Engine.config.assets.path << child if File.directory?(child)
14
+ end
7
15
  end
8
16
 
9
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniform-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Ehmke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2020-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -70,6 +70,7 @@ files:
70
70
  - lib/assets/javascripts/uniform/floating-label.js
71
71
  - lib/assets/javascripts/uniform/icons.js
72
72
  - lib/assets/javascripts/uniform/modal.js
73
+ - lib/assets/javascripts/uniform/popover.js
73
74
  - lib/assets/javascripts/uniform/resizer.js
74
75
  - lib/assets/javascripts/uniform/select.js
75
76
  - lib/assets/javascripts/uniform/tooltip.js
@@ -87,6 +88,7 @@ files:
87
88
  - lib/assets/stylesheets/uniform/components/form/checkbox.scss
88
89
  - lib/assets/stylesheets/uniform/components/form/floating-label.scss
89
90
  - lib/assets/stylesheets/uniform/components/form/input-group.scss
91
+ - lib/assets/stylesheets/uniform/components/form/tristate.scss
90
92
  - lib/assets/stylesheets/uniform/components/grid.scss
91
93
  - lib/assets/stylesheets/uniform/components/label.scss
92
94
  - lib/assets/stylesheets/uniform/components/loaders.scss
@@ -131,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
133
  - !ruby/object:Gem::Version
132
134
  version: '0'
133
135
  requirements: []
134
- rubyforge_project:
135
- rubygems_version: 2.7.6
136
+ rubygems_version: 3.1.2
136
137
  signing_key:
137
138
  specification_version: 4
138
139
  summary: Sass UI