picasso 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. data/.gitignore +1 -0
  2. data/docs/accordions.html +267 -0
  3. data/docs/all.html +934 -56
  4. data/docs/arrows.html +45 -8
  5. data/docs/bubbles.html +49 -10
  6. data/docs/build/manifest.json +19 -2
  7. data/docs/build/md/changelog.md +16 -0
  8. data/docs/build/md/components/accordions.md +97 -0
  9. data/docs/build/md/{arrows.md → components/arrows.md} +10 -2
  10. data/docs/build/md/{bubbles.md → components/bubbles.md} +16 -4
  11. data/docs/build/md/{buttons.md → components/buttons.md} +50 -5
  12. data/docs/build/md/components/components.md +37 -0
  13. data/docs/build/md/components/inputs.md +73 -0
  14. data/docs/build/md/components/list-grids.md +180 -0
  15. data/docs/build/md/components/navs.md +107 -0
  16. data/docs/build/md/components/pagination.md +112 -0
  17. data/docs/build/md/components/popups.md +162 -0
  18. data/docs/build/md/{despegar.md → despegar/despegar.md} +0 -0
  19. data/docs/build/md/intro.md +3 -2
  20. data/docs/build/md/mejoras.md +69 -0
  21. data/docs/build/md/todo.md +11 -1
  22. data/docs/build/md/utils/utils.md +62 -0
  23. data/docs/buttons.html +80 -14
  24. data/docs/changelog.html +74 -2
  25. data/docs/components.html +65 -2
  26. data/docs/config.rb +14 -6
  27. data/docs/css/markdown.css +8 -0
  28. data/docs/css/style.css +1508 -64
  29. data/docs/despegar.html +34 -2
  30. data/docs/ie.html +42 -11
  31. data/docs/img/picasso-buttons.png +0 -0
  32. data/docs/img/picasso-mini-buttons.png +0 -0
  33. data/docs/img/picasso-nav.png +0 -0
  34. data/docs/img/picasso-popup.png +0 -0
  35. data/docs/index.html +37 -4
  36. data/docs/{docs.html → inputs.html} +95 -21
  37. data/docs/intro.html +37 -4
  38. data/docs/js/docs.js +16 -0
  39. data/docs/js/viewer.js +12 -0
  40. data/docs/list-grids.html +341 -0
  41. data/docs/mejoras.html +241 -0
  42. data/docs/navs.html +272 -0
  43. data/docs/pagination.html +277 -0
  44. data/docs/popups.html +328 -0
  45. data/docs/sass/style.scss +113 -0
  46. data/docs/todo.html +49 -3
  47. data/docs/utils.html +68 -3
  48. data/lib/picasso/version.rb +1 -1
  49. data/picasso.gemspec +2 -0
  50. data/stylesheets/picasso/_components.scss +7 -1
  51. data/stylesheets/picasso/_utils.scss +3 -1
  52. data/stylesheets/picasso/components/_accordions.scss +96 -0
  53. data/stylesheets/picasso/components/_arrows.scss +9 -3
  54. data/stylesheets/picasso/components/_bubbles.scss +28 -17
  55. data/stylesheets/picasso/components/_inputs.scss +59 -0
  56. data/stylesheets/picasso/components/_list-grids.scss +118 -0
  57. data/stylesheets/picasso/components/_navs.scss +266 -0
  58. data/stylesheets/picasso/components/_pagination.scss +144 -0
  59. data/stylesheets/picasso/components/_popups.scss +257 -0
  60. data/stylesheets/picasso/components/buttons/_buttons.scss +124 -54
  61. data/stylesheets/picasso/components/buttons/_mini-buttons.scss +87 -19
  62. data/stylesheets/picasso/utils/_ie.scss +36 -0
  63. data/stylesheets/picasso/utils/_sprite.scss +32 -0
  64. metadata +65 -13
  65. data/docs/build/md/components.md +0 -3
  66. data/docs/build/md/docs.md +0 -21
  67. data/docs/build/md/ie.md +0 -32
  68. data/docs/build/md/utils.md +0 -19
