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.
- checksums.yaml +4 -4
- data/changelog.md +66 -183
- data/readme.md +17 -8
- data/roadmap.md +13 -11
- data/scss/toolkit.scss +3 -2
- data/scss/toolkit/_common.scss +72 -22
- data/scss/toolkit/base.scss +12 -1
- data/scss/toolkit/components/accordion.scss +19 -17
- data/scss/toolkit/components/blackout.scss +20 -18
- data/scss/toolkit/components/breadcrumb.scss +37 -36
- data/scss/toolkit/components/button-group.scss +130 -128
- data/scss/toolkit/components/button.scss +100 -98
- data/scss/toolkit/components/carousel.scss +63 -63
- data/scss/toolkit/components/code.scss +49 -47
- data/scss/toolkit/components/divider.scss +34 -32
- data/scss/toolkit/components/drop.scss +82 -79
- data/scss/toolkit/components/flex.scss +110 -0
- data/scss/toolkit/components/flyout.scss +59 -53
- data/scss/toolkit/components/form.scss +178 -170
- data/scss/toolkit/components/grid.scss +36 -34
- data/scss/toolkit/components/icon.scss +28 -25
- data/scss/toolkit/components/input-group.scss +35 -33
- data/scss/toolkit/components/input.scss +102 -99
- data/scss/toolkit/components/label.scss +99 -97
- data/scss/toolkit/components/lazy-load.scss +6 -4
- data/scss/toolkit/components/loader.scss +124 -122
- data/scss/toolkit/components/mask.scss +24 -22
- data/scss/toolkit/components/matrix.scss +16 -14
- data/scss/toolkit/components/modal.scss +104 -102
- data/scss/toolkit/components/notice.scss +24 -23
- data/scss/toolkit/components/off-canvas.scss +118 -116
- data/scss/toolkit/components/pagination.scss +90 -66
- data/scss/toolkit/components/pin.scss +11 -9
- data/scss/toolkit/components/popover.scss +50 -48
- data/scss/toolkit/components/progress.scss +42 -40
- data/scss/toolkit/components/responsive.scss +61 -66
- data/scss/toolkit/components/showcase.scss +62 -60
- data/scss/toolkit/components/step.scss +51 -44
- data/scss/toolkit/components/switch.scss +96 -93
- data/scss/toolkit/components/tab.scss +25 -25
- data/scss/toolkit/components/table.scss +76 -75
- data/scss/toolkit/components/toast.scss +91 -89
- data/scss/toolkit/components/tooltip.scss +82 -80
- data/scss/toolkit/components/type-ahead.scss +53 -52
- data/scss/toolkit/components/typography.scss +45 -43
- data/scss/toolkit/mixins/_flex.scss +80 -0
- data/scss/toolkit/mixins/_grid.scss +6 -29
- data/scss/toolkit/mixins/_helper.scss +33 -4
- data/scss/toolkit/mixins/_layout.scss +28 -1
- data/version.md +1 -1
- metadata +4 -2
@@ -6,37 +6,40 @@
|
|
6
6
|
|
7
7
|
@import "../common";
|
8
8
|
|
9
|
-
|
9
|
+
@include export("icon") {
|
10
|
+
$icon-class-without-dot: remove-selector($icon-class);
|
10
11
|
|
11
|
-
[class*="#{$icon-class-without-dot}-"] {
|
12
|
-
|
13
|
-
|
12
|
+
[class*="#{$icon-class-without-dot}-"] {
|
13
|
+
@include reset-inline-block;
|
14
|
+
background-repeat: no-repeat;
|
15
|
+
speak: none;
|
14
16
|
|
15
|
-
|
16
|
-
}
|
17
|
+
&.is-disabled { opacity: $disabled-opacity; }
|
18
|
+
}
|
17
19
|
|
18
|
-
@each $size in $icon-sizes {
|
19
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
10
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@include size-medium;
|
24
|
+
&:hover { z-index: 1; }
|
25
|
+
&:focus { z-index: 2; }
|
26
|
+
}
|
34
27
|
|
35
|
-
|
36
|
-
|
37
|
-
}
|
28
|
+
@include clear-fix;
|
29
|
+
}
|
38
30
|
|
39
|
-
|
31
|
+
#{$inputGroup-class-addon} {
|
32
|
+
vertical-align: middle;
|
33
|
+
line-height: normal;
|
34
|
+
@include size-medium;
|
40
35
|
|
41
|
-
|
42
|
-
|
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
|
-
|
48
|
-
|
49
|
-
|
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
|
-
|
10
|
-
|
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
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
-
|
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
|
-
|
68
|
-
|
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
|
-
|
76
|
-
|
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
|
-
|
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
|
-
//
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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
|
-
|
96
|
-
|
97
|
-
|
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
|
-
|
101
|
-
|
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
|
-
|
79
|
+
.caret-down { border-top-color: #000; }
|
107
80
|
}
|
108
|
-
}
|
109
81
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
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
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
105
|
+
border-color: $gray;
|
106
|
+
|
107
|
+
#{$input-class-select-arrow} { opacity: $default-opacity; }
|
121
108
|
}
|
122
109
|
}
|
123
110
|
|
124
|
-
|
125
|
-
|
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
|
-
|
129
|
-
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
23
|
+
font-size: .6rem;
|
24
|
+
padding: .2rem .35rem;
|
65
25
|
}
|
66
26
|
|
67
27
|
@include is-large {
|
68
|
-
|
28
|
+
font-size: .8rem;
|
29
|
+
padding: .35rem .5rem;
|
69
30
|
}
|
70
|
-
}
|
71
|
-
}
|
72
31
|
|
73
|
-
|
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
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
35
|
+
content: "";
|
36
|
+
height: 0;
|
37
|
+
width: 0;
|
38
|
+
position: absolute;
|
85
39
|
}
|
40
|
+
}
|
86
41
|
|
87
|
-
|
88
|
-
&::after { border-width: .5rem; }
|
89
|
-
}
|
42
|
+
//-------------------- Modifiers --------------------//
|
90
43
|
|
91
|
-
|
92
|
-
|
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, "
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
-
|
103
|
-
|
104
|
-
|
105
|
-
border:
|
106
|
-
|
107
|
-
|
108
|
-
|
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-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
-
|
119
|
-
|
120
|
-
right: 0;
|
121
|
-
border:
|
122
|
-
|
123
|
-
|
124
|
-
|
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
|
+
}
|