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,37 +6,40 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- $icon-class-without-dot: remove-selector-char($icon-class);
9
+ @include export("icon") {
10
+ $icon-class-without-dot: remove-selector($icon-class);
10
11
 
11
- [class*="#{$icon-class-without-dot}-"] {
12
- @include reset-inline-block;
13
- background-repeat: no-repeat;
12
+ [class*="#{$icon-class-without-dot}-"] {
13
+ @include reset-inline-block;
14
+ background-repeat: no-repeat;
15
+ speak: none;
14
16
 
15
- &.is-disabled { opacity: $disabled-opacity; }
16
- }
17
+ &.is-disabled { opacity: $disabled-opacity; }
18
+ }
17
19
 
18
- @each $size in $icon-sizes {
19
- [class*="#{$icon-class-without-dot}-#{$size}"] { width: #{$size}px; height: #{$size}px; }
20
- }
20
+ @each $size in $icon-sizes {
21
+ [class*="#{$icon-class-without-dot}-#{$size}"] { width: #{$size}px; height: #{$size}px; }
22
+ }
21
23
 
22
- //-------------------- Modifiers --------------------//
24
+ //-------------------- Modifiers --------------------//
23
25
 
24
- @if index($icon-modifiers, "90deg") {
25
- #{$icon-class-modifier-90deg} { transform: rotate(90deg); }
26
- }
26
+ @if index($icon-modifiers, "90deg") {
27
+ #{$icon-class-modifier-90deg} { transform: rotate(90deg); }
28
+ }
27
29
 
28
- @if index($icon-modifiers, "180deg") {
29
- #{$icon-class-modifier-180deg} { transform: rotate(180deg); }
30
- }
30
+ @if index($icon-modifiers, "180deg") {
31
+ #{$icon-class-modifier-180deg} { transform: rotate(180deg); }
32
+ }
31
33
 
32
- @if index($icon-modifiers, "270deg") {
33
- #{$icon-class-modifier-270deg} { transform: rotate(270deg); }
34
- }
34
+ @if index($icon-modifiers, "270deg") {
35
+ #{$icon-class-modifier-270deg} { transform: rotate(270deg); }
36
+ }
35
37
 
36
- @if index($icon-modifiers, "flip") {
37
- #{$icon-class-modifier-flip} { transform: rotateY(180deg); }
38
- }
38
+ @if index($icon-modifiers, "flip") {
39
+ #{$icon-class-modifier-flip} { transform: rotateY(180deg); }
40
+ }
39
41
 
40
- @if index($icon-modifiers, "flip-vert") {
41
- #{$icon-class-modifier-flip-vert} { transform: rotateX(180deg); }
42
- }
42
+ @if index($icon-modifiers, "flip-vert") {
43
+ #{$icon-class-modifier-flip-vert} { transform: rotateX(180deg); }
44
+ }
45
+ }
@@ -6,46 +6,48 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$inputGroup-class} {
10
- display: inline-block;
11
- vertical-align: middle;
12
- white-space: nowrap;
13
-
14
- > * {
15
- float: left;
9
+ @include export("input-group") {
10
+ #{$inputGroup-class} {
16
11
  display: inline-block;
17
- position: relative;
18
- border-radius: 0;
19
- white-space: nowrap;
20
- height: auto;
21
12
  vertical-align: middle;
13
+ white-space: nowrap;
22
14
 
23
- &:hover { z-index: 1; }
24
- &:focus { z-index: 2; }
25
- }
26
-
27
- @include clear-fix;
28
- }
15
+ > * {
16
+ float: $align-direction;
17
+ display: inline-block;
18
+ position: relative;
19
+ border-radius: 0;
20
+ white-space: nowrap;
21
+ height: auto;
22
+ vertical-align: middle;
29
23
 
30
- #{$inputGroup-class-addon} {
31
- vertical-align: middle;
32
- line-height: normal;
33
- @include size-medium;
24
+ &:hover { z-index: 1; }
25
+ &:focus { z-index: 2; }
26
+ }
34
27
 
35
- @include is-small(false, true) { @include size-small; }
36
- @include is-large(false, true) { @include size-large; }
37
- }
28
+ @include clear-fix;
29
+ }
38
30
 
39
- //-------------------- Modifiers --------------------//
31
+ #{$inputGroup-class-addon} {
32
+ vertical-align: middle;
33
+ line-height: normal;
34
+ @include size-medium;
40
35
 
41
- #{$inputGroup-class}#{$shape-round-class} {
42
- > *:first-child {
43
- border-top-left-radius: $round;
44
- border-bottom-left-radius: $round;
36
+ @include is-small(false, true) { @include size-small; }
37
+ @include is-large(false, true) { @include size-large; }
45
38
  }
46
39
 