@@ -2,6 +2,8 @@
2
2
  // Arrows
3
3
  //
4
4
 
5
+ @import "picasso/utils/ie";
6
+
5
7
  $arrow-default-background: #888;
6
8
  $arrow-default-color: white;
7
9
 
@@ -18,7 +20,7 @@ $arrow-default-color: white;
18
20
 
19
21
  }
20
22
 
21
- @mixin arrow-visual($background, $color) {
23
+ @mixin arrow-visual($background: $arrow-default-background, $color: $arrow-default-color) {
22
24
 
23
25
  background: $background;
24
26
  color: $color;
@@ -26,7 +28,7 @@ $arrow-default-color: white;
26
28
  font-style: normal;
27
29
  font-size: 9px;
28
30
 
29
- &:after{
31
+ &:after, .ie7 & .after{
30
32
  border-top: 7px solid transparent;
31
33
  border-bottom: 7px solid transparent;
32
34
  border-left: 7px solid $background;
@@ -42,7 +44,7 @@ $arrow-default-color: white;
42
44
  line-height: 16px;
43
45
  position: relative;
44
46
 
45
- &:after{
47
+ &:after, .ie7 & .after{
46
48
  content: "";
47
49
  position: absolute;
48
50
  top: 0;
@@ -50,5 +52,9 @@ $arrow-default-color: white;
50
52
  width: 0;
51
53
  height: 0;
52
54
  }
55
+
56
+ .ie7 &{
57
+ @include after;
58
+ }
53
59
 
54
60
  }
@@ -4,37 +4,42 @@
4
4
 
5
5
  @import "compass/css3/border-radius";
6
6
  @import "compass/typography/text/ellipsis";
7
- //@import "compass/css3/pie";
7
+ @import "picasso/utils/ie";
8
8
 
9
9
  $bubble-default-width : auto;
10
10
  $bubble-default-background : #EEE;
11
11
  $bubble-default-color : #999;
12
12
  $bubble-default-ellipsis : false;
13
+ $bubble-default-ellipsis-position : right;
13
14
 
14
15
  @mixin bubble(
15
16
 
16
- // Ancho del elemento
17
- $width: $bubble-default-width,
17
+ // Ancho del elemento
18
+ $width: $bubble-default-width,
18
19
 
19
- // Background del elemento
20
- $background: $bubble-default-background,
20
+ // Background del elemento
21
+ $background: $bubble-default-background,
21
22
 
22
- // Color del texto del elemento
23
- $color: $bubble-default-color,
23
+ // Color del texto del elemento
24
+ $color: $bubble-default-color,
24
25
 
25
26
  // Seteo de ellipsis
26
- $ellipsis: $bubble-default-ellipsis
27
+ $ellipsis: $bubble-default-ellipsis,
28
+
29
+ // Seteo de posición de ellipsis
30
+ $ellipsis-position: $bubble-default-ellipsis-position
31
+
27
32
  ){
28
33
 
29
- @include bubble-layout($width);
30
- @include bubble-visual($background, $color, $ellipsis);
34
+ @include bubble-layout($width, $ellipsis-position);
35
+ @include bubble-visual($background, $color, $ellipsis);
31
36
 
32
37
  }
33
38
 
34
- @mixin bubble-visual($background, $color, $ellipsis){
39
+ @mixin bubble-visual($background: $bubble-default-background, $color: $bubble-default-color, $ellipsis: $bubble-default-ellipsis){
35
40
 
36
- background: $background;
37
- @include border-radius(5px);
41
+ background: $background;
42
+ @include border-radius(5px);
38
43
 
39
44
  blockquote{
40
45
  color: $color;
@@ -49,7 +54,7 @@ $bubble-default-ellipsis : false;
49
54
  }
50
55
  }
51
56
 
52
- &:after{
57
+ &:after, .ie7 & .after{
53
58
  border-left: 10px solid transparent;
54
59
  border-right: 10px solid transparent;
55
60
  border-top: 15px solid $background;
@@ -57,20 +62,26 @@ $bubble-default-ellipsis : false;
57
62
 
58
63
  }
59
64
 
60
- @mixin bubble-layout($width){
65
+ @mixin bubble-layout($width: $bubble-default-width, $ellipsis-position: $bubble-default-ellipsis-position){
61
66
 
62
67
  padding: 10px;
63
68
  display: block;
64
69
  width: $width;
65
70
  position: relative;
66
71
 
67
- &:after{
72
+ &:after, .ie7 & .after{
68
73
  content: "";
69
74
  position: absolute;
70
75
  bottom: -15px;
71
- right: 20px;
76
+ @if $ellipsis-position {
77
+ #{$ellipsis-position}: 20px;
78
+ }
72
79
  width: 0;
73
80
  height: 0;
74
81
  }
75
82
 
83
+ .ie7 &{
84
+ @include after;
85
+ }
86
+
76
87
  }
@@ -0,0 +1,59 @@
1
+ //
2
+ // inputs
3
+ //
4
+
5
+ @import "compass/css3/border-radius";
6
+ @import "compass/css3/box-sizing";
7
+ @import "compass/css3/box-shadow";
8
+
9
+ $text-input-default-width: 200px;
10
+ $text-input-default-height: 20px;
11
+ $text-input-default-border-color: #DDD;
12
+ $text-input-default-border-focus-color: #319fda;
13
+ $text-input-default-border-radius: 3px 3px 3px 3px;
14
+ $text-input-default-text-color: #333333;
15
+ $text-input-default-font-size: 11px;
16
+
17
+ @mixin input(
18
+ $width: $text-input-default-width,
19
+ $height: $text-input-default-height,
20
+ $border-color: $text-input-default-border-color,
21
+ $border-focus-color: $text-input-default-border-focus-color,
22
+ $border-radius: $text-input-default-border-radius,
23
+ $text-color: $text-input-default-text-color,
24
+ $font-size: $text-input-default-font-size
25
+ ){
26
+
27
+ @include input-layout($width, $height);
28
+ @include input-visual($border-color, $border-focus-color, $border-radius, $text-color, $font-size);
29
+ }
30
+
31
+ @mixin input-layout($width: $text-input-default-width, $height: $text-input-default-height) {
32
+ width: $width;
33
+ height: $height;
34
+ line-height: $height;
35
+ padding: 1px;
36
+ }
37
+
38
+ @mixin input-visual(
39
+ $border-color: $text-input-default-border-color,
40
+ $border-focus-color: $text-input-default-border-focus-color,
41
+ $border-radius: $text-input-default-border-radius,
42
+ $text-color: $text-input-default-text-color,
43
+ $font-size: $text-input-default-font-size
44
+ ) {
45
+ border: 1px solid $border-color;
46
+ border-top: 1px solid darken($border-color, 30%);
47
+ color: $text-color;
48
+ font-size: $font-size;
49
+
50
+ @include box-sizing(border-box);
51
+ @include border-radius($border-radius);
52
+ @include box-shadow(0 1px 2px 0 rgba(0, 0, 0, 0.2) inset);
53
+
54
+ &:focus {
55
+ outline:0;
56
+ border:1px solid $border-focus-color;
57
+ @include box-shadow(rgba(0,0,0,0.2) 0 1px 2px 0 inset, #01a9db 0 0 2px 0);
58
+ }
59
+ }
@@ -0,0 +1,118 @@
1
+ //
2
+ // list-grids
3
+ //
4
+
5
+ @import "picasso/utils/clearfix";
6
+
7
+ $list-grid-default-cell-width: 130px;
8
+ $list-grid-default-cell-height: 30px;
9
+ $list-grid-default-border-color: #CCCCCC;
10
+ $list-grid-default-odd-color: #EEEEEE;
11
+ $list-grid-default-even-color: #FFFFFF;
12
+ $list-grid-default-hover-color: #319fda;
13
+
14
+ @mixin list-grid(
15
+ $cell-width: $list-grid-default-cell-width,
16
+ $cell-height: $list-grid-default-cell-height,
17
+ $border-color: $list-grid-default-border-color,
18
+ $odd-color: $list-grid-default-odd-color,
19
+ $even-color: $list-grid-default-even-color,
20
+ $hover-color: $list-grid-default-hover-color
21
+ ){
22
+
23
+ @include list-grid-layout($cell-width, $cell-height);
24
+ @include list-grid-visual($border-color, $odd-color, $even-color, $hover-color);
25
+ }
26
+
27
+ @mixin list-grid-layout(
28
+ $cell-width: $list-grid-default-cell-width,
29
+ $cell-height: $list-grid-default-cell-height
30
+ ) {
31
+
32
+ @include clearfix;
33
+
34
+ ul {
35
+ float: left;
36
+ padding: 0px;
37
+ margin: 0px;
38
+ width: $cell-width;
39
+
40
+ li {
41
+ height: $cell-height;
42
+ line-height: $cell-height;
43
+ padding-left: 10px;
44
+ padding-right: 10px;
45
+ }
46
+ }
47
+ }
48
+
49
+ @mixin list-grid-visual(
50
+ $border-color: $list-grid-default-border-color,
51
+ $odd-color: $list-grid-default-odd-color,
52
+ $even-color: $list-grid-default-even-color,
53
+ $hover-color: $list-grid-default-hover-color
54
+ ) {
55
+ $cell-border: 1px;
56
+
57
+ ul {
58
+ list-style: none outside none;
59
+ border-top: 1px solid $border-color;
60
+ border-bottom: 1px solid $border-color;
61
+ border-right: 1px solid $border-color;
62
+
63
+ // first
64
+ &:first-child{
65
+ border-left: 1px solid $border-color;
66
+ }
67
+
68
+ li {
69
+ text-align: center;
70
+ border: $cell-border solid transparent;
71
+
72
+ // first
73
+ &:first-child{
74
+ border-bottom: 1px solid $border-color;
75
+ }
76
+
77
+ // odd
78
+ &:nth-child(odd) {
79
+ background: none repeat scroll 0 0 $odd-color;
80
+ }
81
+
82
+ // even
83
+ &:nth-child(even) {
84
+ background: none repeat scroll 0 0 $even-color;
85
+ }
86
+
87
+ }
88
+
89
+ & li.hover-cell:hover {
90
+ border: $cell-border solid $hover-color;
91
+ background: lighten($hover-color, 45%);
92
+ cursor: pointer;
93
+ }
94
+
95
+ //IE
96
+ .ie7 &, .ie8 &{
97
+
98
+ li{
99
+
100
+ &:first-child{
101
+ background: none repeat scroll 0 0 $odd-color;
102
+ }
103
+
104
+ &.even {
105
+ background: none repeat scroll 0 0 $even-color;
106
+ }
107
+
108
+ &.odd {
109
+ background: none repeat scroll 0 0 $odd-color;
110
+ }
111
+
112
+ }
113
+
114
+ }
115
+
116
+ }
117
+
118
+ }
@@ -0,0 +1,266 @@
1
+ //
2
+ // Navs
3
+ //
4
+
5
+ @import "compass/css3/images";
6
+ @import "compass/css3/box-shadow";
7
+ @import "compass/css3/border-radius";
8
+ @import "picasso/utils/sprite";
9
+
10
+ $nav-default-font-size: 16px;
11
+ $nav-default-font-family: sans-serif;
12
+ $nav-default-image-dir: '';
13
+ $nav-sprite-created: false !default;
14
+ $nav-sprite-name: "picasso-nav";
15
+ $nav-ie-fallback: "sprites" !default;
16
+ $nav-active-item-class: "active" !default;
17
+ $nav-last-item-class: "last" !default;
18
+
19
+ $nav-default-height : 40px;
20
+ $nav-default-width : 435px;
21
+ $nav-default-background: white;
22
+ $nav-default-border-color: #ACACAC;
23
+ $nav-default-shadow-color: black;
24
+ $nav-default-float: left;
25
+
26
+ @mixin nav(
27
+
28
+ // Ancho del componente
29
+ $width: $nav-default-width,
30
+
31
+ // Alto del componente
32
+ $height: $nav-default-height,
33
+
34
+ // Background del componente
35
+ $background: $nav-default-background,
36
+
37
+ // Borde
38
+ $border: $nav-default-border-color,
39
+
40
+ // Sombra
41
+ $shadow: $nav-default-shadow-color,
42
+
43
+ // Float
44
+ $float: $nav-default-float
45
+
46
+ ){
47
+
48
+ @include nav-layout($width, $height, $float);
49
+ @include nav-visual($background, $border, $shadow, $width, $height);
50
+
51
+ }
52
+
53
+ @mixin nav-layout($width: $nav-default-width, $height: $nav-default-height, $float: $nav-default-float){
54
+
55
+ @include clearfix;
56
+
57
+ ul{
58
+ margin: 0;
59
+ padding: 0;
60
+ text-align: center;
61
+ float: $float;
62
+ @include clearfix;
63
+
64
+ li{
65
+ display: inline-block;
66
+ height: $height;
67
+ line-height: $height;
68
+ float: left;
69
+
70
+ a{
71
+ display: block;
72
+ padding: 0 15px;
73
+ }
74
+
75
+ }
76
+
77
+ .ie7 &, .ie8 &, .ie9 &{
78
+
79
+ @if $nav-ie-fallback == "sprites" {
80
+
81
+ li{
82
+ height: $height + 6;
83
+ }
84
+
85
+ } @else {
86
+
87
+ li{
88
+ height: $height;
89
+ }
90
+
91
+ }
92
+
93
+ }
94
+
95
+ }
96
+
97
+ }
98
+
99
+ @mixin nav-visual($background: $nav-default-background, $border: $nav-default-border-color, $shadow: $nav-default-shadow-color, $width: $nav-default-width, $height: $nav-default-height){
100
+
101
+ ul{
102
+ list-style: none;
103
+ @include box-shadow(0 6px 6px -6px $shadow);
104
+
105
+ li{
106
+ @include background-image(linear-gradient($background, darken($background, 10%)));
107
+ border-left: 1px solid $border;
108
+ border-top: 1px solid $border;
109
+ border-bottom: 1px solid $border;
110
+
111
+ &:hover{
112
+ @include background-image(linear-gradient($background, darken($background, 5%)));
113
+ }
114
+
115
+ &:first-child{
116
+ @include border-left-radius(5px);
117
+ }
118
+
119
+ &:last-child{
120
+ @include border-right-radius(5px);
121
+ border-right: 1px solid $border;
122
+ }
123
+
124
+ a{
125
+ font-size: $nav-default-font-size;
126
+ font-family: $nav-default-font-family;
127
+ }
128
+
129
+ }
130
+
131
+ .#{$nav-active-item-class}{
132
+ @include background-image(linear-gradient(darken($background, 10%), $background));
133
+ }
134
+
135
+ .ie7 &, .ie8 &, .ie9 &{
136
+
137
+ @if $nav-ie-fallback == "sprites" {
138
+
139
+ $nav-image: magick-canvas($width, $height * 3 + (6 * 3),
140
+
141
+ //Normal
142
+ magick-compose(
143
+ magick-canvas($width, $height + 6,
144
+ magick-compose(magick-canvas($width, $height,
145
+ magick-fill(magick-linear-gradient($background, darken($background, 10%)))
146
+ magick-corners(5px)
147
+ magick-border($border, 5px, 1px)
148
+ ))
149
+ magick-drop-shadow(270deg, 2px, 6px, $shadow)
150
+ ),
151
+ 0, 0
152
+ ),
153
+
154
+ //Hover
155
+ magick-compose(
156
+ magick-canvas($width, $height + 6,
157
+ magick-compose(magick-canvas($width, $height,
158
+ magick-fill(magick-linear-gradient($background, darken($background, 5%)))
159
+ magick-corners(5px)
160
+ magick-border($border, 5px, 1px)
161
+ ))
162
+ magick-drop-shadow(270deg, 2px, 6px, $shadow)
163
+ ),
164
+ 0, $height + 6
165
+ ),
166
+
167
+ //Active
168
+ magick-compose(
169
+ magick-canvas($width, $height + 6,
170
+ magick-compose(magick-canvas($width, $height,
171
+ magick-fill(magick-linear-gradient(darken($background, 10%), $background))
172
+ magick-corners(5px)
173
+ magick-border($border, 5px, 1px)
174
+ ))
175
+ magick-drop-shadow(270deg, 2px, 6px, $shadow)
176
+ ),
177
+ 0, ($height * 2) + (6 * 2)
178
+ )
179
+
180
+ );
181
+
182
+ $initial-position: insert-in-sprite($nav-sprite-created, $nav-sprite-name, $nav-image, $width, (($height * 3) + (6 * 3)));
183
+ $nav-sprite-created: true;
184
+
185
+ li{
186
+ border-left: none;
187
+ border-top: none;
188
+ border-bottom: none;
189
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat center ((-1) * $initial-position);
190
+
191
+ a{
192
+ border-left: 1px solid $border;
193
+ }
194
+
195
+ &:hover{
196
+ background: transparent generated-image-url($nav-sprite-name + ".png") center ((-1) * ($initial-position + $height + 6)) no-repeat;
197
+ }
198
+
199
+ &:first-child {
200
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat left ((-1) * $initial-position);
201
+
202
+ a{
203
+ border-left: none;
204
+ }
205
+
206
+ &:hover{
207
+ background: transparent generated-image-url($nav-sprite-name + ".png") left ((-1) * ($initial-position + $height + 6)) no-repeat;
208
+ }
209
+
210
+ }
211
+
212
+ &:first-child.#{$nav-active-item-class}{
213
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat left ((-1) * ($initial-position + $height + 6));
214
+ }
215
+
216
+ }
217
+
218
+ .#{$nav-last-item-class}{
219
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat right ((-1) * ($initial-position + $height + 6));
220
+
221
+ &:hover{
222
+ background: transparent generated-image-url($nav-sprite-name + ".png") right ((-1) * ($initial-position + $height + 6)) no-repeat;
223
+ }
224
+
225
+ }
226
+
227
+ .#{$nav-active-item-class}{
228
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat center ((-1) * ($initial-position + $height + 6));
229
+ }
230
+
231
+ .#{$nav-last-item-class}.#{$nav-active-item-class}{
232
+ background: transparent generated-image-url($nav-sprite-name + ".png") no-repeat right ((-1) * ($initial-position + $height + 6));
233
+ }
234
+
235
+ } @else {
236
+
237
+ li{
238
+ border-top: 1px solid $border;
239
+ border-bottom: 1px solid $border;
240
+ background-color: $background;
241
+
242
+ &:hover{
243
+ background: darken($background, 5%);
244
+ }
245
+
246
+ &:first-child {
247
+ border-left: 1px solid $border;
248
+ }
249
+
250
+ }
251
+
252
+ .#{$nav-last-item-class} {
253
+ border-right: 1px solid $border;
254
+ }
255
+
256
+ .#{$nav-active-item-class}{
257
+ background: darken($background, 10%);
258
+ }
259
+
260
+ }
261
+
262
+ }
263
+
264
+ }
265
+
266
+ }