uniform-ui 2.4.1 → 3.0.0.beta8
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.js +13 -13
- data/lib/assets/javascripts/uniform/checkbox.js +59 -16
- data/lib/assets/javascripts/uniform/component.js +27 -4
- data/lib/assets/javascripts/uniform/dropdown.js +78 -209
- data/lib/assets/javascripts/uniform/floating-label-input.js +65 -0
- data/lib/assets/javascripts/uniform/icons.js +12 -3
- data/lib/assets/javascripts/uniform/modal.js +29 -30
- data/lib/assets/javascripts/uniform/popover.js +26 -24
- data/lib/assets/javascripts/uniform/resizer.js +26 -30
- data/lib/assets/javascripts/uniform/select.js +188 -222
- data/lib/assets/javascripts/uniform/tooltip.js +11 -11
- data/lib/assets/stylesheets/uniform.scss +3 -7
- data/lib/assets/stylesheets/uniform/base.scss +20 -1
- data/lib/assets/stylesheets/uniform/components/buttons.scss +171 -184
- data/lib/assets/stylesheets/uniform/components/checkbox.scss +104 -0
- data/lib/assets/stylesheets/uniform/components/container.scss +3 -2
- data/lib/assets/stylesheets/uniform/components/dropdown.scss +8 -5
- data/lib/assets/stylesheets/uniform/components/floating-label-input.scss +29 -0
- data/lib/assets/stylesheets/uniform/components/input-group.scss +39 -0
- data/lib/assets/stylesheets/uniform/components/label.scss +21 -16
- data/lib/assets/stylesheets/uniform/components/loaders.scss +28 -54
- data/lib/assets/stylesheets/uniform/components/modal.scss +21 -36
- data/lib/assets/stylesheets/uniform/components/nav.scss +50 -87
- data/lib/assets/stylesheets/uniform/components/pointer.scss +83 -0
- data/lib/assets/stylesheets/uniform/components/select.scss +97 -107
- data/lib/assets/stylesheets/uniform/components/table.scss +31 -138
- data/lib/assets/stylesheets/uniform/components/thumb.scss +40 -25
- data/lib/assets/stylesheets/uniform/components/z-input.scss +26 -0
- data/lib/assets/stylesheets/uniform/defaults.scss +31 -10
- data/lib/assets/stylesheets/uniform/functions.scss +32 -7
- data/lib/assets/stylesheets/uniform/mixins.scss +110 -57
- data/lib/assets/stylesheets/uniform/utilities.scss +55 -0
- data/lib/assets/stylesheets/uniform/utilities/background.scss +9 -0
- data/lib/assets/stylesheets/uniform/utilities/borders.scss +84 -0
- data/lib/assets/stylesheets/uniform/utilities/effects.scss +172 -0
- data/lib/assets/stylesheets/uniform/utilities/layout.scss +181 -0
- data/lib/assets/stylesheets/uniform/utilities/position.scss +42 -0
- data/lib/assets/stylesheets/uniform/utilities/sizing.scss +60 -0
- data/lib/assets/stylesheets/uniform/utilities/spacing.scss +68 -0
- data/lib/assets/stylesheets/uniform/utilities/svg.scss +5 -0
- data/lib/assets/stylesheets/uniform/utilities/text.scss +158 -0
- data/lib/assets/stylesheets/uniform/variables.scss +113 -42
- data/lib/uniform/version.rb +1 -1
- metadata +22 -45
- data/lib/assets/javascripts/uniform.jquery.js +0 -152
- data/lib/assets/javascripts/uniform/dom-helpers.js +0 -158
- data/lib/assets/javascripts/uniform/floating-label.js +0 -54
- data/lib/assets/stylesheets/uniform-print.scss +0 -1
- data/lib/assets/stylesheets/uniform/components.scss +0 -11
- data/lib/assets/stylesheets/uniform/components/alert.scss +0 -72
- data/lib/assets/stylesheets/uniform/components/card.scss +0 -93
- data/lib/assets/stylesheets/uniform/components/form.scss +0 -149
- data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +0 -103
- data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +0 -58
- data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +0 -65
- data/lib/assets/stylesheets/uniform/components/form/input-group.scss +0 -56
- data/lib/assets/stylesheets/uniform/components/form/tristate.scss +0 -88
- data/lib/assets/stylesheets/uniform/components/grid.scss +0 -179
- data/lib/assets/stylesheets/uniform/components/row.scss +0 -67
- data/lib/assets/stylesheets/uniform/components/tooltip.scss +0 -41
- data/lib/assets/stylesheets/uniform/helpers.scss +0 -133
- data/lib/assets/stylesheets/uniform/helpers/border.scss +0 -28
- data/lib/assets/stylesheets/uniform/helpers/colors.scss +0 -24
- data/lib/assets/stylesheets/uniform/helpers/margin.scss +0 -27
- data/lib/assets/stylesheets/uniform/helpers/padding.scss +0 -9
- data/lib/assets/stylesheets/uniform/helpers/position.scss +0 -20
- data/lib/assets/stylesheets/uniform/helpers/sizes.scss +0 -38
- data/lib/assets/stylesheets/uniform/helpers/text.scss +0 -152
- data/lib/assets/stylesheets/uniform/print/grid.scss +0 -50
@@ -0,0 +1,104 @@
|
|
1
|
+
.uniformRadio,
|
2
|
+
.uniformCheckbox{
|
3
|
+
display:inline-block;
|
4
|
+
width: 1em;
|
5
|
+
height: 1em;
|
6
|
+
border: 0.0714em solid color('gray-50');
|
7
|
+
vertical-align:middle;
|
8
|
+
margin-top: -0.15em;
|
9
|
+
border-radius: 0.2856em;
|
10
|
+
position:relative;
|
11
|
+
transition: border-color 0.05s ease-in;
|
12
|
+
box-shadow: inset 0.0714em 0.0714em 0 0 white, inset 0.1428em 0.1428em 0.1428em rgba(black, 0.2);
|
13
|
+
color: color('blue');
|
14
|
+
outline: 0;
|
15
|
+
&::before{
|
16
|
+
position:absolute;
|
17
|
+
left:50%;
|
18
|
+
top:50%;
|
19
|
+
transform: translate(-50%, -50%);
|
20
|
+
border-radius: 0.25em;
|
21
|
+
content:"";
|
22
|
+
width: 0em;
|
23
|
+
height: 0em;
|
24
|
+
transition: width 0.05s ease-in, height 0.05s ease-in;
|
25
|
+
background: currentColor;
|
26
|
+
}
|
27
|
+
&.checked{
|
28
|
+
border-color: currentColor;
|
29
|
+
&::before{
|
30
|
+
width: 1em;
|
31
|
+
height: 1em;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
&.-toggle {
|
35
|
+
width: 2em;
|
36
|
+
height: 1em;
|
37
|
+
border-radius: 50%;
|
38
|
+
background: color('gray-10');
|
39
|
+
box-shadow: inset 1px 1px 2px rgba(black, 0.2);
|
40
|
+
}
|
41
|
+
&:focus {
|
42
|
+
box-shadow: inset 0.0714em 0.0714em 0.0714em rgba(black, 0.2), 0 0 0 0.1428em rgba(color('blue'), 0.7);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
.uniformCheckbox{
|
46
|
+
&::before{
|
47
|
+
background-image: icon-check(#FFFFFF);
|
48
|
+
background-position: center center;
|
49
|
+
background-repeat: no-repeat;
|
50
|
+
background-size: 80%;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
.uniformRadio{
|
55
|
+
border-radius: 50%;
|
56
|
+
&::before{
|
57
|
+
border-radius: 50%;
|
58
|
+
}
|
59
|
+
|
60
|
+
&.checked{
|
61
|
+
&::before{
|
62
|
+
width: 0.5712em;
|
63
|
+
height: 0.5712em;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
.uniformToggle {
|
69
|
+
width: 1.4284em;
|
70
|
+
height: 0.8572em;
|
71
|
+
vertical-align:middle;
|
72
|
+
margin-top: -0.1428em;
|
73
|
+
background: color('gray-20');
|
74
|
+
border-radius: 1em;
|
75
|
+
box-shadow: inset 0.0714em 0.0714em 0.0714em rgba(black, 0.2);
|
76
|
+
display: inline-block;
|
77
|
+
position: relative;
|
78
|
+
transition: background 50ms ease-in-out;
|
79
|
+
color: color('blue');
|
80
|
+
outline: 0;
|
81
|
+
&::before{
|
82
|
+
content: "";
|
83
|
+
transition: right 50ms ease-in-out;
|
84
|
+
width: 0.5716em; // 12/14
|
85
|
+
height: 0.5716em;
|
86
|
+
margin: 0.1428em;
|
87
|
+
background: white;
|
88
|
+
border-radius: 50%;
|
89
|
+
position: absolute;
|
90
|
+
right: calc(100% - 0.8398em);
|
91
|
+
top: 0;
|
92
|
+
box-shadow: 0.0714em 0.0714em 0.0714em rgba(black, 0.2);
|
93
|
+
}
|
94
|
+
&.checked{
|
95
|
+
justify-content: end;
|
96
|
+
background: currentColor;
|
97
|
+
&::before{
|
98
|
+
right: 0;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
&:focus {
|
102
|
+
box-shadow: inset 0.0714em 0.0714em 0.0714em rgba(black, 0.2), 0 0 0 0.1428em rgba(color('blue'), 0.7);
|
103
|
+
}
|
104
|
+
}
|
@@ -25,15 +25,18 @@
|
|
25
25
|
&.square{
|
26
26
|
border-radius: 0;
|
27
27
|
}
|
28
|
-
|
29
|
-
|
28
|
+
}
|
29
|
+
|
30
|
+
@include breakpoint('md'){
|
31
|
+
.uniformDropdown-dropdown{
|
32
|
+
&.has-pointer{
|
30
33
|
margin-top:1em;
|
31
34
|
}
|
32
35
|
}
|
33
36
|
}
|
34
37
|
|
35
|
-
|
36
|
-
|
38
|
+
@include breakpoint('md'){
|
39
|
+
.uniformDropdown-pointer{
|
37
40
|
position:absolute;
|
38
41
|
bottom: 100%;
|
39
42
|
left: 50%;
|
@@ -55,7 +58,7 @@
|
|
55
58
|
}
|
56
59
|
}
|
57
60
|
|
58
|
-
@include
|
61
|
+
@include breakpoint('sm'){
|
59
62
|
.uniformOverlay{
|
60
63
|
position: fixed;
|
61
64
|
top:0;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
.uniformFloatingLabelInput{
|
2
|
+
position:relative;
|
3
|
+
|
4
|
+
label {
|
5
|
+
--font-size: 1em;
|
6
|
+
font-size: var(--font-size);
|
7
|
+
display: block;
|
8
|
+
position: absolute;
|
9
|
+
top: 50%;
|
10
|
+
left: 0;
|
11
|
+
transform: translateY(-50%);
|
12
|
+
transition: font-size 100ms, top 100ms, transform 100ms;
|
13
|
+
}
|
14
|
+
&.present {
|
15
|
+
label {
|
16
|
+
opacity: 0.8;
|
17
|
+
font-size: calc(var(--font-size) * 0.7);
|
18
|
+
top: 0;
|
19
|
+
transform: none;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
&:focus-within{
|
24
|
+
color: color('green-60');
|
25
|
+
label {
|
26
|
+
opacity: 1;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
.uniformInputGroup{
|
2
|
+
background: white;
|
3
|
+
border-width: 1px;
|
4
|
+
display: flex;
|
5
|
+
align-items: center;
|
6
|
+
transition: box-shadow 100ms ease-in;
|
7
|
+
|
8
|
+
&:focus-within{
|
9
|
+
border-color: rgba(var(--focus-color), 1);
|
10
|
+
box-shadow: 0 0 0 2px rgba(var(--focus-color), 1);
|
11
|
+
}
|
12
|
+
|
13
|
+
& > * {
|
14
|
+
flex: 0 1 auto;
|
15
|
+
padding-left: 0.5em;
|
16
|
+
&:last-child{
|
17
|
+
padding-right: 0.5em;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
*:focus {
|
22
|
+
box-shadow: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
input,
|
26
|
+
.input{
|
27
|
+
flex: 1 1 auto;
|
28
|
+
border: none !important;
|
29
|
+
background:none;
|
30
|
+
appearance: none;
|
31
|
+
outline: none;
|
32
|
+
padding: 0.5em;
|
33
|
+
box-shadow: none;
|
34
|
+
}
|
35
|
+
|
36
|
+
.uniformInput {
|
37
|
+
border: none !important;
|
38
|
+
}
|
39
|
+
}
|
@@ -1,28 +1,33 @@
|
|
1
|
+
@include color-rule('.uniformLabel.') using ($color) {
|
2
|
+
color: $color;
|
3
|
+
background-color: rgba($color, 0.2);
|
4
|
+
}
|
5
|
+
|
1
6
|
.uniformLabel{
|
7
|
+
--pad-v: 0.1428em;
|
8
|
+
--pad-h: 0.357em;
|
2
9
|
display:inline-block;
|
3
10
|
vertical-align:baseline;
|
4
|
-
padding:
|
5
|
-
border: 0.1em solid color('gray-darker');
|
6
|
-
color: color('gray-darker');
|
11
|
+
padding: var(--pad-v) var(--pad-h);
|
7
12
|
border-radius: 0.3em;
|
8
13
|
line-height: 1.2;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
padding: 0.1714em 0.457em 0.1714em;
|
14
|
+
background: rgba(color('gray-80'), 0.15);
|
15
|
+
&.-outline{
|
16
|
+
border: 0.1em solid currentColor;
|
17
|
+
background: transparent;
|
14
18
|
}
|
15
19
|
&.-round{
|
16
20
|
border-radius: 1em;
|
21
|
+
padding-left: calc(var(--pad-h) * 1.5);
|
22
|
+
padding-right: calc(var(--pad-h) * 1.5);
|
17
23
|
}
|
18
|
-
|
19
|
-
|
24
|
+
&.-lg{
|
25
|
+
--pad-v: 0.215em;
|
26
|
+
--pad-h: 0.54em;
|
27
|
+
}
|
28
|
+
&.-xl{
|
29
|
+
--pad-v: 0.43em;
|
30
|
+
--pad-h: 1.071em;
|
20
31
|
}
|
21
32
|
}
|
22
33
|
|
23
|
-
@include colors('.uniformLabel.', ('border-color' 'color'));
|
24
|
-
@each $key, $value in $colors {
|
25
|
-
@include size-rules(".uniformLabel.-fill.-#{$key}"){
|
26
|
-
background-color: rgba($value, 0.15);
|
27
|
-
}
|
28
|
-
}
|
@@ -2,78 +2,52 @@
|
|
2
2
|
line-height:1em;
|
3
3
|
display:inline-block;
|
4
4
|
white-space:nowrap;
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
&:before,
|
6
|
+
&:after{
|
7
|
+
margin: 0 0.2em;
|
8
|
+
width: 0.8em;
|
9
|
+
height: 0.8em;
|
10
|
+
border-radius: 50%;
|
11
|
+
background-color: currentColor;
|
8
12
|
display: inline-block;
|
9
13
|
vertical-align: middle;
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
animation-delay: 0.3s;
|
14
|
-
line-height: 0;
|
15
|
-
vertical-align: middle;
|
16
|
-
display: inline-block;
|
17
|
-
width: 80%;
|
18
|
-
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 104'><circle cx='52' cy='52' r='52' fill='white'/><circle cx='50' cy='50' r='50' fill='black'/></svg>")
|
19
|
-
}
|
20
|
-
}
|
21
|
-
span:first-of-type:before{
|
22
|
-
animation-delay: 0s;
|
23
|
-
}
|
24
|
-
span:last-of-type:before{
|
25
|
-
animation-delay: 0.6s;
|
14
|
+
line-height: 0;
|
15
|
+
animation: uniformLoader 1.4s infinite cubic-bezier(0.65,0,0.35,1);
|
16
|
+
content: "";
|
26
17
|
}
|
27
|
-
|
28
|
-
|
29
|
-
}
|
30
|
-
&.-light{
|
31
|
-
span{
|
32
|
-
&:before{
|
33
|
-
content: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 104'><circle cx='52' cy='52' r='52' fill='black'/><circle cx='54' cy='54' r='50' fill='white'/></svg>")
|
34
|
-
}
|
35
|
-
}
|
18
|
+
&:after{
|
19
|
+
animation-delay: 0.7s;
|
36
20
|
}
|
21
|
+
|
37
22
|
&.-cover{
|
38
|
-
display:block;
|
39
|
-
background:rgba(white, 0.5);
|
40
23
|
position:absolute;
|
41
|
-
top:0;
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
position:absolute;
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}
|
53
|
-
&.transparent{
|
54
|
-
background: none;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
&.-top{
|
58
|
-
.uniformLoader-container{
|
59
|
-
top: 20px;
|
24
|
+
top: 0;
|
25
|
+
bottom: 0;
|
26
|
+
left: 0;
|
27
|
+
right: 0;
|
28
|
+
&:before,
|
29
|
+
&:after{
|
30
|
+
position: absolute;
|
31
|
+
top: 50%;
|
32
|
+
left: 50%;
|
33
|
+
margin-top: -0.4em;
|
34
|
+
margin-left: -0.4em;
|
60
35
|
}
|
36
|
+
&:before {margin-right: 1.2em;}
|
37
|
+
&:after { margin-left: 0.8em;}
|
61
38
|
}
|
62
39
|
}
|
63
40
|
|
64
41
|
@keyframes uniformLoader {
|
65
42
|
0% {
|
66
|
-
-webkit-transform: scale(0);
|
67
43
|
transform: scale(0);
|
68
44
|
opacity: 0;
|
69
45
|
}
|
70
|
-
|
71
|
-
-webkit-transform: scale(1);
|
46
|
+
50%{
|
72
47
|
transform: scale(1);
|
73
|
-
opacity:
|
48
|
+
opacity: 1;
|
74
49
|
}
|
75
50
|
100%{
|
76
|
-
-webkit-transform: scale(0);
|
77
51
|
transform: scale(0);
|
78
52
|
opacity: 0;
|
79
53
|
}
|
@@ -12,46 +12,29 @@
|
|
12
12
|
position: absolute;
|
13
13
|
top: 0;
|
14
14
|
width: 100%;
|
15
|
-
text-align:center;
|
16
15
|
padding: 2em;
|
17
16
|
z-index: 9999;
|
17
|
+
display: flex;
|
18
|
+
justify-content: center;
|
19
|
+
& > * {
|
20
|
+
z-index: 2;
|
21
|
+
}
|
18
22
|
}
|
19
23
|
|
20
|
-
.uniformModal-container{
|
21
|
-
|
22
|
-
|
23
|
-
position:relative;
|
24
|
-
margin: auto;
|
25
|
-
background: white;
|
26
|
-
border-radius: 0.25em;
|
27
|
-
max-width: 90%;
|
28
|
-
z-index: 2;
|
29
|
-
&.-fill{
|
30
|
-
width: 90%;
|
31
|
-
}
|
32
|
-
&.-reset{
|
33
|
-
margin: -2em;
|
34
|
-
max-width: none;
|
35
|
-
border-radius: 0;
|
36
|
-
&.-fill{
|
37
|
-
width: 100%;
|
38
|
-
}
|
39
|
-
}
|
24
|
+
.uniformModal-close-container {
|
25
|
+
position: relative;
|
26
|
+
width: 0;
|
40
27
|
}
|
41
28
|
|
42
29
|
.uniformModal-close{
|
43
30
|
z-index: 2;
|
44
|
-
position: absolute;
|
45
|
-
padding: 0.3em;
|
46
|
-
top: 0;
|
47
|
-
right: 0;
|
48
|
-
font-size:1.5em;
|
49
31
|
color: white;
|
50
|
-
opacity: 0.5;
|
51
|
-
line-height:1;
|
52
32
|
cursor: pointer;
|
53
|
-
|
54
|
-
|
33
|
+
position: absolute;
|
34
|
+
bottom: 100%;
|
35
|
+
height: 2em;
|
36
|
+
width: 2em;
|
37
|
+
opacity: 0.5;
|
55
38
|
&:hover{
|
56
39
|
opacity: 1;
|
57
40
|
}
|
@@ -59,19 +42,21 @@
|
|
59
42
|
&:before{
|
60
43
|
content: "";
|
61
44
|
width: 1px;
|
62
|
-
height: 1.
|
63
|
-
|
64
|
-
transform: rotate(-45deg);
|
65
|
-
background: white;
|
45
|
+
height: 1.5em;
|
46
|
+
background: currentColor;
|
66
47
|
position:absolute;
|
67
48
|
left: 50%;
|
68
|
-
top:
|
49
|
+
top: 50%;
|
50
|
+
transform-origin: 50% 50%;
|
51
|
+
transform: translateY(-50%) rotate(-45deg);
|
69
52
|
}
|
70
53
|
&:before{
|
71
|
-
transform: rotate(45deg);
|
54
|
+
transform: translateY(-50%) rotate(45deg);
|
72
55
|
}
|
73
56
|
}
|
74
57
|
|
58
|
+
// TODO replace with backdrop-filter: blur(4px);
|
59
|
+
// when supported by Firefox https://caniuse.com/css-backdrop-filter
|
75
60
|
.uniformModal-blur{
|
76
61
|
top: 0;
|
77
62
|
left: 0;
|