47
- > *:last-child {
48
- border-top-right-radius: $round;
49
- border-bottom-right-radius: $round;
40
+ //-------------------- Modifiers --------------------//
41
+
42
+ #{$inputGroup-class}#{$shape-round-class} {
43
+ > *:first-child {
44
+ border-top-#{$align-direction}-radius: $round;
45
+ border-bottom-#{$align-direction}-radius: $round;
46
+ }
47
+
48
+ > *:last-child {
49
+ border-top-#{$align-opposite-direction}-radius: $round;
50
+ border-bottom-#{$align-opposite-direction}-radius: $round;
51
+ }
50
52
  }
51
- }
53
+ }
@@ -6,127 +6,130 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$input-class} {
10
- @include reset-inline-block;
11
- }
12
-
13
- // Checkbox, radio
14
- #{$input-class} {
15
- #{$input-class-checkbox},
16
- #{$input-class-radio} {
9
+ @include export("input") {
10
+ #{$input-class} {
17
11
  @include reset-inline-block;
18
- background: $gray-lightest;
19
- border: 1px solid $gray-dark;
20
- width: 16px;
21
- height: 16px;
22
- top: -3px;
23
- line-height: 1rem;
24
- border-radius: $round;
25
-
26
- &:hover { border-color: $gray-darkest; }
27
12
  }
28
13
 
29
- #{$input-class-radio} { border-radius: 50%; }
30
-
31
- input {
32
- display: none;
33
-
34
- // Style when the checkbox is checked
35
- &:checked + #{$input-class-checkbox},
36
- &:checked + #{$input-class-radio} {
37
- border-color: $info;
38
- background: $info-light;
14
+ // Checkbox, radio
15
+ #{$input-class} {
16
+ #{$input-class-checkbox},
17
+ #{$input-class-radio} {
18
+ @include reset-inline-block;
19
+ background: $gray-lightest;
20
+ border: 1px solid $gray-dark;
21
+ width: 16px;
22
+ height: 16px;
23
+ top: -3px;
24
+ line-height: 1rem;
25
+ border-radius: $round;
26
+
27
+ &:hover { border-color: $gray-darkest; }
39
28
  }
40
29
 
41
- // Style when input is disabled
42
- &[disabled] + #{$input-class-checkbox},
43
- &[disabled] + #{$input-class-radio} {
44
- cursor: not-allowed;
45
- border-color: $gray;
46
- }
47
- }
48
- }
49
-
50
- // Select
51
- #{$input-class} {
52
- #{$input-class-select} {
53
- @include reset-inline-block;
54
- cursor: pointer;
55
- background: $gray-lightest;
56
- border: 1px solid $gray-dark;
57
- border-radius: $round;
58
- white-space: nowrap;
59
- line-height: 1rem;
60
- z-index: 3;
61
-
62
- &.is-active {
63
- border-color: $info;
64
- }
65
- }
30
+ #{$input-class-radio} { border-radius: 50%; }
66
31
 
67
- #{$input-class-select-label},
68
- #{$input-class-select-arrow} {
69
- display: inline-block;
70
- vertical-align: middle;
71
- line-height: normal;
72
- @include size-medium;
73
- }
32
+ input {
33
+ display: none;
74
34
 
75
- #{$input-class-select-arrow} {
76
- float: right;
35
+ // Style when the checkbox is checked
36
+ &:checked + #{$input-class-checkbox},
37
+ &:checked + #{$input-class-radio} {
38
+ border-color: $info;
39
+ background: $info-light;
40
+ }
77
41
 
78
- .caret-down { border-top-color: #000; }
42
+ // Style when input is disabled
43
+ &[disabled] + #{$input-class-checkbox},
44
+ &[disabled] + #{$input-class-radio} {
45
+ cursor: not-allowed;
46
+ border-color: $gray;
47
+ }
48
+ }
79
49
  }
80
50
 
81
- // Position the real select over the custom one
82
- select {
83
- position: absolute;
84
- top: 0;
85
- left: 0;
86
- z-index: 5;
87
- opacity: 0;
88
- width: 100%;
89
-
90
- // Style when the select is hovered
91
- &:hover + #{$input-class-select} {
92
- border-color: $gray-darkest;
51
+ // Select
52
+ #{$input-class} {
53
+ #{$input-class-select} {
54
+ @include reset-inline-block;
55
+ cursor: pointer;
56
+ background: $gray-lightest;
57
+ border: 1px solid $gray-dark;
58
+ border-radius: $round;
59
+ white-space: nowrap;
60
+ line-height: 1rem;
61
+ z-index: 3;
62
+
63
+ &.is-active {
64
+ border-color: $info;
65
+ }
93
66
  }
94
67
 
