fustrate-rails 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fustrate/rails/version.rb +1 -1
- data/vendor/assets/javascripts/fustrate/_module.coffee +14 -8
- data/vendor/assets/javascripts/fustrate/components/autocomplete.coffee +4 -4
- data/vendor/assets/javascripts/fustrate/components/file_picker.coffee +1 -0
- data/vendor/assets/javascripts/fustrate/components/flash.coffee +4 -4
- data/vendor/assets/javascripts/fustrate/components/modal.coffee +79 -19
- data/vendor/assets/javascripts/fustrate/components/pagination.coffee +5 -5
- data/vendor/assets/javascripts/fustrate/generic_form.coffee +4 -5
- data/vendor/assets/javascripts/fustrate/generic_page.coffee +6 -6
- data/vendor/assets/javascripts/fustrate/generic_table.coffee +2 -2
- data/vendor/assets/javascripts/fustrate/listenable.coffee +1 -1
- data/vendor/assets/stylesheets/_fustrate.sass +6 -6
- data/vendor/assets/stylesheets/awesomplete.sass +2 -1
- data/vendor/assets/stylesheets/fustrate/_colors.sass +3 -0
- data/vendor/assets/stylesheets/fustrate/_settings.sass +7 -7
- data/vendor/assets/stylesheets/fustrate/components/_components.sass +17 -17
- data/vendor/assets/stylesheets/fustrate/components/_functions.sass +9 -8
- data/vendor/assets/stylesheets/fustrate/components/alerts.sass +26 -18
- data/vendor/assets/stylesheets/fustrate/components/buttons.sass +17 -21
- data/vendor/assets/stylesheets/fustrate/components/disclosures.sass +5 -5
- data/vendor/assets/stylesheets/fustrate/components/dropdowns.sass +24 -19
- data/vendor/assets/stylesheets/fustrate/components/flash.sass +21 -16
- data/vendor/assets/stylesheets/fustrate/components/forms.sass +99 -92
- data/vendor/assets/stylesheets/fustrate/components/grid.sass +15 -23
- data/vendor/assets/stylesheets/fustrate/components/labels.sass +13 -12
- data/vendor/assets/stylesheets/fustrate/components/modals.sass +97 -49
- data/vendor/assets/stylesheets/fustrate/components/pagination.sass +41 -29
- data/vendor/assets/stylesheets/fustrate/components/panels.sass +30 -12
- data/vendor/assets/stylesheets/fustrate/components/popovers.sass +10 -6
- data/vendor/assets/stylesheets/fustrate/components/tables.sass +13 -9
- data/vendor/assets/stylesheets/fustrate/components/tabs.sass +6 -6
- data/vendor/assets/stylesheets/fustrate/components/tooltips.sass +12 -12
- data/vendor/assets/stylesheets/fustrate/components/typography.sass +140 -104
- metadata +5 -5
@@ -1,7 +1,7 @@
|
|
1
|
-
@import
|
2
|
-
@import
|
3
|
-
@import
|
1
|
+
@import 'bourbon'
|
2
|
+
@import 'font-awesome'
|
3
|
+
@import 'awesomplete'
|
4
4
|
|
5
|
-
@import
|
6
|
-
@import
|
7
|
-
@import
|
5
|
+
@import 'fustrate/colors'
|
6
|
+
@import 'fustrate/settings'
|
7
|
+
@import 'fustrate/components/components'
|
@@ -5,16 +5,16 @@ $small-limit: 40em
|
|
5
5
|
// 64 is a bit too wide for half-screening on our monitors
|
6
6
|
$medium-limit: 58em
|
7
7
|
|
8
|
-
$screen:
|
8
|
+
$screen: 'only screen'
|
9
9
|
|
10
|
-
$landscape:
|
11
|
-
$portrait:
|
10
|
+
$landscape: '#{$screen} and (orientation: landscape)'
|
11
|
+
$portrait: '#{$screen} and (orientation: portrait)'
|
12
12
|
|
13
13
|
$small-up: $screen
|
14
|
-
$small-only:
|
14
|
+
$small-only: '#{$screen} and (max-width: #{$small-limit})'
|
15
15
|
|
16
|
-
$medium-up:
|
17
|
-
$medium-only:
|
16
|
+
$medium-up: '#{$screen} and (min-width:#{$small-limit + .063em})'
|
17
|
+
$medium-only: '#{$screen} and (min-width:#{$small-limit + .063em}) and (max-width:#{$medium-limit})'
|
18
18
|
|
19
|
-
$large-up:
|
19
|
+
$large-up: '#{$screen} and (min-width:#{$medium-limit + .063em})'
|
20
20
|
$large-only: $large-up
|
@@ -1,22 +1,22 @@
|
|
1
|
-
@import
|
1
|
+
@import 'functions'
|
2
2
|
|
3
|
-
@import
|
4
|
-
@import
|
5
|
-
@import
|
6
|
-
@import
|
3
|
+
@import 'typography'
|
4
|
+
@import 'grid'
|
5
|
+
@import 'buttons'
|
6
|
+
@import 'forms'
|
7
7
|
|
8
|
-
@import
|
9
|
-
@import
|
10
|
-
@import
|
11
|
-
@import
|
12
|
-
@import
|
13
|
-
@import
|
14
|
-
@import
|
15
|
-
@import
|
16
|
-
@import
|
17
|
-
@import
|
18
|
-
@import
|
19
|
-
@import
|
8
|
+
@import 'alerts'
|
9
|
+
@import 'disclosures'
|
10
|
+
@import 'dropdowns'
|
11
|
+
@import 'flash'
|
12
|
+
@import 'labels'
|
13
|
+
@import 'modals'
|
14
|
+
@import 'pagination'
|
15
|
+
@import 'panels'
|
16
|
+
@import 'popovers'
|
17
|
+
@import 'tables'
|
18
|
+
@import 'tabs'
|
19
|
+
@import 'tooltips'
|
20
20
|
|
21
21
|
+fustrate-typography
|
22
22
|
+fustrate-grid
|
@@ -6,8 +6,8 @@ $rem-base: 16px !default
|
|
6
6
|
@function convert-to-rem($value, $base-value: $rem-base)
|
7
7
|
$value: strip-unit($value) / strip-unit($base-value) * 1rem
|
8
8
|
|
9
|
-
@if ($value ==
|
10
|
-
|
9
|
+
@if ($value == 0)
|
10
|
+
@return 0
|
11
11
|
|
12
12
|
@return $value
|
13
13
|
|
@@ -17,24 +17,25 @@ $rem-base: 16px !default
|
|
17
17
|
@if $max == 1
|
18
18
|
@return convert-to-rem(nth($values, 1), $base-value)
|
19
19
|
|
20
|
-
$
|
20
|
+
$rem-values: ()
|
21
21
|
|
22
22
|
@for $i from 1 through $max
|
23
|
-
$
|
23
|
+
$rem-values: append($rem-values, convert-to-rem(nth($values, $i), $base-value))
|
24
24
|
|
25
|
-
@return $
|
25
|
+
@return $rem-values
|
26
26
|
|
27
27
|
=font-awesome($unicode, $padding-right: 3px, $spin: false)
|
28
|
-
font-
|
28
|
+
-moz-osx-font-smoothing: grayscale
|
29
|
+
-webkit-font-smoothing: antialiased
|
29
30
|
content: $unicode
|
31
|
+
font-family: FontAwesome
|
30
32
|
font-weight: 100
|
31
33
|
text-rendering: auto
|
32
|
-
-webkit-font-smoothing: antialiased
|
33
|
-
-moz-osx-font-smoothing: grayscale
|
34
34
|
|
35
35
|
@if $spin
|
36
36
|
-webkit-animation: fa-spin 2s infinite linear
|
37
37
|
animation: fa-spin 2s infinite linear
|
38
|
+
display: inline-block
|
38
39
|
margin-right: $padding-right
|
39
40
|
@else
|
40
41
|
padding-right: $padding-right
|
@@ -1,15 +1,15 @@
|
|
1
|
-
$alert-padding: rem-calc(8) rem-calc(24) rem-calc(8) rem-calc(14)
|
2
|
-
$alert-font-size: rem-calc(14)
|
1
|
+
$alert-padding: rem-calc(8) rem-calc(24) rem-calc(8) rem-calc(14) !default
|
2
|
+
$alert-font-size: rem-calc(14) !default
|
3
|
+
$alert-dark-color: #333 !default
|
4
|
+
$alert-light-color: #fff !default
|
3
5
|
|
4
6
|
=alert-color($bg: #eaeaea)
|
7
|
+
$color: if(lightness($bg) > 70%, $alert-dark-color, $alert-light-color)
|
8
|
+
|
5
9
|
background-color: $bg
|
6
10
|
border-color: scale-color($bg, $lightness: -14%)
|
7
|
-
|
8
|
-
text-shadow: 0 1px 1px scale_color($bg, $lightness: if(lightness($bg) < 70%, -70%, 70%))
|
9
|
-
|
10
|
-
$color: if(lightness($bg) > 70%, #333, #fff)
|
11
|
-
|
12
11
|
color: $color
|
12
|
+
text-shadow: 0 1px 1px scale-color($bg, $lightness: if(lightness($bg) < 70%, -70%, 70%))
|
13
13
|
|
14
14
|
a,
|
15
15
|
a:hover
|
@@ -18,61 +18,69 @@ $alert-font-size: rem-calc(14)
|
|
18
18
|
|
19
19
|
=fustrate-alerts
|
20
20
|
.alert-box
|
21
|
+
+alert-color
|
21
22
|
border-style: solid
|
22
23
|
border-width: 1px
|
23
24
|
display: block
|
25
|
+
font-size: $alert-font-size
|
24
26
|
font-weight: normal
|
25
27
|
margin-bottom: rem-calc(20)
|
26
|
-
position: relative
|
27
28
|
padding: $alert-padding
|
28
|
-
|
29
|
-
|
30
|
-
+alert-color
|
29
|
+
position: relative
|
30
|
+
transition: opacity .3s ease-out
|
31
31
|
|
32
32
|
.panel &:last-child
|
33
33
|
margin-bottom: 0
|
34
34
|
|
35
|
-
li,
|
35
|
+
li,
|
36
|
+
p
|
36
37
|
font-size: $alert-font-size
|
37
38
|
|
38
39
|
& > :last-child
|
39
40
|
margin-bottom: 0
|
40
41
|
|
41
42
|
a.close
|
43
|
+
color: $alert-dark-color
|
42
44
|
font-size: rem-calc(22)
|
43
|
-
padding: 9px 6px 4px
|
44
45
|
line-height: 0
|
45
|
-
position: absolute
|
46
|
-
top: 50%
|
47
46
|
margin-top: -(rem-calc(22) / 2)
|
47
|
+
opacity: .6
|
48
|
+
padding: 9px 6px 4px
|
49
|
+
position: absolute
|
48
50
|
right: rem-calc(4)
|
49
|
-
opacity: 0.6
|
50
|
-
color: #333
|
51
51
|
text-decoration: none !important
|
52
|
+
top: 50%
|
52
53
|
|
53
54
|
&:hover,
|
54
55
|
&:focus
|
55
|
-
opacity:
|
56
|
+
opacity: .8
|
56
57
|
|
57
58
|
&.radius
|
58
59
|
border-radius: 3px
|
60
|
+
|
59
61
|
&.round
|
60
62
|
border-radius: 8px
|
61
63
|
|
62
64
|
&.plain
|
63
65
|
+alert-color(lighten($grey, 57%))
|
66
|
+
|
64
67
|
&.success,
|
65
68
|
&.good,
|
66
69
|
&.birthday
|
67
70
|
+alert-color($success-color)
|
71
|
+
|
68
72
|
&.alert
|
69
73
|
+alert-color($alert-color)
|
74
|
+
|
70
75
|
&.secondary
|
71
76
|
+alert-color($secondary-color)
|
77
|
+
|
72
78
|
&.warning
|
73
79
|
+alert-color($warning-color)
|
80
|
+
|
74
81
|
&.danger,
|
75
82
|
&.error
|
76
83
|
+alert-color($danger-color)
|
84
|
+
|
77
85
|
&.info
|
78
86
|
+alert-color($info-color)
|
@@ -1,31 +1,25 @@
|
|
1
|
-
$button-padding: rem-calc(12)
|
2
|
-
$button-font-size: rem-calc(12)
|
3
|
-
$button-color: #fff
|
4
|
-
$button-alt-color: #333
|
1
|
+
$button-padding: rem-calc(12) !default
|
2
|
+
$button-font-size: rem-calc(12) !default
|
3
|
+
$button-color: #fff !default
|
4
|
+
$button-alt-color: #333 !default
|
5
5
|
|
6
6
|
=button-base
|
7
|
-
|
8
|
-
border:
|
7
|
+
-webkit-appearance: none
|
8
|
+
border: 0
|
9
|
+
border-radius: 0
|
9
10
|
cursor: pointer
|
10
|
-
|
11
|
-
|
11
|
+
display: inline-block
|
12
12
|
font-size: $button-font-size
|
13
13
|
font-weight: normal
|
14
|
-
|
15
14
|
line-height: normal
|
15
|
+
margin: 0 0 rem-calc(5)
|
16
16
|
position: relative
|
17
|
-
text-decoration: none
|
18
17
|
text-align: center
|
19
|
-
-
|
20
|
-
|
21
|
-
|
22
|
-
+transition(background .2s linear)
|
18
|
+
text-decoration: none
|
19
|
+
transition: background .2s linear
|
23
20
|
|
24
21
|
=button-size($padding: $button-padding, $sides: $button-padding * 1.5)
|
25
|
-
padding
|
26
|
-
padding-right: $sides
|
27
|
-
padding-bottom: $padding + rem-calc(1)
|
28
|
-
padding-left: $sides
|
22
|
+
padding: $padding $sides ($padding + rem-calc(1))
|
29
23
|
|
30
24
|
=button-style($bg: $primary-color, $hover: true)
|
31
25
|
$color: if(lightness($bg) < 70%, $button-color, $button-alt-color)
|
@@ -33,7 +27,7 @@ $button-alt-color: #333
|
|
33
27
|
|
34
28
|
background: $bg
|
35
29
|
color: $color
|
36
|
-
text-shadow: 0 1px 1px
|
30
|
+
text-shadow: 0 1px 1px scale-color($bg, $lightness: $shadow-lightness)
|
37
31
|
|
38
32
|
.alert-box &
|
39
33
|
color: $color
|
@@ -42,7 +36,7 @@ $button-alt-color: #333
|
|
42
36
|
@if $hover
|
43
37
|
&:hover,
|
44
38
|
&:active
|
45
|
-
background: if($hover == true,
|
39
|
+
background: if($hover == true, scale-color($bg, $lightness: -17%), $hover)
|
46
40
|
color: $color
|
47
41
|
|
48
42
|
.alert-box &:hover,
|
@@ -76,8 +70,8 @@ $button-alt-color: #333
|
|
76
70
|
|
77
71
|
&.tiny
|
78
72
|
+button-size($button-padding * .4, $button-padding * .6)
|
79
|
-
font-size: $button-font-size * .4
|
80
73
|
border-radius: 5px
|
74
|
+
font-size: $button-font-size * .4
|
81
75
|
|
82
76
|
&.danger,
|
83
77
|
&.logout,
|
@@ -85,6 +79,7 @@ $button-alt-color: #333
|
|
85
79
|
&.deny,
|
86
80
|
&.delete
|
87
81
|
+button-style($red)
|
82
|
+
|
88
83
|
&.save,
|
89
84
|
&.submit,
|
90
85
|
&.create,
|
@@ -92,6 +87,7 @@ $button-alt-color: #333
|
|
92
87
|
&.success,
|
93
88
|
&.close
|
94
89
|
+button-style($green)
|
90
|
+
|
95
91
|
&.plain,
|
96
92
|
&.toggle-all,
|
97
93
|
&.download,
|
@@ -7,17 +7,17 @@ $disclosure-title-font-size: rem-calc(12)
|
|
7
7
|
cursor: pointer
|
8
8
|
font-size: $disclosure-title-font-size
|
9
9
|
|
10
|
-
|
11
|
-
content:
|
12
|
-
width: 12px
|
10
|
+
&::before
|
11
|
+
content: '\25b8'
|
13
12
|
display: inline-block
|
13
|
+
width: 12px
|
14
14
|
|
15
15
|
.disclosure-content
|
16
16
|
display: none
|
17
17
|
|
18
18
|
&.open
|
19
|
-
.disclosure-title
|
20
|
-
content:
|
19
|
+
.disclosure-title::before
|
20
|
+
content: '\25be'
|
21
21
|
|
22
22
|
.disclosure-content
|
23
23
|
display: inherit
|
@@ -1,31 +1,36 @@
|
|
1
|
+
$dropdown-color: #000 !default
|
2
|
+
$dropdown-bg-color: #fff !default
|
3
|
+
$dropdown-border-color: #ccc !default
|
4
|
+
$dropdown-hover-bg-color: #f4f4f4 !default
|
5
|
+
|
1
6
|
=fustrate-dropdowns
|
2
7
|
.has-dropdown
|
3
|
-
|
4
|
-
content:
|
8
|
+
&::after
|
9
|
+
content: '\25BE'
|
5
10
|
padding-left: .5em
|
6
11
|
|
7
|
-
& +
|
8
|
-
background:
|
9
|
-
border: 1px solid
|
10
|
-
width: auto
|
11
|
-
display: inline-block
|
12
|
+
& + .dropdown
|
13
|
+
background: $dropdown-bg-color
|
14
|
+
border: 1px solid $dropdown-border-color
|
12
15
|
border-radius: 4px
|
13
|
-
|
16
|
+
display: inline-block
|
14
17
|
left: -9999px
|
18
|
+
position: absolute
|
19
|
+
width: auto
|
15
20
|
z-index: 1
|
16
21
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
22
|
+
a,
|
23
|
+
span
|
24
|
+
color: $dropdown-color
|
25
|
+
cursor: pointer
|
26
|
+
display: block
|
27
|
+
font-size: .9rem
|
28
|
+
padding: 3px 10px
|
24
29
|
|
25
|
-
|
26
|
-
|
30
|
+
&:hover
|
31
|
+
background: scale-color($dropdown-bg-color, $lightness: -5%)
|
27
32
|
|
28
33
|
&.divider
|
29
|
-
border-top: 1px solid
|
30
|
-
padding: 0
|
34
|
+
border-top: 1px solid $dropdown-border-color
|
31
35
|
margin: 3px 0
|
36
|
+
padding: 0
|
@@ -1,33 +1,38 @@
|
|
1
|
+
$flash-color: #fff !default
|
2
|
+
$flash-shadow-color: rgba(255, 255, 255, .4) !default
|
3
|
+
$flash-bg-color: $primary-color !default
|
4
|
+
$flash-error-bg-color: $danger-color !default
|
5
|
+
$flash-success-bg-color: $success-color !default
|
6
|
+
|
1
7
|
=fustrate-flash
|
2
8
|
#flashes
|
3
9
|
bottom: 0
|
4
10
|
left: 0
|
11
|
+
padding: .15rem .15rem 0
|
5
12
|
position: fixed
|
6
13
|
width: 100%
|
7
14
|
z-index: 9900
|
8
|
-
padding: 0.15rem 0.15rem 0
|
9
15
|
|
10
16
|
.flash
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
box-shadow: 0 0 8px rgba(255, 255, 255, 0.4)
|
15
|
-
color: white
|
17
|
+
+flash-color($flash-bg-color)
|
18
|
+
box-shadow: 0 0 8px $flash-shadow-color
|
19
|
+
color: $flash-color
|
16
20
|
font-size: 1.25em
|
17
21
|
line-height: 40px
|
22
|
+
margin: 0 0 .15rem
|
18
23
|
min-height: 40px
|
19
|
-
|
24
|
+
opacity: .98
|
25
|
+
padding: .2em 0
|
26
|
+
position: relative
|
20
27
|
text-align: center
|
21
|
-
background: $primary-color
|
22
|
-
border: 1px solid scale_color($primary-color, $lightness: 20%)
|
23
|
-
text-shadow: 0 1px 3px scale_color($primary-color, $lightness: -50%)
|
24
28
|
|
25
29
|
&.error
|
26
|
-
|
27
|
-
border: 1px solid scale_color($danger-color, $lightness: 20%)
|
28
|
-
text-shadow: 0 1px 3px scale_color($danger-color, $lightness: -50%)
|
30
|
+
+flash-color($flash-error-bg-color)
|
29
31
|
|
30
32
|
&.success
|
31
|
-
|
32
|
-
|
33
|
-
|
33
|
+
+flash-color($flash-success-bg-color)
|
34
|
+
|
35
|
+
=flash-color($bg)
|
36
|
+
background: $bg
|
37
|
+
border: 1px solid scale-color($bg, $lightness: 20%)
|
38
|
+
text-shadow: 0 1px 3px scale-color($bg, $lightness: -50%)
|