uniform-ui 1.0 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +5 -5
  2. data/lib/assets/config/manifest.js +1 -0
  3. data/lib/assets/javascripts/uniform/checkbox.js +31 -0
  4. data/lib/assets/javascripts/uniform/component.js +42 -0
  5. data/lib/assets/javascripts/uniform/dom-helpers.js +136 -0
  6. data/lib/assets/javascripts/uniform/dropdown.js +149 -0
  7. data/lib/assets/javascripts/uniform/floating-label.js +54 -0
  8. data/lib/assets/javascripts/uniform/icons.js +16 -0
  9. data/lib/assets/javascripts/uniform/modal.js +103 -0
  10. data/lib/assets/javascripts/uniform/resizer.js +43 -0
  11. data/lib/assets/javascripts/uniform/select.js +235 -0
  12. data/lib/assets/javascripts/uniform/tooltip.js +120 -0
  13. data/lib/assets/javascripts/uniform-es5.js +1 -0
  14. data/lib/assets/javascripts/uniform-jquery.js +124 -0
  15. data/lib/assets/javascripts/uniform.js +17 -0
  16. data/lib/assets/stylesheets/uniform/base.scss +3 -0
  17. data/lib/assets/stylesheets/uniform/components/alert.scss +72 -0
  18. data/lib/assets/stylesheets/uniform/components/buttons.scss +219 -0
  19. data/{vendor → lib}/assets/stylesheets/uniform/components/card.scss +33 -25
  20. data/lib/assets/stylesheets/uniform/components/container.scss +19 -0
  21. data/{vendor → lib}/assets/stylesheets/uniform/components/dropdown.scss +8 -4
  22. data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +103 -0
  23. data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +58 -0
  24. data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +64 -0
  25. data/lib/assets/stylesheets/uniform/components/form/input-group.scss +56 -0
  26. data/lib/assets/stylesheets/uniform/components/form.scss +143 -0
  27. data/lib/assets/stylesheets/uniform/components/grid.scss +158 -0
  28. data/lib/assets/stylesheets/uniform/components/label.scss +26 -0
  29. data/lib/assets/stylesheets/uniform/components/loaders.scss +80 -0
  30. data/{vendor → lib}/assets/stylesheets/uniform/components/modal.scss +26 -4
  31. data/lib/assets/stylesheets/uniform/components/nav.scss +124 -0
  32. data/lib/assets/stylesheets/uniform/components/row.scss +69 -0
  33. data/lib/assets/stylesheets/uniform/components/select.scss +122 -0
  34. data/lib/assets/stylesheets/uniform/components/table.scss +127 -0
  35. data/lib/assets/stylesheets/uniform/components/thumb.scss +41 -0
  36. data/lib/assets/stylesheets/uniform/components/tooltip.scss +63 -0
  37. data/lib/assets/stylesheets/uniform/components.scss +11 -0
  38. data/{vendor → lib}/assets/stylesheets/uniform/defaults.scss +7 -4
  39. data/lib/assets/stylesheets/uniform/functions.scss +31 -0
  40. data/lib/assets/stylesheets/uniform/helpers/border.scss +19 -0
  41. data/lib/assets/stylesheets/uniform/helpers/colors.scss +23 -0
  42. data/lib/assets/stylesheets/uniform/helpers/margin.scss +27 -0
  43. data/lib/assets/stylesheets/uniform/helpers/padding.scss +9 -0
  44. data/lib/assets/stylesheets/uniform/helpers/position.scss +13 -0
  45. data/lib/assets/stylesheets/uniform/helpers/sizes.scss +38 -0
  46. data/{vendor → lib}/assets/stylesheets/uniform/helpers/text.scss +86 -73
  47. data/lib/assets/stylesheets/uniform/helpers.scss +127 -0
  48. data/lib/assets/stylesheets/uniform/mixins.scss +116 -0
  49. data/lib/assets/stylesheets/uniform/print/grid.scss +50 -0
  50. data/lib/assets/stylesheets/uniform/variables.scss +72 -0
  51. data/lib/assets/stylesheets/uniform-print.scss +1 -0
  52. data/lib/assets/stylesheets/uniform.scss +11 -0
  53. data/lib/uniform/version.rb +3 -0
  54. data/lib/uniform.rb +15 -0
  55. metadata +87 -95
  56. data/.gitignore +0 -2
  57. data/CHANGELOG.md +0 -27
  58. data/CNAME +0 -1
  59. data/Gemfile +0 -8
  60. data/Gemfile.lock +0 -40
  61. data/LICENSE +0 -22
  62. data/README.md +0 -35
  63. data/Rakefile +0 -74
  64. data/index.html +0 -251
  65. data/lib/uniform/rails/engine.rb +0 -8
  66. data/lib/uniform/rails.rb +0 -6
  67. data/lib/uniform/ui.rb +0 -1
  68. data/preview/alerts.html.erb +0 -1
  69. data/preview/buttons.html.erb +0 -62
  70. data/preview/cards.html.erb +0 -23
  71. data/preview/colors.html.erb +0 -22
  72. data/preview/dropdown.html.erb +0 -1
  73. data/preview/form.html.erb +0 -233
  74. data/preview/grid.html.erb +0 -304
  75. data/preview/helpers.html.erb +0 -225
  76. data/preview/index.html.erb +0 -77
  77. data/preview/labels.html.erb +0 -1
  78. data/preview/layout.html.erb +0 -63
  79. data/preview/loaders.html.erb +0 -83
  80. data/preview/modal.html.erb +0 -1
  81. data/preview/nav.html.erb +0 -77
  82. data/preview/preview.scss +0 -76
  83. data/preview/rows.html.erb +0 -36
  84. data/preview/select.html.erb +0 -1
  85. data/preview/tables.html.erb +0 -1
  86. data/preview/tabs.html.erb +0 -17
  87. data/preview/tiles.html.erb +0 -1
  88. data/preview/tooltip.erb +0 -1
  89. data/preview.css +0 -0
  90. data/site/alerts.html +0 -157
  91. data/site/alerts.html copy +0 -133
  92. data/site/buttons.html +0 -286
  93. data/site/cards.html +0 -177
  94. data/site/colors.html +0 -275
  95. data/site/dropdown.html +0 -157
  96. data/site/dropdown.html copy +0 -141
  97. data/site/form.html +0 -369
  98. data/site/grid.html +0 -716
  99. data/site/helpers.html +0 -1008
  100. data/site/index.html +0 -251
  101. data/site/labels.html +0 -157
  102. data/site/layout.html +0 -313
  103. data/site/loaders.html +0 -233
  104. data/site/logo.png +0 -0
  105. data/site/modal.html +0 -157
  106. data/site/nav.html +0 -229
  107. data/site/preview.css +0 -1
  108. data/site/preview.js +0 -59
  109. data/site/rows.html +0 -190
  110. data/site/select.html +0 -157
  111. data/site/tables.html +0 -157
  112. data/site/tabs.html +0 -171
  113. data/site/tiles.html +0 -157
  114. data/site/tiles.html copy +0 -109
  115. data/site/tooltip +0 -157
  116. data/site/uniform.css +0 -1
  117. data/uniform.gemspec +0 -22
  118. data/vendor/assets/stylesheets/uniform/base.scss +0 -2
  119. data/vendor/assets/stylesheets/uniform/components/alert.scss +0 -27
  120. data/vendor/assets/stylesheets/uniform/components/buttons.scss +0 -212
  121. data/vendor/assets/stylesheets/uniform/components/form.scss +0 -290
  122. data/vendor/assets/stylesheets/uniform/components/grid.scss +0 -225
  123. data/vendor/assets/stylesheets/uniform/components/label.scss +0 -63
  124. data/vendor/assets/stylesheets/uniform/components/loaders.scss +0 -82
  125. data/vendor/assets/stylesheets/uniform/components/nav.scss +0 -197
  126. data/vendor/assets/stylesheets/uniform/components/row.scss +0 -92
  127. data/vendor/assets/stylesheets/uniform/components/select.scss +0 -98
  128. data/vendor/assets/stylesheets/uniform/components/table.scss +0 -83
  129. data/vendor/assets/stylesheets/uniform/components/tabs.scss +0 -45
  130. data/vendor/assets/stylesheets/uniform/components/tile.scss +0 -20
  131. data/vendor/assets/stylesheets/uniform/components/tooltip.scss +0 -46
  132. data/vendor/assets/stylesheets/uniform/helpers/colors.scss +0 -37
  133. data/vendor/assets/stylesheets/uniform/helpers/margin.scss +0 -44
  134. data/vendor/assets/stylesheets/uniform/helpers/padding.scss +0 -74
  135. data/vendor/assets/stylesheets/uniform/helpers/sizes.scss +0 -31
  136. data/vendor/assets/stylesheets/uniform/helpers.scss +0 -124
  137. data/vendor/assets/stylesheets/uniform/mixins.scss +0 -77
  138. data/vendor/assets/stylesheets/uniform/variables.scss +0 -36
  139. data/vendor/assets/stylesheets/uniform.scss +0 -9
