titon-toolkit 2.0.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/changelog.md +66 -183
  3. data/readme.md +17 -8
  4. data/roadmap.md +13 -11
  5. data/scss/toolkit.scss +3 -2
  6. data/scss/toolkit/_common.scss +72 -22
  7. data/scss/toolkit/base.scss +12 -1
  8. data/scss/toolkit/components/accordion.scss +19 -17
  9. data/scss/toolkit/components/blackout.scss +20 -18
  10. data/scss/toolkit/components/breadcrumb.scss +37 -36
  11. data/scss/toolkit/components/button-group.scss +130 -128
  12. data/scss/toolkit/components/button.scss +100 -98
  13. data/scss/toolkit/components/carousel.scss +63 -63
  14. data/scss/toolkit/components/code.scss +49 -47
  15. data/scss/toolkit/components/divider.scss +34 -32
  16. data/scss/toolkit/components/drop.scss +82 -79
  17. data/scss/toolkit/components/flex.scss +110 -0
  18. data/scss/toolkit/components/flyout.scss +59 -53
  19. data/scss/toolkit/components/form.scss +178 -170
  20. data/scss/toolkit/components/grid.scss +36 -34
  21. data/scss/toolkit/components/icon.scss +28 -25
  22. data/scss/toolkit/components/input-group.scss +35 -33
  23. data/scss/toolkit/components/input.scss +102 -99
  24. data/scss/toolkit/components/label.scss +99 -97
  25. data/scss/toolkit/components/lazy-load.scss +6 -4
  26. data/scss/toolkit/components/loader.scss +124 -122
  27. data/scss/toolkit/components/mask.scss +24 -22
  28. data/scss/toolkit/components/matrix.scss +16 -14
  29. data/scss/toolkit/components/modal.scss +104 -102
  30. data/scss/toolkit/components/notice.scss +24 -23
  31. data/scss/toolkit/components/off-canvas.scss +118 -116
  32. data/scss/toolkit/components/pagination.scss +90 -66
  33. data/scss/toolkit/components/pin.scss +11 -9
  34. data/scss/toolkit/components/popover.scss +50 -48
  35. data/scss/toolkit/components/progress.scss +42 -40
  36. data/scss/toolkit/components/responsive.scss +61 -66
  37. data/scss/toolkit/components/showcase.scss +62 -60
  38. data/scss/toolkit/components/step.scss +51 -44
  39. data/scss/toolkit/components/switch.scss +96 -93
  40. data/scss/toolkit/components/tab.scss +25 -25
  41. data/scss/toolkit/components/table.scss +76 -75
  42. data/scss/toolkit/components/toast.scss +91 -89
  43. data/scss/toolkit/components/tooltip.scss +82 -80
  44. data/scss/toolkit/components/type-ahead.scss +53 -52
  45. data/scss/toolkit/components/typography.scss +45 -43
  46. data/scss/toolkit/mixins/_flex.scss +80 -0
  47. data/scss/toolkit/mixins/_grid.scss +6 -29
  48. data/scss/toolkit/mixins/_helper.scss +33 -4
  49. data/scss/toolkit/mixins/_layout.scss +28 -1
  50. data/version.md +1 -1
  51. metadata +4 -2
@@ -6,7 +6,9 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$lazyLoad-class} {
10
- background-image: none !important;
11
- transition: background-image $lazyLoad-transition;
12
- }
9
+ @include export("lazy-load") {
10
+ #{$lazyLoad-class} {
11
+ background-image: none !important;
12
+ transition: background-image $lazyLoad-transition;
13
+ }
14
+ }
@@ -9,155 +9,157 @@
9
9
  // Based on SpinKit
10
10
  // http://tobiasahlin.com/spinkit/
11
11
 
