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,129 +6,131 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$button-class} {
10
- @include reset-inline-block;
11
- border: 0;
12
- margin: 0;
13
- cursor: pointer;
14
- text-align: center;
15
- font-weight: normal;
16
- line-height: normal;
17
- white-space: nowrap;
18
- text-decoration: none;
19
- @include size-medium;
20
- @include is-small(true, true) { @include size-small; }
21
- @include is-large(true, true) { @include size-large; }
22
-
23
- &.is-disabled,
24
- &[disabled] {
25
- cursor: not-allowed;
26
- }
9
+ @include export("button") {
10
+ #{$button-class} {
11
+ @include reset-inline-block;
12
+ border: 0;
13
+ margin: 0;
14
+ cursor: pointer;
15
+ text-align: center;
16
+ font-weight: normal;
17
+ line-height: normal;
18
+ white-space: nowrap;
19
+ text-decoration: none;
20
+ @include size-medium;
21
+ @include is-small(true, true) { @include size-small; }
22
+ @include is-large(true, true) { @include size-large; }
23
+
24
+ &.is-disabled,
25
+ &[disabled] {
26
+ cursor: not-allowed;
27
+ }
27
28
 
28
- &:focus { outline: none; }
29
+ &:focus { outline: none; }
29
30
 
30
- //----- Effects -----//
31
+ //----- Effects -----//
31
32
 
32
- @if index($button-effects, "oval") {
33
- &#{$shape-oval-class} {
34
- border-radius: #{$oval-x} / #{$oval-y};
33
+ @if index($button-effects, "oval") {
34
+ &#{$shape-oval-class} {
35
+ border-radius: #{$oval-x} / #{$oval-y};
36
+ }
35
37
  }
36
- }
37
38
 
38
- @if index($button-effects, "pill") {
39
- &#{$shape-pill-class} {
40
- border-radius: $pill;
39
+ @if index($button-effects, "pill") {
40
+ &#{$shape-pill-class} {
41
+ border-radius: $pill;
42
+ }
41
43
  }
42
- }
43
44
 
44
- @if index($button-effects, "skew") {
45
- &#{$shape-skew-class} {
46
- border-radius: #{$skew-x $skew-x} 0 0 / #{$skew-y $skew-y} 0 0;
45
+ @if index($button-effects, "skew") {
46
+ &#{$shape-skew-class} {
47
+ border-radius: #{$skew-x $skew-x} 0 0 / #{$skew-y $skew-y} 0 0;
48
+ }
47
49
  }
48
50
  }
49
- }
50
51
 
51
- //-------------------- Modifiers --------------------//
52
-
53
- @if index($button-modifiers, "gloss") {
54
- #{$button-class-modifier-gloss} {
55
- &::after {
56
- content: "";
57
- position: absolute;
58
- width: 100%;
59
- height: 60%;
60
- top: 1%;
61
- left: 0;
62
- border-radius: 0 0 2rem 2rem / 0 0 1rem 1rem;
63
- background: linear-gradient(to left, white(.3) 0%, white(0) 50%, white(.3) 100%);
64
- }
52
+ //-------------------- Modifiers --------------------//
53
+
54
+ @if index($button-modifiers, "gloss") {
55
+ #{$button-class-modifier-gloss} {
56
+ &::after {
57
+ content: "";
58
+ position: absolute;
59
+ width: 100%;
60
+ height: 60%;
61
+ top: 1%;
62
+ left: 0;
63
+ border-radius: 0 0 2rem 2rem / 0 0 1rem 1rem;
64
+ background: linear-gradient(to left, white(.3) 0%, white(0) 50%, white(.3) 100%);
65
+ }
65
66
 
66
- //----- Effects -----//
67
+ //----- Effects -----//
67
68
 
68
- &#{$shape-round-class}::after {
69
- border-radius: .2rem .2rem 2rem 2rem / .5rem .5rem 1rem 1rem;
70
- width: 98%;
71
- left: 1.5%;
72
- }
69
+ &#{$shape-round-class}::after {
70
+ border-radius: .2rem .2rem 2rem 2rem / .5rem .5rem 1rem 1rem;
71
+ width: 98%;
72
+ left: 1.5%;
73
+ }
73
74
 