95
- // Style when the select is focused
96
- &:focus + #{$input-class-select} {
97
- border-color: $info;
68
+ #{$input-class-select-label},
69
+ #{$input-class-select-arrow} {
70
+ display: inline-block;
71
+ vertical-align: middle;
72
+ line-height: normal;
73
+ @include size-medium;
98
74
  }
99
75
 
100
- // Style when select is disabled
101
- &[disabled] + #{$input-class-select} {
102
- cursor: not-allowed;
103
- color: $gray-darkest;
104
- border-color: $gray;
76
+ #{$input-class-select-arrow} {
77
+ float: $align-opposite-direction;
105
78
 
106
- #{$input-class-select-arrow} { opacity: $default-opacity; }
79
+ .caret-down { border-top-color: #000; }
107
80
  }
108
- }
109
81
 
110
- // Select dropdown
111
- #{$input-class-select-options} {
112
- max-height: 300px;
113
- overflow: auto;
82
+ // Position the real select over the custom one
83
+ select {
84
+ position: absolute;
85
+ top: 0;
86
+ left: 0;
87
+ z-index: 5;
88
+ opacity: 0;
89
+ width: 100%;
90
+
91
+ // Style when the select is hovered
92
+ &:hover + #{$input-class-select} {
93
+ border-color: $gray-darkest;
94
+ }
114
95
 
115
- li.is-disabled {
116
- > a,
117
- > a:hover {
118
- background: none;
96
+ // Style when the select is focused
97
+ &:focus + #{$input-class-select} {
98
+ border-color: $info;
99
+ }
100
+
101
+ // Style when select is disabled
102
+ &[disabled] + #{$input-class-select} {
103
+ cursor: not-allowed;
119
104
  color: $gray-darkest;
120
- cursor: default;
105
+ border-color: $gray;
106
+
107
+ #{$input-class-select-arrow} { opacity: $default-opacity; }
121
108
  }
122
109
  }
123
110
 
124
- &.hide-selected {
125
- li.is-active { display: none !important; }
126
- }
111
+ // Select dropdown
112
+ #{$input-class-select-options} {
113
+ max-height: 300px;
114
+ overflow: auto;
115
+ z-index: 5;
116
+
117
+ li.is-disabled {
118
+ > a,
119
+ > a:hover {
120
+ background: none;
121
+ color: $gray-darkest;
122
+ cursor: default;
123
+ }
124
+ }
125
+
126
+ &.hide-selected {
127
+ li.is-active { display: none !important; }
128
+ }
127
129
 
128
- &.hide-first {
129
- li:first-child:not(#{$drop-class-heading}) { display: none !important; }
130
+ &.hide-first {
131
+ li:first-child:not(#{$drop-class-heading}) { display: none !important; }
132
+ }
130
133
  }
131
134
  }
132
- }
135
+ }
@@ -6,122 +6,124 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$label-class} {
10
- @include reset-inline-block;
11
- font-size: .7rem;
12
- line-height: 100%;
13
- background: $gray-dark;
14
- padding: .275rem .425rem;
15
- text-transform: uppercase;
16
- border-radius: 2px;
17
- white-space: nowrap;
18
- top: -1px;
19
- letter-spacing: 1px;
20
-
21
- @include is-small {
22
- font-size: .6rem;
23
- padding: .2rem .35rem;
24
- }
25
-
26
- @include is-large {
27
- font-size: .8rem;
28
- padding: .35rem .5rem;
29
- }
30
-
31
- &:empty { display: none; }
32
-
33
- &::after {
34
- content: "";
35
- height: 0;
36
- width: 0;
37
- position: absolute;
38
- }
39
- }
40
-
41
- //-------------------- Modifiers --------------------//
42
-
43
- @if index($label-modifiers, "badge") {
44
- #{$label-class-modifier-badge} {
45
- border-radius: 1rem;
46
- }
47
- }
48
-
49
- @if index($label-modifiers, "arrow-left") {
50
- #{$label-class-modifier-arrow-left} {
51
- border-top-left-radius: 0;
52
- border-bottom-left-radius: 0;
53
- padding-left: 2px;
54
- margin-left: 10px;
55
-
56
- &::after {
57
- top: 0;
58
- right: 100%;
59
- border: .65rem solid transparent;
60
- border-right-color: $gray-dark;
61
- }
9
+ @include export("label") {
10
+ #{$label-class} {
11
+ @include reset-inline-block;
12
+ font-size: .7rem;
13
+ line-height: 100%;
14
+ background: $gray-dark;
15
+ padding: .275rem .425rem;
16
+ text-transform: uppercase;
17
+ border-radius: 2px;
18
+ white-space: nowrap;
19
+ top: -1px;
20
+ letter-spacing: 1px;
62
21
 
63
22
  @include is-small {
64
- &::after { border-width: .5rem; }
23
+ font-size: .6rem;
24
+ padding: .2rem .35rem;
65
25
  }
66
26
 
67
27
  @include is-large {
68
- &::after { border-width: .75rem; }
28
+ font-size: .8rem;
29
+ padding: .35rem .5rem;
69
30
  }
70
- }
71
- }
72
31
 