12
- #{$loader-class} {
13
- @include reset-inline-block;
14
- margin: 0 auto;
15
- text-align: center;
16
-
17
- > span {
18
- display: inline-block;
19
- margin: 0 2px;
20
- }
21
- }
22
-
23
- #{$loader-class-message} {
24
- margin-top: 1rem;
25
- }
26
-
27
- //-------------------- Bar Wave --------------------//
12
+ @include export("loader") {
13
+ #{$loader-class} {
14
+ @include reset-inline-block;
15
+ margin: 0 auto;
16
+ text-align: center;
28
17
 
29
- @if $loader-type == "bar-wave" or $loader-type == "all" {
30
- @keyframes bar-wave {
31
- 0%, 50%, 100% {
32
- transform: scaleY(1.0);
33
- }
34
- 25% {
35
- transform: scaleY(2.0);
18
+ > span {
19
+ display: inline-block;
20
+ margin: 0 2px;
36
21
  }
37
22
  }
38
23
 
39
- #{$loader-class}.bar-wave {
40
- > span {
41
- background: $loader-color;
42
- height: $loader-bar-height;
43
- width: $loader-bar-width;
44
- animation: bar-wave 1.2s infinite ease-in-out;
24
+ #{$loader-class-message} {
25
+ margin-top: 1rem;
26
+ }
45
27
 
46
- @for $i from 2 through $loader-wave-count {
47
- &:nth-child(#{$i}) { animation-delay: -#{(1.3 - ($i * 0.1))}s; }
48
- }
49
- }
28
+ //-------------------- Bar Wave --------------------//
50
29
 
51
- #{$loader-class-message} {
52
- margin-top: 1.5rem;
30
+ @if $loader-type == "bar-wave" or $loader-type == "all" {
31
+ @keyframes bar-wave {
32
+ 0%, 50%, 100% {
33
+ transform: scaleY(1.0);
34
+ }
35
+ 25% {
36
+ transform: scaleY(2.0);
37
+ }
53
38
  }
54
- }
55
- }
56
39
 
57
- //-------------------- Bubble Wave --------------------//
40
+ #{$loader-class}.bar-wave {
41
+ > span {
42
+ background: $loader-color;
43
+ height: $loader-bar-height;
44
+ width: $loader-bar-width;
45
+ animation: bar-wave 1.2s infinite ease-in-out;
58
46
 
59
- @if $loader-type == "bubble-wave" or $loader-type == "all" {
60
- @keyframes bubble-wave {
61
- 0%, 80%, 100% {
62
- transform: scale(0.0);
63
- }
64
- 30% {
65
- transform: scale(1.0);
66
- }
67
- }
47
+ @for $i from 2 through $loader-wave-count {
48
+ &:nth-child(#{$i}) { animation-delay: -#{(1.3 - ($i * 0.1))}s; }
49
+ }
50
+ }
68
51
 
69
- #{$loader-class}.bubble-wave {
70
- > span {
71
- background: $loader-color;
72
- width: $loader-bubble-size;
73
- height: $loader-bubble-size;
74
- border-radius: 100%;
75
- animation: bubble-wave 1.5s infinite ease-in-out;
76
- animation-fill-mode: both;
77
-
78
- @for $i from 2 through $loader-wave-count {
79
- &:nth-child(#{$i}) { animation-delay: -#{(1.6 - ($i * 0.1))}s; }
52
+ #{$loader-class-message} {
53
+ margin-top: 1.5rem;
80
54
  }
81
55
  }
82
56
  }
83
- }
84
57
 
85
- //-------------------- Bubble Spinner --------------------//
58
+ //-------------------- Bubble Wave --------------------//
86
59
 
87
- @if $loader-type == "bubble-spinner" or $loader-type == "all" {
88
- @keyframes bubble-spinner {
89
- 0%, 80%, 100% {
90
- transform: scale(0.0);
91
- }
92
- 30% {
93
- transform: scale(1.3);
60
+ @if $loader-type == "bubble-wave" or $loader-type == "all" {
61
+ @keyframes bubble-wave {
62
+ 0%, 80%, 100% {
63
+ transform: scale(0.0);
64
+ }
65
+ 30% {
66
+ transform: scale(1.0);
67
+ }
94
68
  }
95
- }
96
-
97
- #{$loader-class}.bubble-spinner {
98
- #{$loader-class-spinner} {
99
- width: 100px;
100
- height: 100px;
101
- position: relative;
102
- margin: 0 auto;
103
69
 
70
+ #{$loader-class}.bubble-wave {
104
71
  > span {
105
72
  background: $loader-color;
106
- width: 14px;
107
- height: 14px;
108
- position: absolute;
73
+ width: $loader-bubble-size;
74
+ height: $loader-bubble-size;
109
75
  border-radius: 100%;
110
- animation: bubble-spinner 1.6s infinite ease-in-out;
76
+ animation: bubble-wave 1.5s infinite ease-in-out;
111
77
  animation-fill-mode: both;
112
78
 
113
- &:nth-child(1) {
114
- top: 0;
115
- left: 43px;
116
- animation-delay: -1.4s;
117
- }
118
-
119
- &:nth-child(2) {
120
- top: 12px;
121
- right: 12px;
122
- animation-delay: -1.2s;
123
- }
124
-
125
- &:nth-child(3) {
126
- top: 43px;
127
- right: 0;
128
- animation-delay: -1.0s;
129
- }
130
-
131
- &:nth-child(4) {
132
- bottom: 12px;
133
- right: 12px;
134
- animation-delay: -0.8s;
135
- }
136
-
137
- &:nth-child(5) {
138
- bottom: 0;
139
- left: 43px;
140
- animation-delay: -0.6s;
79
+ @for $i from 2 through $loader-wave-count {
80
+ &:nth-child(#{$i}) { animation-delay: -#{(1.6 - ($i * 0.1))}s; }
141
81
  }
82
+ }
83
+ }
84
+ }
142
85
 
143
- &:nth-child(6) {
144
- bottom: 12px;
145
- left: 12px;
146
- animation-delay: -0.4s;
147
- }
86
+ //-------------------- Bubble Spinner --------------------//
148
87
 
149
- &:nth-child(7) {
150
- top: 43px;
151
- left: 0;
152
- animation-delay: -0.2s;
153
- }
88
+ @if $loader-type == "bubble-spinner" or $loader-type == "all" {
89
+ @keyframes bubble-spinner {
90
+ 0%, 80%, 100% {
91
+ transform: scale(0.0);
92
+ }
93
+ 30% {
94
+ transform: scale(1.3);
95
+ }
96
+ }
154
97
 
155
- &:nth-child(8) {
156
- top: 12px;
157
- left: 12px;
158
- animation-delay: -0.0s;
98
+ #{$loader-class}.bubble-spinner {
99
+ #{$loader-class-spinner} {
100
+ width: 100px;
101
+ height: 100px;
102
+ position: relative;
103
+ margin: 0 auto;
104
+
105
+ > span {
106
+ background: $loader-color;
107
+ width: 14px;
108
+ height: 14px;
109
+ position: absolute;
110
+ border-radius: 100%;
111
+ animation: bubble-spinner 1.6s infinite ease-in-out;
112
+ animation-fill-mode: both;
113
+
114
+ &:nth-child(1) {
115
+ top: 0;
116
+ left: 43px;
117
+ animation-delay: -1.4s;
118
+ }
119
+
120
+ &:nth-child(2) {
121
+ top: 12px;
122
+ right: 12px;
123
+ animation-delay: -1.2s;
124
+ }
125
+
126
+ &:nth-child(3) {
127
+ top: 43px;
128
+ right: 0;
129
+ animation-delay: -1.0s;
130
+ }
131
+
132
+ &:nth-child(4) {
133
+ bottom: 12px;
134
+ right: 12px;
135
+ animation-delay: -0.8s;
136
+ }
137
+
138
+ &:nth-child(5) {
139
+ bottom: 0;
140
+ left: 43px;
141
+ animation-delay: -0.6s;
142
+ }
143
+
144
+ &:nth-child(6) {
145
+ bottom: 12px;
146
+ left: 12px;
147
+ animation-delay: -0.4s;
148
+ }
149
+
150
+ &:nth-child(7) {
151
+ top: 43px;
152
+ left: 0;
153
+ animation-delay: -0.2s;
154
+ }
155
+
156
+ &:nth-child(8) {
157
+ top: 12px;
158
+ left: 12px;
159
+ animation-delay: -0.0s;
160
+ }
159
161
  }
160
162
  }
161
163
  }
162
164
  }
163
- }
165
+ }
@@ -6,29 +6,31 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$mask-class} {
10
- @include full-screen(absolute);
11
- z-index: $mask-zindex;
12
- opacity: 0;
13
- visibility: hidden;
14
- background: black($mask-opacity);
15
- transition: all $mask-transition;
16
- color: #fff;
17
- user-select: none;
18
- }
9
+ @include export("mask") {
10
+ #{$mask-class} {
11
+ @include full-screen(absolute);
12
+ z-index: $mask-zindex;
13
+ opacity: 0;
14
+ visibility: hidden;
15
+ background: black($mask-opacity);
16
+ transition: all $mask-transition;
17
+ color: #fff;
18
+ user-select: none;
19
+ }
19
20
 
20
- #{$mask-class-message} {
21
- text-align: center;
22
- max-width: 80%;
23
- @include position-center;
21
+ #{$mask-class-message} {
22
+ text-align: center;
23
+ max-width: 80%;
24
+ @include position-center;
24
25
 
25
- &:empty { display: none; }
26
- }
26
+ &:empty { display: none; }
27
+ }
27
28
 