74
- @if index($button-effects, "oval") {
75
- &#{$shape-oval-class}::after {
76
- width: 90%;
77
- left: 5.5%;
78
- border-radius: 5rem 5rem 4rem 4rem / 1.5rem 1.5rem 1.5rem 1.5rem;
75
+ @if index($button-effects, "oval") {
76
+ &#{$shape-oval-class}::after {
77
+ width: 90%;
78
+ left: 5.5%;
79
+ border-radius: 5rem 5rem 4rem 4rem / 1.5rem 1.5rem 1.5rem 1.5rem;
80
+ }
79
81
  }
80
- }
81
82
 
82
- @if index($button-effects, "pill") {
83
- &#{$shape-pill-class}::after {
84
- width: 90%;
85
- left: 5.5%;
86
- border-radius: 1rem 1rem 2rem 2rem / 1rem 1rem 1rem 1rem;
83
+ @if index($button-effects, "pill") {
84
+ &#{$shape-pill-class}::after {
85
+ width: 90%;
86
+ left: 5.5%;
87
+ border-radius: 1rem 1rem 2rem 2rem / 1rem 1rem 1rem 1rem;
88
+ }
87
89
  }
88
- }
89
90
 
90
- @if index($button-effects, "skew") {
91
- &#{$shape-skew-class}::after {
92
- width: 90%;
93
- left: 5.5%;
94
- border-radius: 1rem 1rem 3rem 3rem / 1rem 1rem 2rem 2rem;
91
+ @if index($button-effects, "skew") {
92
+ &#{$shape-skew-class}::after {
93
+ width: 90%;
94
+ left: 5.5%;
95
+ border-radius: 1rem 1rem 3rem 3rem / 1rem 1rem 2rem 2rem;
96
+ }
95
97
  }
96
98
  }
97
99
  }
98
- }
99
100
 
100
- @if index($button-modifiers, "reflect") {
101
- #{$button-class-modifier-reflect}::after {
102
- content: "";
103
- position: absolute;
104
- width: 100%;
105
- height: 50%;
106
- top: 0;
107
- left: 0;
108
- background: linear-gradient(180deg, white(0), white(.3));
101
+ @if index($button-modifiers, "reflect") {
102
+ #{$button-class-modifier-reflect}::after {
103
+ content: "";
104
+ position: absolute;
105
+ width: 100%;
106
+ height: 50%;
107
+ top: 0;
108
+ left: 0;
109
+ background: linear-gradient(180deg, white(0), white(.3));
110
+ }
109
111
  }
110
- }
111
112
 
112
- @if index($button-modifiers, "glare") {
113
- #{$button-class-modifier-glare}::after {
114
- content: "";
115
- position: absolute;
116
- width: 100%;
117
- height: 100%;
118
- top: 0;
119
- left: 0;
120
- background: linear-gradient(160deg, white(.5) 0%, white(.1) 50%, white(0) 50%, white(.3) 100%);
113
+ @if index($button-modifiers, "glare") {
114
+ #{$button-class-modifier-glare}::after {
115
+ content: "";
116
+ position: absolute;
117
+ width: 100%;
118
+ height: 100%;
119
+ top: 0;
120
+ left: 0;
121
+ background: linear-gradient(160deg, white(.5) 0%, white(.1) 50%, white(0) 50%, white(.3) 100%);
122
+ }
121
123
  }
122
- }
123
124
 