@@ -0,0 +1,219 @@
1
+ //----------------------------------------------------------------
2
+ // Buttons
3
+ //----------------------------------------------------------------
4
+ .uniformButtonGroup a,
5
+ .uniformButton{
6
+ outline: none;
7
+ appearance: none;
8
+ cursor: pointer;
9
+ display: inline-block;
10
+ text-decoration: none;
11
+
12
+ padding: 0.5em 0.75em;
13
+ vertical-align: middle;
14
+ text-align: center;
15
+ line-height:1;
16
+ position:relative; // for adding loaders to buttons which have position:absolute
17
+ transition: all 0.2s;
18
+
19
+ color:color('gray');
20
+ background-color: white;
21
+ background-image: linear-gradient(white 33%, darken(white, 7));
22
+ border-radius: 0.25em;
23
+ border:1px solid lighten(color('gray'), 40);
24
+
25
+ &.input-height{
26
+ line-height: 1.4;
27
+ }
28
+
29
+ &:visited{
30
+ color:color('gray');
31
+ }
32
+
33
+ &:hover,
34
+ &:focus,
35
+ &.hover{
36
+ box-shadow: inset 0 0 10px rgba(black, 0.1);
37
+ }
38
+ &:active,
39
+ &.active{
40
+ }
41
+
42
+ &.-green,
43
+ &.-blue,
44
+ &.-red {
45
+ color: white;
46
+ }
47
+ &.-green { background: color('green');}
48
+ &.-blue { background: color('blue');}
49
+ &.-red { background: color('red');}
50
+ &.-green { background: color('green');}
51
+ &.-blue { background: color('blue');}
52
+ &.-red { background: color('red');}
53
+
54
+
55
+ //----------------------------------------------------------------
56
+ // styles
57
+ //----------------------------------------------------------------
58
+ &.-clear{
59
+ background: none;
60
+ border-color: transparent;
61
+ }
62
+ &.-outline{
63
+ border-color: color('gray');
64
+ background:none !important;
65
+ text-shadow:none !important;
66
+ &.-dashed{
67
+ border-style:dashed;
68
+ }
69
+ }
70
+ &.-small{
71
+ padding: 0.3em 0.5em;
72
+ font-size: 0.8em;
73
+ }
74
+ &.-large{
75
+ padding: 1em 2em;
76
+ font-weight:bold;
77
+ }
78
+ &.-input {
79
+ padding-top: 0.65em;
80
+ padding-bottom: 0.65em;
81
+ }
82
+
83
+ &.-warn:hover{
84
+ border-color:color('red');
85
+ background: color('red');
86
+ color: white;
87
+ &.clear{
88
+ color: color('red');
89
+ background: none;
90
+ }
91
+ &.-outline{
92
+ color: color('red');
93
+ border-color: lighten(color('gray'), 30);
94
+ }
95
+ }
96
+
97
+ &.-block{
98
+ padding-left:0.5em !important;
99
+ padding-right:0.5em !important;
100
+ display:block;
101
+ width:100%;
102
+ }
103
+
104
+
105
+ //----------------------------------------------------------------
106
+ // colors
107
+ //----------------------------------------------------------------
108
+
109
+ &.-green{
110
+ background-color: darken(color('green'), 3);
111
+ background-image: linear-gradient(lighten(color('green'), 5), darken(color('green'), 3));
112
+ border-color: darken(color('green'), 3);
113
+
114
+ &.-outline{
115
+ border-color: color('green-dark');
116
+ color:color('green-dark');
117
+ }
118
+ }
119
+
120
+ &.-green,
121
+ &.-red,
122
+ &.-blue{
123
+ color:white;
124
+ text-shadow:0 1px 2px rgba(black, 0.1);
125
+ }
126
+
127
+ &.-red{
128
+ background-color: darken(color('red'), 3);
129
+ background-image: linear-gradient(color('red'), darken(color('red'), 3));
130
+ border-color: darken(color('red'), 3);
131
+ &.-outline{
132
+ color:color('red-dark');
133
+ border-color:color('red-dark');
134
+ }
135
+ }
136
+
137
+ &.-blue{
138
+ background-color: darken(color('blue'), 3);
139
+ background-image: linear-gradient(color('blue'), darken(color('blue'), 3));
140
+ border-color:darken(color('blue'), 3);
141
+
142
+ &.-outline{
143
+ color:color('blue');
144
+ border-color: color('blue');
145
+ }
146
+ }
147
+ &.-white{
148
+ &.-outline{
149
+ color:white;
150
+ border-color:white;
151
+ }
152
+ }
153
+
154
+ &.-gray{
155
+ color: lighten(color('gray'), 20);
156
+ &.-outline{
157
+ color: lighten(color('gray'), 20);
158
+ border-color: lighten(color('gray'), 30);
159
+ }
160
+ }
161
+
162
+ &.-gray-dark{
163
+ color: white;
164
+ background-color: darken(color('gray-dark'), 3);
165
+ background-image: linear-gradient(color('gray-dark'), darken(color('gray-dark'), 3));
166
+ border-color: darken(color('gray-dark'), 3);
167
+ &.-outline{
168
+ color: lighten(color('gray'), 20);
169
+ border-color: lighten(color('gray'), 30);
170
+ }
171
+ }
172
+
173
+ &:disabled,
174
+ &.disabled,
175
+ &:disabled:hover,
176
+ &.disabled:hover{
177
+ cursor: not-allowed;
178
+ color:lighten(color('gray'), 40);
179
+ background-image:none !important;
180
+ background-color: darken(color('background'), 10);
181
+ border-color: lighten(color('gray'), 40);
182
+ text-shadow: none;
183
+ &.disabled-dark{
184
+ background-color: color('gray-dark');
185
+ color: lighten(color('gray-dark'), 30);
186
+ border-color: darken(color('gray-dark'), 5);
187
+ opacity: 0.75;
188
+ }
189
+ }
190
+ }
191
+ span.uniformButton{
192
+ cursor: auto;
193
+ }
194
+ a.uniformButton{
195
+ user-select: none;
196
+ }
197
+
198
+ .uniformButtonGroup {
199
+ font-size: 0;
200
+ a{
201
+ font-size: 1rem;
202
+ position:relative;
203
+ z-index: 1;
204
+ margin-right: -1px;
205
+ border-radius: 0;
206
+ &:last-of-type{
207
+ border-radius: 0 0.25em 0.25em 0;
208
+ }
209
+ &:first-of-type{
210
+ border-radius: 0.25em 0 0 0.25em;
211
+ }
212
+ &.active{
213
+ background-color: darken(color('green'), 3);
214
+ background-image: linear-gradient(lighten(color('green'), 5), darken(color('green'), 3));
215
+ border-color: darken(color('green'), 3);
216
+ color: white;
217
+ }
218
+ }
219
+ }
@@ -1,55 +1,63 @@
1
- $padding: 0.5em;
2
1
  .uniformCard{
3
2
  background: white;
4
- border: 1px solid $gray-light;
3
+ border-width: 1px;
4
+ border-style: solid;
5
+ border-color: color('gray-light');
5
6
  border-radius: 0.25em;
6
7
  margin-bottom: 1em;
7
- &.width-auto{
8
- display:inline-block;
8
+
9
+ &.-nest{
10
+ margin-left: -0.5em;
11
+ margin-right: -0.5em;
9
12
  }
10
- &.clip{
13
+ &.-clip{
11
14
  overflow:hidden;
12
15
  }
13
- .un-pad{
14
- margin-left: -0.5em;
15
- margin-right: -0.5em;
16
+
17
+ &.-tile{
18
+ border-radius: 0;
19
+ margin: 0;
20
+ margin-bottom: -1px;
21
+ margin-right: -1px;
16
22
  }
23
+
17
24
  .uniformCard-header,
18
- .uniformCard-footer{
19
- padding: $padding;
25
+ .uniformCard-footer,
26
+ .uniformCard-body{
27
+ padding: 1em;
28
+ clear: both;
20
29
  }
21
30
  .uniformCard-header{
22
- border-bottom: 1px solid $gray-light;
23
- .fortycon.arrow_down_large{
24
- transition: all 0.2s;
25
- }
31
+ border-bottom: 1px solid color('gray-light');
26
32
  }
27
33
  .uniformCard-footer{
28
- border-top: 1px solid $gray-light;
29
- clear: both;
30
- }
31
- .uniformCard-body{
32
- padding: $padding;
34
+ border-top: 1px solid color('gray-light');
33
35
  }
36
+
34
37
  .uniformCard-collapse{
35
- max-height: 0;
36
- overflow: hidden;
37
- transition: max-height 0.2s;
38
+ display:none;
39
+ }
40
+
41
+ .uniformCard-icon{
42
+ transition: transform 0.2s;
38
43
  }
44
+
39
45
  &.expanded{
40
46
  .uniformCard-header {
41
- .fortycon.arrow_down_large{
47
+ .uniformCard-icon{
42
48
  transform: rotate(180deg);
43
49
  }
44
50
  }
45
51
  .uniformCard-collapse{
46
- max-height: 9999px;
52
+ display:block;
47
53
  }
48
54
  }
55
+
49
56
  &.uniformCard-accordion{
50
57
  margin: 0;
51
58
  margin-bottom:-1px;
52
59
  border-radius: 0;
60
+ transition: margin 0.5s;
53
61
  &:first-of-type{
54
62
  border-top-left-radius: 0.25em;
55
63
  border-top-right-radius: 0.25em;
@@ -62,7 +70,7 @@ $padding: 0.5em;
62
70
  cursor: pointer;
63
71
  border-bottom-style: none;
64
72
  &:hover{
65
- background: lighten($blue, 50);
73
+ background: lighten(color('blue'), 50);
66
74
  }
67
75
  }
68
76
  &.expanded{
@@ -0,0 +1,19 @@
1
+ .container{
2
+ max-width: 100%;
3
+ width: 100%;
4
+ margin-left: auto;
5
+ margin-right: auto;
6
+ padding-left: 1em;
7
+ padding-right: 1em;
8
+ }
9
+
10
+ @include size-rule('lg'){
11
+ .container{
12
+ max-width: 1080px;
13
+ }
14
+ }
15
+ @include size-rule('xl'){
16
+ .container{
17
+ max-width: 1440px;
18
+ }
19
+ }
@@ -6,6 +6,7 @@
6
6
  z-index: 9999;
7
7
  background: white;
8
8
  border-top: white;
9
+ border-radius: 0.25em;
9
10
  button{
10
11
  appearance: none;
11
12
  outline: none;
@@ -15,14 +16,17 @@
15
16
  padding: 0.5em;
16
17
  display: block;
17
18
  &:hover{
18
- background: lighten($blue, 45);
19
+ background: lighten(color('blue'), 45);
19
20
  }
20
21
  }
21
22
  &.absolute{
22
23
  box-shadow: 0 0 3px 2px rgba(black, 0.2);
23
24
  }
25
+ &.square{
26
+ border-radius: 0;
27
+ }
24
28
  .uniformDropdown-pointer{
25
- @include media($md){
29
+ @include size-rule('md'){
26
30
  position:absolute;
27
31
  bottom: 100%;
28
32
  left: 50%;
@@ -44,13 +48,13 @@
44
48
  }
45
49
  }
46
50
  &.has-pointer{
47
- @include media($md){
51
+ @include size-rule('md'){
48
52
  margin-top:1em;
49
53
  }
50
54
  }
51
55
  }
52
56
 
53
- @include media($sm){
57
+ @include size-rule('sm'){
54
58
  .uniformOverlay{
55
59
  position: fixed;
56
60
  top:0;
@@ -0,0 +1,103 @@
1
+ @include size-rules('.uniformCheckboxCollection'){
2
+ label{
3
+ display:block;
4
+ margin-right: 1em;
5
+ font-weight: normal !important;
6
+ line-height: 1;
7
+ margin: 0;
8
+ margin-bottom: 0.5em;
9
+ input{
10
+ margin-right: 0.25em;
11
+ }
12
+ }
13
+ &.-inline{
14
+ display: flex;
15
+ align-items: center;
16
+ label{
17
+ margin: 0;
18
+ margin-right: 0.3em;
19
+ padding: 0.5em 0.2em;
20
+ line-height: 1.3;
21
+ flex: 1 1 auto;
22
+ text-align: center;
23
+ border-radius: 0.25em;
24
+ border: 1px solid color('gray-light');
25
+ &.active{
26
+ background: color('gray-light');
27
+ box-shadow: inset 0 -1px 0 0 color('blue');
28
+ }
29
+ &:last-of-type{
30
+ margin-right: 0;
31
+ }
32
+ }
33
+ }
34
+ &.-buttons{
35
+ label{
36
+ padding: 0.5em;
37
+ line-height: 1.3;
38
+ border-radius: 0.25em;
39
+ border: 1px solid color('gray-light');
40
+ cursor: pointer;
41
+ &.active{
42
+ background: color('gray-light');
43
+ }
44
+ }
45
+ }
46
+ &.-invert{
47
+ &.inline,
48
+ &.buttons{
49
+ label{
50
+ border-color: lighten(color('gray'), 20);
51
+ &.active{
52
+ border-color: color('gray-dark');
53
+ background: color('gray-dark');
54
+ }
55
+ }
56
+ }
57
+ }
58
+ &.hide-check{
59
+ label{
60
+ cursor: pointer;
61
+ }
62
+ input{
63
+ display:none;
64
+ }
65
+ }
66
+ &.custom-check{
67
+ input{
68
+ display:none;
69
+ }
70
+ label{
71
+ &::before{
72
+ content: "";
73
+ display:inline-block;
74
+ width: 0.7em;
75
+ height: 0.7em;
76
+ border: 1px solid white;
77
+ border-radius: 2px;
78
+ vertical-align: -1px;
79
+ line-height: 0.7em;
80
+ }
81
+ &.active{
82
+ &::before{
83
+ border-color: color('green');
84
+ content: '\2714';
85
+ color: color('green');
86
+ }
87
+ }
88
+ }
89
+ &.invert{
90
+ label{
91
+ &::before{
92
+ border-color: darken(color('gray-dark'), 5);
93
+ }
94
+ &.active{
95
+ &::before{
96
+ border-color: black;
97
+ color: color('green-light');
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,58 @@
1
+ .uniformCheckbox,
2
+ .uniformRadio{
3
+ display:none;
4
+ }
5
+ .uniformRadio-indicator,
6
+ .uniformCheckbox-indicator{
7
+ display:inline-block;
8
+ width: 1em;
9
+ height: 1em;
10
+ border: 0.1em solid rgba(black, 0.35);
11
+ vertical-align:middle;
12
+ margin-top: -0.15em;
13
+ border-radius: 0.25em;
14
+ position:relative;
15
+ transition: border-color 0.05s ease-in;
16
+ &::before{
17
+ @include position-center;
18
+ border-radius: 0.25em;
19
+ content:"";
20
+ width: 0em;
21
+ height: 0em;
22
+ transition: width 0.05s ease-in, height 0.05s ease-in;
23
+ background: color('green');
24
+ }
25
+ &.checked{
26
+ border-color: color('green');
27
+ &::before{
28
+ width: 1em;
29
+ height: 1em;
30
+ }
31
+ }
32
+ }
33
+ .uniformCheckbox-indicator{
34
+ &::before{
35
+ background-image: url("data:image/svg+xml; utf8,#{icon-check(#FFFFFF)}");
36
+ background-position: center center;
37
+ background-repeat: no-repeat;
38
+ background-size: 80%;
39
+ }
40
+ }
41
+ .uniformRadio-indicator{
42
+ border-radius: 50%;
43
+ box-shadow: inset 0 0 0 0.1em white;
44
+ &::before{
45
+ border-radius: 50%;
46
+ }
47
+ &::after{
48
+ border-radius: 50%;
49
+ font-size:0;
50
+ content: "";
51
+ box-shadow: inset 0 0 0 1px white;
52
+ position:absolute;
53
+ left: 0;
54
+ top: 0;
55
+ width: 100%;
56
+ height: 100%;
57
+ }
58
+ }
@@ -0,0 +1,64 @@
1
+ .uniformFloatingLabel{
2
+ display: flex;
3
+ align-items: center;
4
+ border: 1px solid lighten(color('gray'), 40);
5
+ position:relative;
6
+ background:white;
7
+ &>*{
8
+ flex: 0 1 auto;
9
+ }
10
+ label{
11
+ z-index: 1;
12
+ padding: 0 1em;
13
+ font-weight:normal !important;
14
+ cursor: text;
15
+ }
16
+ & > input,
17
+ & > textarea,
18
+ & > select,
19
+ & > .uniformInputGroup{
20
+ @include uniformInput;
21
+ position:relative;
22
+ display:block;
23
+ width: 100%;
24
+ border:none !important;
25
+ background:none;
26
+ }
27
+ & > select {
28
+ z-index: 2;
29
+ }
30
+ & > .uniformInputGroup{
31
+ display: flex;
32
+ }
33
+
34
+ &.enabled{
35
+ label{
36
+ transition: font-size 0.1s, line-height 0.1s, opacity 0.1s;
37
+ }
38
+ }
39
+
40
+ &.inactive{
41
+ input,
42
+ textarea,
43
+ select{
44
+ &::placeholder{
45
+ color: transparent;
46
+ }
47
+ }
48
+ }
49
+ &.float{
50
+ label{
51
+ font-size: 80%;
52
+ opacity: 0.8;
53
+ }
54
+ }
55
+ &.active{
56
+ label{
57
+ color: color('green-dark');
58
+ opacity: 1;
59
+ }
60
+ }
61
+ input.pad-2x{
62
+ padding: 1em;
63
+ }
64
+ }
@@ -0,0 +1,56 @@
1
+ .uniformInputGroup{
2
+ background: white;
3
+ border: 1px solid lighten(color('gray'), 40);
4
+ display: flex;
5
+ align-items: center;
6
+ transition: box-shadow 0.1s ease-in;
7
+ &>*{
8
+ flex: 0 1 auto;
9
+ line-height: 1;
10
+ }
11
+ input{
12
+ border: none !important;
13
+ background:none;
14
+ appearance: none;
15
+ outline: none;
16
+ display:block;
17
+ outline: none;
18
+ width: 100%;
19
+ font-family: $system-font;
20
+ padding: 0.5em;
21
+ line-height: 1.3;
22
+ }
23
+ .input{
24
+ padding: 0;
25
+ flex: 1 1 auto;
26
+ }
27
+ &>*:not(input){
28
+ padding: 0 0.5em;
29
+ &.pad-quarter{
30
+ padding: 0 0.25em;
31
+ }
32
+ }
33
+ &.focus{
34
+ box-shadow: inset 0 -2px 0 color('green');
35
+ input{
36
+ box-shadow: none !important;
37
+ }
38
+ }
39
+ &.invert{
40
+ border-color: color('gray');
41
+ border-radius: 0.25em;
42
+ overflow:hidden;
43
+ }
44
+ .label{
45
+ color: lighten(color('gray'), 20);
46
+ }
47
+ @include size-rule('sm'){
48
+ input{
49
+ padding-top: 0.5em;
50
+ padding-bottom: 0.5em;
51
+ }
52
+ }
53
+ &.border-none{
54
+ border: none;
55
+ }
56
+ }