28
- #{$mask-class-target} {
29
- overflow: hidden;
29
+ #{$mask-class-target} {
30
+ overflow: hidden;
30
31
 
31
- // Fixes issues where mask does not display in iOS
32
- // Kind of hacky? Other solutions?
33
- -webkit-backface-visibility: hidden;
34
- }
32
+ // Fixes issues where mask does not display in iOS
33
+ // Kind of hacky? Other solutions?
34
+ -webkit-backface-visibility: hidden;
35
+ }
36
+ }
@@ -6,20 +6,22 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$matrix-class} {
10
- @include reset-list;
11
- position: relative;
9
+ @include export("matrix") {
10
+ #{$matrix-class} {
11
+ @include reset-list;
12
+ position: relative;
12
13
 
13
- > li {
14
- float: left;
15
- margin: 0;
16
- padding: 0;
17
- transition: top $matrix-transition, left $matrix-transition, bottom $matrix-transition, right $matrix-transition, opacity $matrix-transition, visibility $matrix-transition;
18
- }
14
+ > li {
15
+ float: $align-direction;
16
+ margin: 0;
17
+ padding: 0;
18
+ transition: top $matrix-transition, left $matrix-transition, bottom $matrix-transition, right $matrix-transition, opacity $matrix-transition, visibility $matrix-transition;
19
+ }
19
20
 
20
- &.no-columns > li {
21
- position: relative !important;
22
- }
21
+ &.no-columns > li {
22
+ position: relative !important;
23
+ }
23
24
 
24
- @include clear-fix;
25
- }
25
+ @include clear-fix;
26
+ }
27
+ }
@@ -6,141 +6,143 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$modal-class} {
10
- @include full-screen();
11
- opacity: 0;
12
- visibility: hidden;
13
- z-index: $modal-zindex;
14
- overflow: auto;
15
- transition: opacity $modal-transition, visibility $modal-transition;
16
- -webkit-overflow-scrolling: touch;
17
-
18
- &.is-loading {
19
- #{$modal-class-close} { display: none; }
20
- }
9
+ @include export("modal") {
10
+ #{$modal-class} {
11
+ @include full-screen();
12
+ opacity: 0;
13
+ visibility: hidden;
14
+ z-index: $modal-zindex;
15
+ overflow: auto;
16
+ transition: opacity $modal-transition, visibility $modal-transition;
17
+ -webkit-overflow-scrolling: touch;
18
+
19
+ &.is-loading {
20
+ #{$modal-class-close} { display: none; }
21
+ }
21
22
 
22
- &.is-draggable {
23
- #{$modal-class-inner} { cursor: default; }
24
- #{$modal-class-head} { cursor: move; }
23
+ &.is-draggable {
24
+ #{$modal-class-inner} { cursor: default; }
25
+ #{$modal-class-head} { cursor: move; }
26
+ }
25
27
  }
26
- }
27
28
 
28
- #{$modal-class-close} {
29
- position: absolute;
30
- background: none;
31
- border: 0;
32
- top: $padding;
33
- right: $padding;
34
- line-height: 1rem;
35
- opacity: $default-opacity;
36
- padding: 5px;
37
-
38
- &:hover { opacity: 1; }
39
- }
29
+ #{$modal-class-close} {
30
+ position: absolute;
31
+ background: none;
32
+ border: 0;
33
+ top: $padding;
34
+ #{$align-opposite-direction}: $padding;
35
+ line-height: 1rem;
36
+ opacity: $default-opacity;
37
+ padding: 5px;
38
+
39
+ &:hover { opacity: 1; }
40
+ }
40
41
 