124
- @if index($button-modifiers, "popout") {
125
- #{$button-class-modifier-popout} {
126
- box-shadow: 0 6px 0 0 black(.25) !important;
127
- top: -3px;
125
+ @if index($button-modifiers, "popout") {
126
+ #{$button-class-modifier-popout} {
127
+ box-shadow: 0 6px 0 0 black(.25) !important;
128
+ top: -3px;
128
129
 
129
- &:active {
130
- box-shadow: 0 3px 0 0 black(.5) !important;
131
- top: 0;
130
+ &:active {
131
+ box-shadow: 0 3px 0 0 black(.5) !important;
132
+ top: 0;
133
+ }
132
134
  }
133
135
  }
134
- }
136
+ }
@@ -6,89 +6,89 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$carousel-class} {
10
- margin: 0 auto;
11
- text-align: left;
12
- position: relative;
13
- max-width: 100%;
14
-
15
- &.no-next #{$carousel-class-next} { display: none; }
16
- &.no-prev #{$carousel-class-prev} { display: none; }
17
- }
9
+ @include export("carousel") {
10
+ #{$carousel-class} {
11
+ position: relative;
12
+ max-width: 100%;
18
13
 
19
- #{$carousel-class-items} {
20
- /* 4:3 ratio */
21
- padding-bottom: 75%;
22
- width: 100%;
23
- max-width: 100%;
24
- overflow: hidden;
25
- position: relative;
26
-
27
- > ul {
28
- @include reset-list;
29
- position: absolute;
30
- top: 0;
31
- left: 0;
32
- transition: left $carousel-transition, top $carousel-transition;
33
-
34
- > li {
35
- width: 100%;
36
- height: auto;
37
- position: relative;
14
+ &.no-next #{$carousel-class-next},
15
+ &.no-prev #{$carousel-class-prev} { display: none; }
16
+ }
17
+
18
+ #{$carousel-class-items} {
19
+ /* 4:3 ratio */
20
+ padding-bottom: 75%;
21
+ width: 100%;
22
+ max-width: 100%;
23
+ overflow: hidden;
24
+ position: relative;
38
25
 
39
- > img {
40
- display: block;
26
+ > ul {
27
+ @include reset-list;
28
+ position: absolute;
29
+ top: 0;
30
+ #{$align-direction}: 0;
31
+ transition: left $carousel-transition, top $carousel-transition, right $carousel-transition;
32
+
33
+ > li {
41
34
  width: 100%;
42
- max-width: 100%;
43
35
  height: auto;
36
+ position: relative;
37
+
38
+ > img {
39
+ display: block;
40
+ width: 100%;
41
+ max-width: 100%;
42
+ height: auto;
43
+ }
44
44
  }
45
45
  }
46
46
  }
47
- }
48
47
 
49
- //-------------------- Animations --------------------//
48
+ //-------------------- Animations --------------------//
50
49
 
51
- #{$carousel-class}.slide {
52
- #{$carousel-class-items} > ul {
53
- > li {
54
- float: left;
55
- }
50
+ #{$carousel-class}.slide {
51
+ #{$carousel-class-items} > ul {
52
+ > li {
53
+ float: $align-direction;
54
+ }
56
55
 
57
- @include clear-fix;
56
+ @include clear-fix;
57
+ }
58
58
  }
59
- }
60
59
 
61
- #{$carousel-class}.fade {
62
- #{$carousel-class-items} > ul {
63
- position: relative;
60
+ #{$carousel-class}.fade {
61
+ #{$carousel-class-items} > ul {
62
+ position: relative;
64
63
 
65
- > li {
66
- position: absolute;
67
- top: 0;
68
- left: 0;
69
- opacity: 0;
70
- z-index: 1;
71
- transition: opacity $carousel-transition, visibility $carousel-transition;
64
+ > li {
65
+ position: absolute;
66
+ top: 0;
67
+ #{$align-direction}: 0;
68
+ opacity: 0;
69
+ z-index: 1;
70
+ transition: opacity $carousel-transition, visibility $carousel-transition;
72
71
 
73
- &.show { z-index: 5; }
72
+ &.show { z-index: 5; }
73
+ }
74
74
  }
75
75
  }
76
- }
77
76
 
78
- //-------------------- Modifiers --------------------//
77
+ //-------------------- Modifiers --------------------//
79
78
 
