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,14 +6,16 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$pin-class} {
10
- position: absolute;
11
- }
9
+ @include export("pin") {
10
+ #{$pin-class} {
11
+ position: absolute;
12
+ }
12
13
 
13
- #{$pin-class}.sticky {
14
- transition: top .6s ease-in-out, right $pin-transition ease-in-out, left $pin-transition ease-in-out;
15
- }
14
+ #{$pin-class}.sticky {
15
+ transition: top .6s ease-in-out, right $pin-transition ease-in-out, left $pin-transition ease-in-out;
16
+ }
16
17
 
17
- #{$pin-class}.slide {
18
- transition: top $pin-transition linear, right $pin-transition linear, left $pin-transition linear;
19
- }
18
+ #{$pin-class}.slide {
19
+ transition: top $pin-transition linear, right $pin-transition linear, left $pin-transition linear;
20
+ }
21
+ }
@@ -6,64 +6,66 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- $popover-arrow-width-double: ($popover-arrow-width * 2);
10
- $popover-arrow-width-shadow: ($popover-arrow-width - 2);
9
+ @include export("popover") {
10
+ $popover-arrow-width-double: ($popover-arrow-width * 2);
11
+ $popover-arrow-width-shadow: ($popover-arrow-width - 2);
11
12
 
12
- #{$popover-class} {
13
- position: absolute;
14
- top: 0;
15
- left: 0;
16
- margin: $margin;
17
- padding: 0;
18
- border: 0;
19
- z-index: $popover-zindex;
20
- max-width: 300px;
21
- visibility: hidden;
13
+ #{$popover-class} {
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ margin: $margin;
18
+ padding: 0;
19
+ border: 0;
20
+ z-index: $popover-zindex;
21
+ max-width: 300px;
22
+ visibility: hidden;
22
23
 
23
- &.center-left #{$popover-class-arrow},
24
- &.center-right #{$popover-class-arrow} {
25
- top: 50%;
26
- margin-top: -#{$popover-arrow-width}px;
27
- }
24
+ &.center-left #{$popover-class-arrow},
25
+ &.center-right #{$popover-class-arrow} {
26
+ top: 50%;
27
+ margin-top: -#{$popover-arrow-width}px;
28
+ }
28
29
 
29
- &.center-left #{$popover-class-arrow} {
30
- border-left-color: $gray;
31
- right: -#{$popover-arrow-width-double}px;
32
- }
30
+ &.center-left #{$popover-class-arrow} {
31
+ border-left-color: $gray;
32
+ right: -#{$popover-arrow-width-double}px;
33
+ }
33
34
 
34
- &.center-right #{$popover-class-arrow} {
35
- border-right-color: $gray;
36
- left: -#{$popover-arrow-width-double}px;
37
- }
35
+ &.center-right #{$popover-class-arrow} {
36
+ border-right-color: $gray;
37
+ left: -#{$popover-arrow-width-double}px;
38
+ }
38
39
 
39
- &.top-center #{$popover-class-arrow},
40
- &.bottom-center #{$popover-class-arrow} {
41
- left: 50%;
42
- margin-left: -#{$popover-arrow-width}px;
43
- }
40
+ &.top-center #{$popover-class-arrow},
41
+ &.bottom-center #{$popover-class-arrow} {
42
+ left: 50%;
43
+ margin-left: -#{$popover-arrow-width}px;
44
+ }
44
45
 
45
- &.top-center #{$popover-class-arrow} {
46
- border-top-color: $gray;
47
- bottom: -#{$popover-arrow-width-double}px;
48
- }
46
+ &.top-center #{$popover-class-arrow} {
47
+ border-top-color: $gray;
48
+ bottom: -#{$popover-arrow-width-double}px;
49
+ }
49
50
 
50
- &.bottom-center #{$popover-class-arrow} {
51
- border-bottom-color: $gray;
52
- top: -#{$popover-arrow-width-double}px;
51
+ &.bottom-center #{$popover-class-arrow} {
52
+ border-bottom-color: $gray;
53
+ top: -#{$popover-arrow-width-double}px;
54
+ }
53
55
  }
