uniform-ui 2.3.8 → 3.0.0.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets/javascripts/uniform.js +19 -19
  3. data/lib/assets/javascripts/uniform/checkbox.js +59 -16
  4. data/lib/assets/javascripts/uniform/component.js +20 -4
  5. data/lib/assets/javascripts/uniform/dropdown.js +78 -209
  6. data/lib/assets/javascripts/uniform/floating-label-input.js +63 -0
  7. data/lib/assets/javascripts/uniform/icons.js +12 -3
  8. data/lib/assets/javascripts/uniform/modal.js +15 -18
  9. data/lib/assets/javascripts/uniform/popover.js +42 -25
  10. data/lib/assets/javascripts/uniform/resizer.js +26 -30
  11. data/lib/assets/javascripts/uniform/select.js +188 -222
  12. data/lib/assets/javascripts/uniform/tooltip.js +11 -11
  13. data/lib/assets/stylesheets/uniform.scss +3 -7
  14. data/lib/assets/stylesheets/uniform/base.scss +20 -1
  15. data/lib/assets/stylesheets/uniform/components/buttons.scss +171 -184
  16. data/lib/assets/stylesheets/uniform/components/checkbox.scss +104 -0
  17. data/lib/assets/stylesheets/uniform/components/container.scss +3 -2
  18. data/lib/assets/stylesheets/uniform/components/dropdown.scss +8 -5
  19. data/lib/assets/stylesheets/uniform/components/floating-label-input.scss +29 -0
  20. data/lib/assets/stylesheets/uniform/components/input-group.scss +30 -0
  21. data/lib/assets/stylesheets/uniform/components/label.scss +21 -16
  22. data/lib/assets/stylesheets/uniform/components/loaders.scss +28 -54
  23. data/lib/assets/stylesheets/uniform/components/nav.scss +50 -87
  24. data/lib/assets/stylesheets/uniform/components/pointer.scss +83 -0
  25. data/lib/assets/stylesheets/uniform/components/select.scss +97 -107
  26. data/lib/assets/stylesheets/uniform/components/table.scss +31 -138
  27. data/lib/assets/stylesheets/uniform/components/thumb.scss +40 -25
  28. data/lib/assets/stylesheets/uniform/components/z-input.scss +20 -0
  29. data/lib/assets/stylesheets/uniform/defaults.scss +31 -10
  30. data/lib/assets/stylesheets/uniform/functions.scss +32 -7
  31. data/lib/assets/stylesheets/uniform/mixins.scss +110 -57
  32. data/lib/assets/stylesheets/uniform/utilities.scss +55 -0
  33. data/lib/assets/stylesheets/uniform/utilities/background.scss +9 -0
  34. data/lib/assets/stylesheets/uniform/utilities/borders.scss +84 -0
  35. data/lib/assets/stylesheets/uniform/utilities/effects.scss +172 -0
  36. data/lib/assets/stylesheets/uniform/utilities/layout.scss +177 -0
  37. data/lib/assets/stylesheets/uniform/utilities/position.scss +42 -0
  38. data/lib/assets/stylesheets/uniform/utilities/sizing.scss +54 -0
  39. data/lib/assets/stylesheets/uniform/utilities/spacing.scss +62 -0
  40. data/lib/assets/stylesheets/uniform/utilities/svg.scss +5 -0
  41. data/lib/assets/stylesheets/uniform/utilities/text.scss +158 -0
  42. data/lib/assets/stylesheets/uniform/variables.scss +111 -42
  43. data/lib/uniform/version.rb +1 -1
  44. metadata +25 -48
  45. data/lib/assets/javascripts/uniform.jquery.js +0 -152
  46. data/lib/assets/javascripts/uniform/dom-helpers.js +0 -158
  47. data/lib/assets/javascripts/uniform/floating-label.js +0 -54
  48. data/lib/assets/stylesheets/uniform-print.scss +0 -1
  49. data/lib/assets/stylesheets/uniform/components.scss +0 -11
  50. data/lib/assets/stylesheets/uniform/components/alert.scss +0 -72
  51. data/lib/assets/stylesheets/uniform/components/card.scss +0 -93
  52. data/lib/assets/stylesheets/uniform/components/form.scss +0 -149
  53. data/lib/assets/stylesheets/uniform/components/form/checkbox-collection.scss +0 -103
  54. data/lib/assets/stylesheets/uniform/components/form/checkbox.scss +0 -58
  55. data/lib/assets/stylesheets/uniform/components/form/floating-label.scss +0 -65
  56. data/lib/assets/stylesheets/uniform/components/form/input-group.scss +0 -56
  57. data/lib/assets/stylesheets/uniform/components/form/tristate.scss +0 -88
  58. data/lib/assets/stylesheets/uniform/components/grid.scss +0 -179
  59. data/lib/assets/stylesheets/uniform/components/row.scss +0 -67
  60. data/lib/assets/stylesheets/uniform/components/tooltip.scss +0 -41
  61. data/lib/assets/stylesheets/uniform/helpers.scss +0 -133
  62. data/lib/assets/stylesheets/uniform/helpers/border.scss +0 -28
  63. data/lib/assets/stylesheets/uniform/helpers/colors.scss +0 -24
  64. data/lib/assets/stylesheets/uniform/helpers/margin.scss +0 -27
  65. data/lib/assets/stylesheets/uniform/helpers/padding.scss +0 -9
  66. data/lib/assets/stylesheets/uniform/helpers/position.scss +0 -20
  67. data/lib/assets/stylesheets/uniform/helpers/sizes.scss +0 -38
  68. data/lib/assets/stylesheets/uniform/helpers/text.scss +0 -152
  69. data/lib/assets/stylesheets/uniform/print/grid.scss +0 -50