73
- @if index($label-modifiers, "arrow-right") {
74
- #{$label-class-modifier-arrow-right} {
75
- border-top-right-radius: 0;
76
- border-bottom-right-radius: 0;
77
- padding-right: 2px;
78
- margin-right: 10px;
32
+ &:empty { display: none; }
79
33
 
80
34
  &::after {
81
- top: 0;
82
- left: 100%;
83
- border: .65rem solid transparent;
84
- border-left-color: $gray-dark;
35
+ content: "";
36
+ height: 0;
37
+ width: 0;
38
+ position: absolute;
85
39
  }
40
+ }
86
41
 
87
- @include is-small {
88
- &::after { border-width: .5rem; }
89
- }
42
+ //-------------------- Modifiers --------------------//
90
43
 
91
- @include is-large {
92
- &::after { border-width: .75rem; }
44
+ @if index($label-modifiers, "badge") {
45
+ #{$label-class-modifier-badge} {
46
+ border-radius: 1rem;
93
47
  }
94
48
  }
95
- }
96
49
 
97
- @if index($label-modifiers, "ribbon-left") {
98
- #{$label-class-modifier-ribbon-left} {
99
- border-top-left-radius: 0;
100
- border-bottom-left-radius: 0;
50
+ @if index($label-modifiers, "arrow-left") {
51
+ #{$label-class-modifier-arrow-left} {
52
+ border-top-left-radius: 0;
53
+ border-bottom-left-radius: 0;
54
+ padding-left: 2px;
55
+ margin-left: 10px;
56
+
57
+ &::after {
58
+ top: 0;
59
+ right: 100%;
60
+ border: .65rem solid transparent;
61
+ border-right-color: $gray-dark;
62
+ }
63
+
64
+ @include is-small {
65
+ &::after { border-width: .5rem; }
66
+ }
67
+
68
+ @include is-large {
69
+ &::after { border-width: .75rem; }
70
+ }
71
+ }
72
+ }
101
73
 
102
- &::after {
103
- top: 100%;
104
- left: 0;
105
- border: 1em solid transparent;
106
- border-top-width: 0 !important;
107
- border-left-width: 0 !important;
108
- border-right-color: $gray-darkest;
74
+ @if index($label-modifiers, "arrow-right") {
75
+ #{$label-class-modifier-arrow-right} {
76
+ border-top-right-radius: 0;
77
+ border-bottom-right-radius: 0;
78
+ padding-right: 2px;
79
+ margin-right: 10px;
80
+
81
+ &::after {
82
+ top: 0;
83
+ left: 100%;
84
+ border: .65rem solid transparent;
85
+ border-left-color: $gray-dark;
86
+ }
87
+
88
+ @include is-small {
89
+ &::after { border-width: .5rem; }
90
+ }
91
+
92
+ @include is-large {
93
+ &::after { border-width: .75rem; }
94
+ }
109
95
  }
110
96
  }
111
- }
112
97
 
113
- @if index($label-modifiers, "ribbon-right") {
114
- #{$label-class-modifier-ribbon-right} {
115
- border-top-right-radius: 0;
116
- border-bottom-right-radius: 0;
98
+ @if index($label-modifiers, "ribbon-left") {
99
+ #{$label-class-modifier-ribbon-left} {
100
+ border-top-left-radius: 0;
101
+ border-bottom-left-radius: 0;
102
+
103
+ &::after {
104
+ top: 100%;
105
+ left: 0;
106
+ border: 1em solid transparent;
107
+ border-top-width: 0 !important;
108
+ border-left-width: 0 !important;
109
+ border-right-color: $gray-darkest;
110
+ }
111
+ }
112
+ }
117
113
 
118
- &::after {
119
- top: 100%;
120
- right: 0;
121
- border: 1em solid transparent;
122
- border-top-width: 0 !important;
123
- border-right-width: 0 !important;
124
- border-left-color: $gray-darkest;
114
+ @if index($label-modifiers, "ribbon-right") {
115
+ #{$label-class-modifier-ribbon-right} {
116
+ border-top-right-radius: 0;
117
+ border-bottom-right-radius: 0;
118
+
119
+ &::after {
120
+ top: 100%;
121
+ right: 0;
122
+ border: 1em solid transparent;
123
+ border-top-width: 0 !important;
124
+ border-right-width: 0 !important;
125
+ border-left-color: $gray-darkest;
126
+ }
125
127
  }
126
128
  }
127
- }
129
+ }