54
- }
55
56
 
56
- #{$popover-class-head},
57
- #{$popover-class-body} {
58
- padding: $small-padding;
59
- }
57
+ #{$popover-class-head},
58
+ #{$popover-class-body} {
59
+ padding: $small-padding;
60
+ }
60
61
 
61
- #{$popover-class-arrow} {
62
- border: #{$popover-arrow-width}px solid transparent;
62
+ #{$popover-class-arrow} {
63
+ border: #{$popover-arrow-width}px solid transparent;
63
64
 
64
- &::after {
65
- border: #{$popover-arrow-width-shadow}px solid transparent;
66
- top: -#{$popover-arrow-width-shadow}px;
67
- left: -#{$popover-arrow-width-shadow}px;
65
+ &::after {
66
+ border: #{$popover-arrow-width-shadow}px solid transparent;
67
+ top: -#{$popover-arrow-width-shadow}px;
68
+ left: -#{$popover-arrow-width-shadow}px;
69
+ }
68
70
  }
69
71
  }
@@ -6,56 +6,58 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$progress-class} {
10
- overflow: hidden;
11
- position: relative;
12
-
13
- @include is-small {
14
- #{$progress-class-bar} {
15
- height: 1rem;
16
- line-height: 1rem;
17
- font-size: $small-size;
9
+ @include export("progress") {
10
+ #{$progress-class} {
11
+ overflow: hidden;
12
+ position: relative;
13
+
14
+ @include is-small {
15
+ #{$progress-class-bar} {
16
+ height: 1rem;
17
+ line-height: 1rem;
18
+ font-size: $small-size;
19
+ }
18
20
  }
19
- }
20
21
 
21
- @include is-large {
22
- #{$progress-class-bar} {
23
- height: 2rem;
24
- line-height: 2rem;
25
- font-size: $large-size;
22
+ @include is-large {
23
+ #{$progress-class-bar} {
24
+ height: 2rem;
25
+ line-height: 2rem;
26
+ font-size: $large-size;
27
+ }
26
28
  }
27
- }
28
29
 
29
- @include clear-fix;
30
+ @include clear-fix;
30
31
 
31
- //----- Effects ------//
32
+ //----- Effects ------//
32
33
 
33
- &#{$shape-round-class} {
34
- #{$progress-class-bar}:first-child {
35
- border-top-left-radius: $round;
36
- border-bottom-left-radius: $round;
34
+ &#{$shape-round-class} {
35
+ #{$progress-class-bar}:first-child {
36
+ border-top-#{$align-direction}-radius: $round;
37
+ border-bottom-#{$align-direction}-radius: $round;
38
+ }
37
39
  }
38
- }
39
40
 
40
- @if index($progress-effects, "pill") {
41
- &#{$shape-pill-class} {
42
- border-radius: $pill;
41
+ @if index($progress-effects, "pill") {
42
+ &#{$shape-pill-class} {
43
+ border-radius: $pill;
43
44
 
44
- #{$progress-class-bar}:first-child {
45
- border-top-left-radius: $pill;
46
- border-bottom-left-radius: $pill;
45
+ #{$progress-class-bar}:first-child {
46
+ border-top-#{$align-direction}-radius: $pill;
47
+ border-bottom-#{$align-direction}-radius: $pill;
48
+ }
47
49
  }
48
50
  }
49
51
  }
50
- }
51
52
 