@@ -1,58 +0,0 @@
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: 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
- }
@@ -1,65 +0,0 @@
1
- .uniformFloatingLabel{
2
- display: flex;
3
- align-items: center;
4
- border: 1px solid color('gray');
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
- white-space: nowrap;
37
- transition: font-size 0.1s, line-height 0.1s, opacity 0.1s;
38
- }
39
- }
40
-
41
- &.inactive{
42
- input,
43
- textarea,
44
- select{
45
- &::placeholder{
46
- color: transparent;
47
- }
48
- }
49
- }
50
- &.float{
51
- label{
52
- font-size: 80%;
53
- opacity: 0.8;
54
- }
55
- }
56
- &.active{
57
- label{
58
- color: color('green-dark');
59
- opacity: 1;
60
- }
61
- }
62
- input.pad-2x{
63
- padding: 1em;
64
- }
65
- }
@@ -1,56 +0,0 @@
1
- .uniformInputGroup{
2
- background: white;
3
- border: 1px solid color('gray');
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: color('gray-dark');
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
- }
@@ -1,88 +0,0 @@
1
- .uniformTristate{
2
- display: inline-block;
3
- background: white;
4
- border: 0.1em solid rgba(black, 0.2);
5
- box-shadow: inset 0.1em 0.1em 0.2em rgba(black, 0.1);
6
- line-height: 0.6;
7
- border-radius: 10em;
8
- padding: 0 0.1em;
9
- position: relative;
10
- height: 0.8em;
11
- transition: background 0.1s ease-in-out;
12
- &.-focus{
13
- box-shadow: inset 0.1em 0.1em 0.2em rgba(black, 0.1), 0 0 0 0.1em #3b88fd;
14
- }
15
-
16
- &.-true{
17
- background: #3b88fd;
18
- input{
19
- &:last-child {
20
- opacity: 0.5;
21
- content: icon-x-block(32, #FFFFFF);
22
- }
23
- &:first-child{
24
- content: icon-check(#3b88fd);
25
- }
26
- }
27
- &:before{
28
- left: -6%;
29
- transform: translate(0, -50%);
30
- border-color: #306dca
31
- }
32
- }
33
- &.-false{
34
- background: #cccccc;
35
- input{
36
- &:first-child{
37
- content: icon-check(#FFFFFF);
38
- }
39
- &:last-child{
40
- content: icon-x-block(32, #a3a3a3);
41
- }
42
- }
43
- &:before{
44
- left: auto;
45
- right: -6%;
46
- transform: translate(0, -50%);
47
- border-color: #a3a3a3;
48
- }
49
- }
50
- &:before{
51
- width: .9em;
52
- height: .9em;
53
- position: absolute;
54
- left: 50%;
55
- top: 50%;
56
- transform: translate(-50%, -50%);
57
- border: 0.1em solid #b3b3b3;
58
- background: white;
59
- content: "";
60
- border-radius: 50%;
61
- transition: left 0.1s ease-in-out;
62
- z-index: 1;
63
- }
64
- input{
65
- appearance: none;
66
- -webkit-appearance: none;
67
- outline: none;
68
- width: 0.6em;
69
- height: 0.6em;
70
- vertical-align: top;
71
- z-index: 2;
72
- position: relative;
73
- cursor: pointer;
74
- &:focus{
75
- outline: none;
76
- }
77
- &:not(:first-child):not(:last-child){
78
- margin: 0 0.1em;
79
- }
80
-
81
- &:first-child{
82
- content: icon-check(#b3b3b3);
83
- }
84
- &:last-child {
85
- content: icon-x-block(32, #b3b3b3);
86
- }
87
- }
88
- }
@@ -1,179 +0,0 @@
1
- //----------------------------------------------------------------
2
- // Grid
3
- //----------------------------------------------------------------
4
-
5
- @include size-rules('.grid'){
6
- display: flex;
7
- flex-wrap: wrap;
8
-
9
- & > *{
10
- position: relative;
11
- padding-left: $grid-gutter/2;
12
- padding-right: $grid-gutter/2;
13
- }
14
-
15
- &.grid-nowrap {flex-wrap:nowrap;}
16
- &.grid-gutter-2x {
17
- & > * {
18
- padding-left: $grid-gutter;
19
- padding-right: $grid-gutter;
20
- }
21
- }
22
- &.grid-gutter-half {
23
- & > * {
24
- padding-left: $grid-gutter/4;
25
- padding-right: $grid-gutter/4;
26
- }
27
- }
28
- }
29
- @include size-rule('md'){
30
- .grid,
31
- .grid-md,
32
- .grid-lg,
33
- .grid-xl{
34
- & > * {
35
- padding-left:$grid-gutter;
36
- padding-right: $grid-gutter;
37
- }
38
- }
39
-
40
- .grid.grid-gutter-2x {
41
- & > * {
42
- padding-left:$grid-gutter * 2;
43
- padding-right: $grid-gutter * 2;
44
- }
45
- }
46
-
47
- .grid.grid-gutter-half {
48
- & > * {
49
- padding-left:$grid-gutter / 2;
50
- padding-right: $grid-gutter / 2;
51
- }
52
- }
53
- }
54
-
55
- .grid-h-left {justify-content: flex-start;}
56
- .grid-h-center {justify-content: center;}
57
- .grid-h-right {justify-content: flex-end;}
58
- .grid-h-around {justify-content: space-around;}
59
- .grid-h-between {justify-content: space-between;}
60
-
61
- .grid-v-top {align-content: flex-start;}
62
- .grid-v-center {align-content: center;}
63
- .grid-v-bottom {align-content: flex-end;}
64
- .grid-v-around {align-content: space-around;}
65
- .grid-v-between {align-content: space-between;}
66
- .grid-v-stretch {align-content: stretch;}
67
-
68
- .grid-center {align-items: center;}
69
- .grid-top {align-items: flex-start;}
70
- .grid-bottom {align-items: flex-end;}
71
- .grid-stretch {align-items: stretch;}
72
-
73
- .grid-vertical{
74
- flex-direction: column;
75
- & > *{
76
- padding-left: 0;
77
- padding-right: 0;
78
- padding-top: $grid-gutter;
79
- padding-bottom: $grid-gutter;
80
- }
81
- &.grid-gutter-none{
82
- & > * {
83
- padding-top: 0;
84
- padding-bottom: 0;
85
- }
86
- }
87
- }
88
-
89
- .grid-gutter-none{
90
- & > * {
91
- padding-left: 0 !important;
92
- padding-right: 0 !important;
93
- }
94
- }
95
-
96
- .grid-nest{
97
- margin-left: -$grid-gutter;
98
- margin-right: -$grid-gutter;
99
- &.grid-gutter-2x{
100
- margin-left: -$grid-gutter*2;
101
- margin-right: -$grid-gutter*2;
102
- }
103
- &.grid-gutter-half{
104
- margin-left: -$grid-gutter/2;
105
- margin-right: -$grid-gutter/2;
106
- }
107
- }
108
- .grid-nest-half{
109
- margin-left: -0.5em;
110
- margin-right: -0.5em;
111
- }
112
- @include size-rule('sm'){
113
- .grid-nest{
114
- margin-left: -$grid-gutter/2;
115
- margin-right: -$grid-gutter/2;
116
- &.grid-gutter-2x{
117
- margin-left: -$grid-gutter;
118
- margin-right: -$grid-gutter;
119
- }
120
- &.grid-gutter-half{
121
- margin-left: -$grid-gutter/4;
122
- margin-right: -$grid-gutter/4;
123
- }
124
- }
125
- }
126
-
127
- // fix for IE https://codepen.io/anon/pen/gxNraR
128
- .grid-min-height-fix{
129
- width: 100%;
130
- display: flex;
131
- flex-direction: row;
132
- .grid{
133
- width: 100%;
134
- }
135
- }
136
-
137
- //----------------------------------------------------------------
138
- // Columns
139
- //----------------------------------------------------------------
140
- .col-center {align-self: center;}
141
- .col-top {align-self: flex-start;}
142
- .col-bottom {align-self: flex-end;}
143
- .col-stretch {align-self: stretch;}
144
- @include size-rules(".col"){
145
- flex: 0 1 auto;
146
- }
147
- @include size-rules(".col-fill"){
148
- flex: 1 1 auto;
149
- }
150
- @include size-rules(".col-gutter-none"){
151
- padding-left: 0 !important; // TODO remove !important
152
- padding-right: 0 !important; // TODO remove !important
153
- }
154
- @for $i from 0 through $grid-columns {
155
- @include size-rules(".col-#{$i}"){
156
- flex: 0 0 #{($i / $grid-columns * 100) + "%"};
157
- max-width: #{($i / $grid-columns * 100) + "%"};
158
- }
159
- @include size-rules(".col-offset-#{$i}"){
160
- margin-left: #{($i / $grid-columns * 100) + "%"};
161
- }
162
- @include size-rules(".col-push-#{$i}"){
163
- position:relative;
164
- left: #{($i / $grid-columns * 100) + "%"};
165
- }
166
- @include size-rules(".col-pull-#{$i}"){
167
- position:relative;
168
- right: #{($i / $grid-columns * 100) + "%"};
169
- }
170
- @include size-rules(".col-fill-#{$i}"){
171
- flex: #{$i};
172
- }
173
- @include size-rules(".col-grow-#{$i}"){
174
- flex-grow: #{$i};
175
- }
176
- @include size-rules(".col-shrink-#{$i}"){
177
- flex-shrink: #{$i};
178
- }
179
- }