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
@@ -1,24 +1,11 @@
|
|
1
|
-
@mixin uniformNav-vertical(){
|
2
|
-
flex-direction: column;
|
3
|
-
align-items: stretch;
|
4
|
-
& > * {
|
5
|
-
padding: 0.5em 0.5em;
|
6
|
-
}
|
7
|
-
& > a{
|
8
|
-
border: none !important; // TODO remove !important
|
9
|
-
padding-bottom: 0.5em !important; // TODO remove !important
|
10
|
-
&:hover{
|
11
|
-
color: color('blue');
|
12
|
-
background: rgba(black, 0.05);
|
13
|
-
}
|
14
|
-
&.active{
|
15
|
-
color: white;
|
16
|
-
background: color('green');
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
1
|
.uniformNav{
|
2
|
+
--border-opacity: 1;
|
3
|
+
--text-opacity: 1;
|
4
|
+
--bg-opacity: 0;
|
5
|
+
|
6
|
+
--hover-color: #{toRGB(color('blue'))};
|
7
|
+
--active-color: #{toRGB(color('green-60'))};
|
8
|
+
--color: #{toRGB(color('blue'))};
|
22
9
|
display: flex;
|
23
10
|
flex-wrap: wrap;
|
24
11
|
align-items: stretch;
|
@@ -29,100 +16,76 @@
|
|
29
16
|
}
|
30
17
|
|
31
18
|
& > * {
|
19
|
+
--text-opacity: 1;
|
32
20
|
flex: 0 0 auto;
|
33
21
|
display: flex;
|
34
22
|
align-items: center;
|
35
23
|
padding: 0 1em;
|
36
|
-
border-style: solid none;
|
37
24
|
border-color: transparent;
|
38
25
|
border-top-width: 2px;
|
39
26
|
border-bottom-width: 2px;
|
40
|
-
&.
|
27
|
+
&.flex-fill{
|
41
28
|
flex: 1 1 auto;
|
42
29
|
}
|
43
30
|
}
|
44
31
|
& > a{
|
45
32
|
text-decoration: none;
|
33
|
+
color: rgba(var(--color), var(--text-opacity));
|
46
34
|
&:hover{
|
47
|
-
color: color
|
48
|
-
border-
|
35
|
+
color: rgba(var(--hover-color), 1);
|
36
|
+
border-left-color: rgba(var(--hover-color), var(--border-opacity));
|
37
|
+
border-bottom-color: rgba(var(--hover-color), var(--border-opacity));
|
49
38
|
}
|
50
39
|
&.active{
|
51
|
-
color:
|
52
|
-
border-
|
40
|
+
color: rgba(var(--active-color), 1);
|
41
|
+
border-left-color: rgba(var(--active-color), 1);
|
42
|
+
border-bottom-color: rgba(var(--active-color), 1);
|
53
43
|
}
|
54
44
|
}
|
55
|
-
|
45
|
+
|
46
|
+
&.-pills{
|
56
47
|
& > * {
|
57
|
-
|
58
|
-
|
48
|
+
border: none;
|
49
|
+
border-radius: 0.25em;
|
50
|
+
padding: 0.25em 0.5em;
|
59
51
|
}
|
60
|
-
|
61
|
-
|
62
|
-
& > * {
|
63
|
-
padding-top: 0.5em;
|
64
|
-
padding-bottom: 0.5em;
|
52
|
+
& > * + * {
|
53
|
+
margin-left: 0.25em;
|
65
54
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}
|
72
|
-
|
73
|
-
.uniformMainNav{
|
74
|
-
position: relative;
|
75
|
-
background: white;
|
76
|
-
box-shadow:inset 0 -1px 0 0 rgba(black, 0.10);
|
77
|
-
color: color('gray');
|
78
|
-
.uniformNav{
|
79
|
-
& > * {
|
80
|
-
padding-top: 0.25em;
|
81
|
-
padding-bottom: 0.25em;
|
82
|
-
color: color('gray-dark');
|
55
|
+
& > a {
|
56
|
+
&:hover,
|
57
|
+
&.active{
|
58
|
+
--bg-opacity: 0.15;
|
59
|
+
background-color: rgba(var(--hover-color), var(--bg-opacity));
|
60
|
+
}
|
83
61
|
&.active{
|
84
|
-
color: color(
|
62
|
+
background-color: rgba(var(--active-color), var(--bg-opacity));
|
85
63
|
}
|
86
64
|
}
|
87
65
|
}
|
88
|
-
|
89
|
-
&.bg-none{
|
90
|
-
background: none;
|
91
|
-
}
|
92
|
-
|
93
|
-
&.border-bottom-none,
|
94
|
-
&.border-none{
|
95
|
-
box-shadow: none;
|
96
|
-
}
|
97
|
-
|
66
|
+
|
98
67
|
&.-vertical{
|
99
|
-
|
100
|
-
|
101
|
-
|
68
|
+
flex-direction: column;
|
69
|
+
align-items: stretch;
|
70
|
+
& > * {
|
71
|
+
padding: 0.5em;
|
72
|
+
border-top-width: 0;
|
73
|
+
border-bottom-width: 0;
|
74
|
+
border-left-width: 2px;
|
75
|
+
border-right-width: 2px;
|
102
76
|
}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
background: none;
|
108
|
-
color: rgba(white, 0.7);
|
109
|
-
.uniformNav{
|
110
|
-
& > a {
|
111
|
-
color: rgba(white, 0.6);
|
112
|
-
&:hover{
|
113
|
-
color: white;
|
114
|
-
border-bottom-color: color('blue-bright');
|
115
|
-
}
|
116
|
-
&.active{
|
117
|
-
color: white;
|
118
|
-
background: rgba(black, 0.15);
|
119
|
-
border-bottom-color: color('green-light');
|
120
|
-
}
|
77
|
+
&.-pills{
|
78
|
+
& > * + * {
|
79
|
+
margin-left: 0;
|
80
|
+
margin-top: 0.1em;
|
121
81
|
}
|
122
82
|
}
|
123
|
-
&.border-bottom-none,
|
124
|
-
&.border-none{
|
125
|
-
box-shadow: none;
|
126
|
-
}
|
127
83
|
}
|
84
|
+
}
|
85
|
+
|
86
|
+
@include color-rule('.uniformNav.-active') using ($color) {
|
87
|
+
--active-color: #{toRGB($color)};
|
88
|
+
}
|
89
|
+
@include color-rule('.uniformNav.') using ($color) {
|
90
|
+
--color: #{toRGB($color)};
|
128
91
|
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
.uniformPointer{
|
2
|
+
position:relative;
|
3
|
+
margin: 7px 0 0 0;
|
4
|
+
&:after{
|
5
|
+
clip-path: polygon(-45% -45%, 145% -45%, 145% 145%);
|
6
|
+
z-index: 1;
|
7
|
+
position:absolute;
|
8
|
+
top: 0;
|
9
|
+
left: 50%;
|
10
|
+
margin: -6px 0 0 -7px;
|
11
|
+
transform: rotate(-45deg);
|
12
|
+
width: 14px;
|
13
|
+
height: 14px;
|
14
|
+
overflow: hidden;
|
15
|
+
content: "";
|
16
|
+
border-style: solid;
|
17
|
+
border-width: inherit;
|
18
|
+
box-shadow: inherit;
|
19
|
+
background: inherit;
|
20
|
+
border: inherit;
|
21
|
+
}
|
22
|
+
// covers overlap with container
|
23
|
+
&:before {
|
24
|
+
content: '';
|
25
|
+
position: absolute;
|
26
|
+
background: inherit;
|
27
|
+
z-index: 2;
|
28
|
+
height: 2px;
|
29
|
+
width: 40px;
|
30
|
+
margin-left: -20px;
|
31
|
+
top: 0;
|
32
|
+
left: 50%;
|
33
|
+
}
|
34
|
+
&.-right{
|
35
|
+
margin: 0 7px 0 0;
|
36
|
+
&:after{
|
37
|
+
left: auto;
|
38
|
+
top: 50%;
|
39
|
+
right: 0;
|
40
|
+
margin: -7px -6px 0 0;
|
41
|
+
transform: rotate(45deg);
|
42
|
+
}
|
43
|
+
&:before {
|
44
|
+
margin-left: 0;
|
45
|
+
margin-top: -20px;
|
46
|
+
height: 40px;
|
47
|
+
width: 2px;
|
48
|
+
top: 50%;
|
49
|
+
right: 0;
|
50
|
+
left: auto;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
&.-left{
|
54
|
+
margin: 0 0 0 7px;
|
55
|
+
&:after{
|
56
|
+
left: 0;
|
57
|
+
top: 50%;
|
58
|
+
margin: -7px 0 0 -6px;
|
59
|
+
transform: rotate(-135deg);
|
60
|
+
}
|
61
|
+
&:before {
|
62
|
+
margin-left: 0;
|
63
|
+
margin-top: -20px;
|
64
|
+
height: 40px;
|
65
|
+
width: 2px;
|
66
|
+
left: 0;
|
67
|
+
top: 50%;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
&.-bottom{
|
71
|
+
margin: 0 0 7px 0;
|
72
|
+
&:after{
|
73
|
+
top: auto;
|
74
|
+
bottom: 0;
|
75
|
+
margin: 0 0 -6px -7px;
|
76
|
+
transform: rotate(-225deg);
|
77
|
+
}
|
78
|
+
&:before{
|
79
|
+
top: auto;
|
80
|
+
bottom: 0;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
@@ -1,147 +1,137 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
.uniformSelect{
|
2
|
+
--border-color: #{red(color('gray-40'))}, #{green(color('gray-40'))}, #{blue(color('gray-40'))};
|
3
|
+
appearance: none;
|
4
|
+
outline: none;
|
5
|
+
vertical-align: middle;
|
6
|
+
display: inline-grid;
|
7
|
+
grid-template-columns: auto auto;
|
8
|
+
grid-template-rows: auto;
|
9
|
+
grid-template-areas: "value indicator";
|
10
|
+
align-items: center;
|
11
|
+
padding: 0 0.25em;
|
12
|
+
background: white;
|
13
|
+
select{
|
14
|
+
display: none;
|
15
|
+
}
|
10
16
|
&.active{
|
11
|
-
|
17
|
+
box-shadow: 0 0 0 2px rgba(var(--focus-color), 1), inset 2px 2px 3px rgba(black, 0.2);
|
18
|
+
.uniformSelect-indicator{
|
12
19
|
svg{
|
13
20
|
transform: rotate(180deg);
|
14
21
|
}
|
15
22
|
}
|
16
23
|
}
|
17
|
-
|
18
|
-
|
19
|
-
@include position-v-center();
|
20
|
-
right:0;
|
21
|
-
z-index:0;
|
22
|
-
line-height: 0;
|
23
|
-
svg{
|
24
|
-
fill: color('gray-darker');
|
25
|
-
transition: transform 0.2s;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
&.-invert{
|
29
|
-
background: color('gray');
|
30
|
-
color: white;
|
31
|
-
border-color: color('gray-dark');
|
32
|
-
.uniformSelect-edit-icon{
|
33
|
-
svg {
|
34
|
-
fill: white;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
.uniformSelect-selection{
|
39
|
-
font-size: 0.8em;
|
40
|
-
padding: 0.1em;
|
41
|
-
padding-left: 0.2em;
|
42
|
-
border: 1px solid color('gray');
|
43
|
-
background: color('gray-lighter');
|
44
|
-
display:inline-block;
|
45
|
-
border-radius: 0.25em;
|
46
|
-
}
|
47
|
-
.uniformSelect-remove{
|
48
|
-
display: inline-block;
|
49
|
-
width: 1em;
|
50
|
-
height: 0.8em;
|
51
|
-
margin-left: 0.25em;
|
52
|
-
position: relative;
|
53
|
-
&:after,
|
54
|
-
&:before{
|
55
|
-
content: "";
|
56
|
-
width: 1px;
|
57
|
-
height: 1em;
|
58
|
-
transform-origin: 50% 50%;
|
59
|
-
transform: rotate(-45deg);
|
60
|
-
background: color('gray');
|
61
|
-
position:absolute;
|
62
|
-
left: 50%;
|
63
|
-
top: 0;
|
64
|
-
}
|
65
|
-
&:before{
|
66
|
-
transform: rotate(45deg);
|
67
|
-
}
|
68
|
-
&:hover{
|
69
|
-
&:after,
|
70
|
-
&:before{
|
71
|
-
background: color('red');
|
72
|
-
}
|
73
|
-
}
|
24
|
+
&:focus{
|
25
|
+
box-shadow: 0 0 0 2px rgba(var(--focus-color), 1);
|
74
26
|
}
|
75
27
|
}
|
76
28
|
|
29
|
+
.uniformSelect-placeholder,
|
30
|
+
.uniformSelect-value {
|
31
|
+
grid-area: value;
|
32
|
+
white-space: nowrap;
|
33
|
+
}
|
34
|
+
.uniformSelect-placeholder{
|
35
|
+
opacity: 0;
|
36
|
+
user-select: none;
|
37
|
+
}
|
38
|
+
.uniformSelect-value{
|
39
|
+
z-index: 2;
|
40
|
+
text-align: left;
|
41
|
+
}
|
42
|
+
.uniformSelect-indicator{
|
43
|
+
padding-left: 0.25em;
|
44
|
+
grid-area: indicator;
|
45
|
+
svg{
|
46
|
+
width: 1.4em;
|
47
|
+
transition: transform 0.2s;
|
48
|
+
}
|
49
|
+
}
|
77
50
|
.uniformSelect-options{
|
78
|
-
|
79
|
-
box-shadow: 0 0 15px 1px rgba(black, 0.2), 0 0 2px 1px rgba(black, 0.1) ;
|
80
51
|
background: white;
|
52
|
+
box-shadow: 0 0 15px 1px rgba(black, 0.2), 0 0 2px 1px rgba(black, 0.1);
|
81
53
|
button{
|
82
54
|
appearance: none;
|
83
55
|
outline: none;
|
84
56
|
border: none;
|
85
57
|
background: none;
|
86
|
-
|
87
|
-
|
58
|
+
display: block;
|
59
|
+
min-width: 100%;
|
60
|
+
padding: 0.5em 1.5em;
|
61
|
+
text-align: left;
|
62
|
+
position: relative;
|
63
|
+
&.hide{
|
64
|
+
display: none;
|
65
|
+
}
|
88
66
|
&:hover{
|
89
67
|
background: lighten(color('blue'), 45);
|
90
68
|
}
|
69
|
+
&.active{
|
70
|
+
color: color('blue-60');
|
71
|
+
font-weight: bold;
|
72
|
+
&:after{
|
73
|
+
position: absolute;
|
74
|
+
left: 0.25em;
|
75
|
+
top: 50%;
|
76
|
+
transform: translateY(-50%);
|
77
|
+
background-image: icon-check(#{color('blue-40')});
|
78
|
+
background-size: contain;
|
79
|
+
content: '';
|
80
|
+
width: 1em;
|
81
|
+
height: 1em;
|
82
|
+
}
|
83
|
+
}
|
91
84
|
}
|
92
|
-
|
93
|
-
|
94
|
-
border-
|
95
|
-
|
96
|
-
background: color('background');
|
85
|
+
.uniformSelect-actions{
|
86
|
+
border-top: 1px solid color('gray-20');
|
87
|
+
border-bottom: 1px solid color('gray-20');
|
88
|
+
background: darken(white, 5);
|
97
89
|
padding: 0.5em;
|
98
90
|
&:empty{
|
99
|
-
display:none;
|
91
|
+
display: none;
|
100
92
|
}
|
101
93
|
}
|
102
94
|
.uniformSelect-show-all {
|
103
95
|
color: color('blue');
|
104
96
|
background: none;
|
97
|
+
text-align:center;
|
105
98
|
&:hover{
|
106
99
|
background: none;
|
107
100
|
}
|
108
101
|
}
|
109
102
|
.uniformSelect-done{
|
110
103
|
border-radius: 0.25em;
|
111
|
-
border: 1px solid color('gray');
|
104
|
+
border: 1px solid color('gray-20');
|
105
|
+
background: white;
|
106
|
+
text-align:center;
|
112
107
|
background: white;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
.uniformSelect-option{
|
116
|
-
position:relative;
|
117
|
-
cursor: pointer;
|
118
|
-
&.active{
|
119
|
-
box-shadow:none;
|
120
|
-
color: color('green-dark');
|
121
|
-
padding-left: 2.5em !important;
|
122
|
-
font-weight: bold;
|
123
|
-
}
|
124
|
-
.uniformSelect-option-icon{
|
125
|
-
fill: color('green');
|
126
|
-
position: absolute;
|
127
|
-
top: 0.2em;
|
128
|
-
left: 0.2em;
|
129
|
-
font-size: 1.5em;
|
130
108
|
}
|
131
109
|
}
|
132
110
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
111
|
+
|
112
|
+
|
113
|
+
.uniformSelect-selection{
|
114
|
+
display: inline-flex;
|
115
|
+
align-items: center;
|
116
|
+
font-size: 0.8em;
|
117
|
+
margin: 0.2em 0;
|
118
|
+
padding: 0;
|
119
|
+
line-height: 1;
|
120
|
+
padding-left:0.5em;
|
121
|
+
background: darken(color('gray-10'), 5);
|
122
|
+
border-radius: 0.25em;
|
123
|
+
span{
|
124
|
+
flex: 1 1 auto;
|
143
125
|
}
|
144
|
-
.uniformSelect-
|
145
|
-
|
126
|
+
.uniformSelect-remove{
|
127
|
+
padding: 0.2em;
|
128
|
+
flex: 0 1 auto;
|
129
|
+
svg {
|
130
|
+
width: 0.8em;
|
131
|
+
height: auto;
|
132
|
+
}
|
133
|
+
&:hover{
|
134
|
+
fill: color('red');
|
135
|
+
}
|
146
136
|
}
|
147
137
|
}
|