52
- #{$progress-class-bar} {
53
- height: 1.5rem;
54
- line-height: 1.5rem;
55
- overflow: hidden;
56
- position: relative;
57
- text-align: center;
58
- font-size: $medium-size;
59
- float: left;
60
- transition: width $progress-transition, background $progress-transition;
61
- }
53
+ #{$progress-class-bar} {
54
+ height: 1.5rem;
55
+ line-height: 1.5rem;
56
+ overflow: hidden;
57
+ position: relative;
58
+ text-align: center;
59
+ font-size: $medium-size;
60
+ float: $align-direction;
61
+ transition: width $progress-transition, background $progress-transition;
62
+ }
63
+ }
@@ -6,79 +6,74 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- .fluid {
10
- display: block;
11
- width: 100%;
12
- height: auto;
13
- max-width: 100%;
14
- }
9
+ @include export("responsive") {
10
+ .show-retina,
11
+ .show-print { display: none !important; }
15
12
 
16
- .show-retina,
17
- .show-print { display: none !important; }
13
+ // Extra small states
14
+ @include in-xsmall {
15
+ .show-xlarge,
16
+ .show-large,
17
+ .show-medium,
18
+ .show-small,
19
+ .hide-xsmall { display: none !important; }
20
+ }
18
21
 
19
- // Extra small states
20
- @include in-xsmall {
21
- .show-xlarge,
22
- .show-large,
23
- .show-medium,
24
- .show-small,
25
- .hide-xsmall { display: none !important; }
26
- }
22
+ // Small states
23
+ @include in-small {
24
+ .show-xlarge,
25
+ .show-large,
26
+ .show-medium,
27
+ .show-xsmall,
28
+ .hide-small { display: none !important; }
29
+ }
27
30
 
28
- // Small states
29
- @include in-small {
30
- .show-xlarge,
31
- .show-large,
32
- .show-medium,
33
- .show-xsmall,
34
- .hide-small { display: none !important; }
35
- }
31
+ // Medium states
32
+ @include in-medium {
33
+ .show-xlarge,
34
+ .show-large,
35
+ .show-small,
36
+ .show-xsmall,
37
+ .hide-medium { display: none !important; }
38
+ }
36
39
 
37
- // Medium states
38
- @include in-medium {
39
- .show-xlarge,
40
- .show-large,
41
- .show-small,
42
- .show-xsmall,
43
- .hide-medium { display: none !important; }
44
- }
40
+ // Large states
41
+ @include in-large {
42
+ .show-xlarge,
43
+ .show-medium,
44
+ .show-small,
45
+ .show-xsmall,
46
+ .hide-large { display: none !important; }
47
+ }
45
48
 
46
- // Large states
47
- @include in-large {
48
- .show-xlarge,
49
- .show-medium,
50
- .show-small,
51
- .show-xsmall,
52
- .hide-large { display: none !important; }
53
- }
49
+ // Extra large states
50
+ @include in-xlarge {
51
+ .show-large,
52
+ .show-medium,
53
+ .show-small,
54
+ .show-xsmall,
55
+ .hide-xlarge { display: none !important; }
56
+ }
54
57
 
55
- // Extra large states
56
- @include in-xlarge {
57
- .show-large,
58
- .show-medium,
59
- .show-small,
60
- .show-xsmall,
61
- .hide-xlarge { display: none !important; }
62
- }
58
+ // Orientation states
59
+ @include if-portrait {
60
+ .show-landscape,
61
+ .hide-portrait { display: none !important; }
62
+ }
63
63
 
64
- // Orientation states
65
- @include if-portrait {
66
- .show-landscape,
67
- .hide-portrait { display: none !important; }
68
- }
64
+ @include if-landscape {
65
+ .show-portrait,
66
+ .hide-landscape { display: none !important; }
67
+ }
69
68
 
70
- @include if-landscape {
71
- .show-portrait,
72
- .hide-landscape { display: none !important; }
73
- }
69
+ // Type states
70
+ @include if-retina {
71
+ .hide-retina { display: none !important; }
72
+ @include responsive-display-block(".show-retina");
73
+ }
74
74
 
75
- // Type states
76
- @include if-retina {
77
- .hide-retina { display: none !important; }
78
- @include responsive-display-block(".show-retina");
75
+ @media print {
76
+ .hide-print { display: none !important; }
77
+ @include responsive-display-block(".show-print");
78
+ }
79
79
  }
80
-
81
- @media print {
82
- .hide-print { display: none !important; }
83
- @include responsive-display-block(".show-print");
84
- }
@@ -6,76 +6,78 @@
6
6
 
7
7
  @import "../common";
8
8
 
9
- #{$showcase-class} {
10
- position: fixed;
11
- top: 50%;
12
- left: 50%;
13
- width: auto;
14
- height: auto;
15
- margin: 0;
16
- padding: 0;
17
- opacity: 0;
18
- z-index: $showcase-zindex;
19
- visibility: hidden;
20
- backface-visibility: hidden;
21
- transform: translate(-50%, -50%);
22
- transition: opacity $showcase-transition, visibility $showcase-transition;
9
+ @include export("showcase") {
10
+ #{$showcase-class} {
11
+ position: fixed;
12
+ top: 50%;
13
+ left: 50%;
14
+ width: auto;
15
+ height: auto;
16
+ margin: 0;
17
+ padding: 0;
18
+ opacity: 0;
19
+ z-index: $showcase-zindex;
20
+ visibility: hidden;
21
+ backface-visibility: hidden;
22
+ transform: translate(-50%, -50%);
23
+ transition: opacity $showcase-transition, visibility $showcase-transition;
23
24
 
24
- &.is-loading,
25
- &.is-single {
26
- #{$showcase-class-prev},
27
- #{$showcase-class-next},
28
- #{$showcase-class-tabs} {
29
- display: none !important;
25
+ &.is-loading,
26
+ &.is-single {
27
+ #{$showcase-class-prev},
28
+ #{$showcase-class-next},
29
+ #{$showcase-class-tabs} {
30
+ display: none !important;
31
+ }
30
32
  }
31
- }
32
33
 
33
- &.is-loading {
34
- #{$showcase-class-close} {
35
- display: none !important;
34
+ &.is-loading {
35
+ #{$showcase-class-close} {
36
+ display: none !important;
37
+ }
36
38
  }
37
39
  }