41
- #{$modal-class-outer} {
42
- position: relative;
43
- margin: $margin;
44
- transition: transform $modal-transition;
42
+ #{$modal-class-outer} {
43
+ position: relative;
44
+ margin: $margin;
45
+ transition: transform $modal-transition;
45
46
 
46
- @include if-min($modal-mobile-breakpoint) {
47
- width: 50%;
48
- margin: $margin auto;
47
+ @include if-min($modal-mobile-breakpoint) {
48
+ width: 50%;
49
+ margin: $margin auto;
50
+ }
49
51
  }
50
- }
51
52
 
52
- #{$modal-class-inner} {
53
- position: relative;
54
- }
53
+ #{$modal-class-inner} {
54
+ position: relative;
55
+ }
55
56
 
56
- #{$modal-class-head},
57
- #{$modal-class-body},
58
- #{$modal-class-foot} {
59
- padding: $padding;
60
- }
57
+ #{$modal-class-head},
58
+ #{$modal-class-body},
59
+ #{$modal-class-foot} {
60
+ padding: $padding;
61
+ }
61
62
 
62
- //-------------------- Modifiers --------------------//
63
+ //-------------------- Modifiers --------------------//
63
64
 
64
- #{$modal-class}.is-fullscreen #{$modal-class-outer} {
65
- @include full-screen("");
66
- margin: 0;
67
- max-width: 100%;
68
- border-radius: 0;
69
- transform: translate(0, 0);
70
- }
65
+ #{$modal-class}.is-fullscreen #{$modal-class-outer} {
66
+ @include full-screen("");
67
+ margin: 0;
68
+ max-width: 100%;
69
+ border-radius: 0;
70
+ transform: translate(0, 0);
71
+ }
71
72
 