80
- @if index($carousel-modifiers, "wide") {
81
- #{$carousel-class-modifier-wide} {
82
- #{$carousel-class-items} {
83
- padding-bottom: 56.25%; // 16:9 ratio
79
+ @if index($carousel-modifiers, "wide") {
80
+ #{$carousel-class-modifier-wide} {
81
+ #{$carousel-class-items} {
82
+ padding-bottom: 56.25%; // 16:9 ratio
83
+ }
84
84
  }
85
85
  }
86
- }
87
86
 
88
- @if index($carousel-modifiers, "square") {
89
- #{$carousel-class-modifier-square} {
90
- #{$carousel-class-items} {
91
- padding-bottom: 100%; // 1:1 ratio
87
+ @if index($carousel-modifiers, "square") {
88
+ #{$carousel-class-modifier-square} {
89
+ #{$carousel-class-items} {
90
+ padding-bottom: 100%; // 1:1 ratio
91
+ }
92
92
  }
93
93
  }
94
- }
94
+ }
@@ -6,57 +6,59 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- code,
10
- var,
11
- kbd,
12
- pre {
13
- font: normal .8rem/115% Consolas, Monaco, 'Andale Mono', monospace;
14
- }
9
+ @include export("code") {
10
+ code,
11
+ var,
12
+ kbd,
13
+ pre {
14
+ font: normal .8rem/115% Consolas, Monaco, 'Andale Mono', monospace;
15
+ }
15
16
 
16
- code,
17
- var,
18
- kbd {
19
- display: inline-block;
20
- background: $gray;
21
- border-radius: $round;
22
- padding: .2em .4em;
23
- }
17
+ code,
18
+ var,
19
+ kbd {
20
+ display: inline-block;
21
+ background: $gray;
22
+ border-radius: $round;
23
+ padding: .2em .4em;
24
+ }
25
+
26
+ pre {
27
+ padding: $padding;
28
+ margin: $margin 0 0 0;
29
+ background: $gray-light;
30
+ border: 1px solid $gray-dark;
31
+ text-align: $align-direction;
32
+ direction: $text-direction;
33
+ white-space: pre;
34
+ word-spacing: normal;
35
+ font-size: .9rem;
36
+ overflow-x: auto;
37
+ -webkit-overflow-scrolling: touch;
24
38
 
25
- pre {
26
- padding: $padding;
27
- margin: $margin 0 0 0;
28
- background: $gray-light;
29
- border: 1px solid $gray-dark;
30
- text-align: left;
31
- direction: ltr;
32
- white-space: pre;
33
- word-spacing: normal;
34
- font-size: .9rem;
35
- overflow-x: auto;
36
- -webkit-overflow-scrolling: touch;
39
+ code {
40
+ padding: 0;
41
+ margin: 0;
42
+ color: inherit;
43
+ font: inherit;
44
+ white-space: pre-wrap;
45
+ background: transparent;
46
+ border: none;
47
+ display: block;
48
+ }
37
49
 
38
- code {
39
- padding: 0;
40
- margin: 0;
41
- color: inherit;
42
- font: inherit;
43
- white-space: pre-wrap;
44
- background: transparent;
45
- border: none;
46
- display: block;
50
+ &.is-scrollable {
51
+ max-height: 350px;
52
+ overflow-y: auto;
53
+ }
47
54
  }
48
55
 
49
- &.is-scrollable {
50
- max-height: 350px;
51
- overflow-y: auto;
56
+ kbd {
57
+ background: #fff;
58
+ position: relative;
59
+ border: 1px solid $gray-dark;
60
+ border-top-color: $gray-dark;
61
+ box-shadow: 0 2px 0 1px $gray-darkest;
62
+ top: -3px;
52
63
  }
53
64
  }
54
-
55
- kbd {
56
- background: #fff;
57
- position: relative;
58
- border: 1px solid $gray-dark;
59
- border-top-color: $gray-dark;
60
- box-shadow: 0 2px 0 1px $gray-darkest;
61
- top: -3px;
62
- }