38
- }
39
40
 
40
- #{$showcase-class-close} {
41
- float: right;
42
- line-height: 1rem;
43
- background: none;
44
- border: 0;
45
- padding: 0;
46
- margin-left: 1rem;
47
- }
41
+ #{$showcase-class-close} {
42
+ float: $align-opposite-direction;
43
+ line-height: 1rem;
44
+ background: none;
45
+ border: 0;
46
+ padding: 0;
47
+ margin-#{$align-direction}: 1rem;
48
+ }
48
49
 
49
- #{$showcase-class-caption} {
50
- opacity: 0;
51
- transition: opacity $showcase-transition, visibility $showcase-transition;
52
- }
50
+ #{$showcase-class-caption} {
51
+ opacity: 0;
52
+ transition: opacity $showcase-transition, visibility $showcase-transition;
53
+ }
53
54
 
54
- #{$showcase-class-inner} {
55
- position: relative;
56
- margin-bottom: $padding;
57
- }
55
+ #{$showcase-class-inner} {
56
+ position: relative;
57
+ margin-bottom: $padding;
58
+ }
58
59
 
59
- #{$showcase-class-items} {
60
- @include reset-list;
61
- width: 100px;
62
- height: 100px;
63
- position: relative;
64
- overflow: hidden;
65
- transition: width $showcase-transition, height $showcase-transition;
60
+ #{$showcase-class-items} {
61
+ @include reset-list;
62
+ width: 100px;
63
+ height: 100px;
64
+ position: relative;
65
+ overflow: hidden;
66
+ transition: width $showcase-transition, height $showcase-transition;
66
67
 
67
- > li {
68
- position: absolute;
69
- top: 0;
70
- left: 0;
71
- opacity: 0;
72
- transition: opacity $showcase-transition, visibility $showcase-transition;
68
+ > li {
69
+ position: absolute;
70
+ top: 0;
71
+ #{$align-direction}: 0;
72
+ opacity: 0;
73
+ transition: opacity $showcase-transition, visibility $showcase-transition;
73
74
 
74
- > img {
75
- max-width: 100%;
76
- width: 100%;
77
- height: auto;
78
- display: block;
75
+ > img {
76
+ max-width: 100%;
77
+ width: 100%;
78
+ height: auto;
79
+ display: block;
80
+ }
79
81
  }
80
82
  }
81
- }
83
+ }