72
- //-------------------- Animations --------------------//
73
+ //-------------------- Animations --------------------//
73
74
 
74
- #{$modal-class} {
75
- @if index($modal-animations, "from-above") {
76
- &.from-above {
77
- #{$modal-class-outer} {
78
- transform: scale(1.3);
79
- }
75
+ #{$modal-class} {
76
+ @if index($modal-animations, "from-above") {
77
+ &.from-above {
78
+ #{$modal-class-outer} {
79
+ transform: scale(1.3);
80
+ }
80
81
 
81
- &.show #{$modal-class-outer} {
82
- transform: scale(1);
82
+ &.show #{$modal-class-outer} {
83
+ transform: scale(1);
84
+ }
83
85
  }
84
86
  }
85
- }
86
87
 
87
- @if index($modal-animations, "from-below") {
88
- &.from-below {
89
- #{$modal-class-outer} {
90
- transform: scale(0.7);
91
- }
88
+ @if index($modal-animations, "from-below") {
89
+ &.from-below {
90
+ #{$modal-class-outer} {
91
+ transform: scale(0.7);
92
+ }
92
93
 
93
- &.show #{$modal-class-outer} {
94
- transform: scale(1);
94
+ &.show #{$modal-class-outer} {
95
+ transform: scale(1);
96
+ }
95
97
  }
96
98
  }
97
- }
98
99
 
99
- @if index($modal-animations, "slide-in-top") {
100
- &.slide-in-top {
101
- #{$modal-class-outer} {
102
- transform: translateY(-50%);
103
- }
100
+ @if index($modal-animations, "slide-in-top") {
101
+ &.slide-in-top {
102
+ #{$modal-class-outer} {
103
+ transform: translateY(-50%);
104
+ }
104
105
 
105
- &.show #{$modal-class-outer} {
106
- transform: translateY(0);
106
+ &.show #{$modal-class-outer} {
107
+ transform: translateY(0);
108
+ }
107
109
  }
108
110
  }
109
- }
110
111
 
111
- @if index($modal-animations, "slide-in-bottom") {
112
- &.slide-in-bottom {
113
- #{$modal-class-outer} {
114
- transform: translateY(50%);
115
- }
112
+ @if index($modal-animations, "slide-in-bottom") {
113
+ &.slide-in-bottom {
114
+ #{$modal-class-outer} {
115
+ transform: translateY(50%);
116
+ }
116
117
 
117
- &.show #{$modal-class-outer} {
118
- transform: translateY(0);
118
+ &.show #{$modal-class-outer} {
119
+ transform: translateY(0);
120
+ }
119
121
  }
120
122
  }
121
- }
122
123
 
123
- @if index($modal-animations, "slide-in-left") {
124
- &.slide-in-left {
125
- #{$modal-class-outer} {
126
- transform: translateX(-25%);
127
- }
124
+ @if index($modal-animations, "slide-in-left") {
125
+ &.slide-in-left {
126
+ #{$modal-class-outer} {
127
+ transform: translateX(-25%);
128
+ }
128
129
 
129
- &.show #{$modal-class-outer} {
130
- transform: translateX(0);
130
+ &.show #{$modal-class-outer} {
131
+ transform: translateX(0);
132
+ }
131
133
  }
132
134
  }
133
- }
134
135
 
135
- @if index($modal-animations, "slide-in-right") {
136
- &.slide-in-right {
137
- #{$modal-class-outer} {
138
- transform: translateX(25%);
139
- }
136
+ @if index($modal-animations, "slide-in-right") {
137
+ &.slide-in-right {
138
+ #{$modal-class-outer} {
139
+ transform: translateX(25%);
140
+ }
140
141
 
141
- &.show #{$modal-class-outer} {
142
- transform: translateX(0);
142
+ &.show #{$modal-class-outer} {
143
+ transform: translateX(0);
144
+ }
143
145
  }
144
146
  }
145
147
  }
146
- }
148
+ }