mumuki-styles 1.16.2 → 1.17.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +16 -262
  3. data/Rakefile +22 -0
  4. data/app/assets/javascripts/mumuki-styles.js +103 -0
  5. data/app/assets/stylesheets/{mumuki-styles.css → css/mumuki-styles.css} +75 -46
  6. data/app/assets/stylesheets/{_broken.scss → scss/_broken.scss} +0 -0
  7. data/app/assets/stylesheets/{_colors.scss → scss/_colors.scss} +0 -0
  8. data/app/assets/stylesheets/{_fonts.scss → scss/_fonts.scss} +2 -1
  9. data/app/assets/stylesheets/{_footer.scss → scss/_footer.scss} +0 -0
  10. data/app/assets/stylesheets/{_hovers.scss → scss/_hovers.scss} +0 -0
  11. data/app/assets/stylesheets/{_mixines.scss → scss/_mixines.scss} +0 -0
  12. data/app/assets/stylesheets/{_modules.scss → scss/_modules.scss} +0 -0
  13. data/app/assets/stylesheets/{_navbar.scss → scss/_navbar.scss} +0 -0
  14. data/app/assets/stylesheets/{_styles.scss → scss/_styles.scss} +0 -0
  15. data/app/assets/stylesheets/{_vendor.scss → scss/_vendor.scss} +0 -0
  16. data/app/assets/stylesheets/{bootswatch → scss/bootswatch}/_bootswatch.scss +0 -0
  17. data/app/assets/stylesheets/{bootswatch → scss/bootswatch}/_variables.scss +0 -0
  18. data/app/assets/stylesheets/{components → scss/components}/_browser.scss +0 -0
  19. data/app/assets/stylesheets/{components → scss/components}/_mu-erd.scss +0 -0
  20. data/app/assets/stylesheets/{components → scss/components}/_mu-file-browser.scss +0 -0
  21. data/app/assets/stylesheets/scss/components/_mu-pre-copy-paste.scss +39 -0
  22. data/app/assets/stylesheets/{components → scss/components}/_mu-sql-table.scss +0 -0
  23. data/app/assets/stylesheets/{components → scss/components}/components.scss +1 -0
  24. data/app/assets/stylesheets/{modules → scss/modules}/_breadcrumb.scss +0 -0
  25. data/app/assets/stylesheets/{modules → scss/modules}/_callout.scss +0 -0
  26. data/app/assets/stylesheets/{modules → scss/modules}/_checkbox.scss +0 -0
  27. data/app/assets/stylesheets/{modules → scss/modules}/_conversation.scss +0 -0
  28. data/app/assets/stylesheets/{modules → scss/modules}/_follow_us.scss +0 -0
  29. data/app/assets/stylesheets/{modules → scss/modules}/_highlight.scss +0 -0
  30. data/app/assets/stylesheets/{modules → scss/modules}/_new_message.scss +0 -0
  31. data/app/assets/stylesheets/{modules → scss/modules}/_notification.scss +0 -0
  32. data/app/assets/stylesheets/{mumuki-styles.scss → scss/mumuki-styles.scss} +0 -0
  33. data/lib/mumuki/styles.rb +6 -1
  34. data/lib/mumuki/styles/version.rb +1 -1
  35. metadata +45 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8895fba6fca0267ef8101b5a35e77f3fef2e49a9
4
- data.tar.gz: 8153cb208d85ab08d34d1c02a7114e800b95aa9e
2
+ SHA256:
3
+ metadata.gz: bf4d40df028bbd2a6f34627fd471b812c57b3cc5fee1c4610254dc4e04dcbaec
4
+ data.tar.gz: 23346ebf50b6e05b9397f48e3b1c346c9d72af269b770227bc071cc5dcbb3bd4
5
5
  SHA512:
6
- metadata.gz: 3e93d28bc6ff9515ef458ea3af2515241c6421c704ce5f3f9e2d89850ac42f29a481897c6d2dda458f573f8cb15f7f4061bd56ce3a1f5824a0dfd865309a9e40
7
- data.tar.gz: 0ed4e0fc1d7006f7faa6ab2892b242439c11d299456cce92aec557a6de2e5b94ffa5bd3136bc235363ff8ee4ff2a8ce3b3c6a8dd914023982300799e7d24de24
6
+ metadata.gz: 5a96af0aaf151e25f16b9f9d2b208a05d976e086e002b956ab72cde19f3ed866882e06aa26aa67ed895b349df6e5c5183bdcf544b4de6d49e2dd59d59ebc9962
7
+ data.tar.gz: 147f90bab71a53497046ba6f623538ee9ec998d4640eba466f898d73728d88db55a3d8dee78d7dea3fe42d1655b234eba5a4c80adb524aad5b6b02d5ee7c8531
data/README.md CHANGED
@@ -1,284 +1,38 @@
1
- # mumuki-styles
1
+ # Mumuki Styles
2
2
 
3
- ## Components
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/mumuki/styles`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
5
- ### mu-file-browser
5
+ ## Installation
6
6
 
7
- ![image](https://user-images.githubusercontent.com/1039278/34626522-c15fc584-f23b-11e7-81a4-dd5403a2e6f0.png)
8
-
9
- ```html
10
- <div class="mu-file-browser"
11
- data-can-browse="true"
12
- data-on-file-open="console.log"
13
- data-file='{
14
- "foo": {
15
- "saraza": {
16
- "sultano.rb": "sultano"
17
- },
18
- "sultano.rb": "sultano",
19
- "mengano.js": "mengano"
20
- },
21
- "bar": {
22
- "archivo con un nombre largo.doc": "un doc"
23
- },
24
- "baz": {
25
- "mengano.js": "mengano"
26
- },
27
- "saraza.txt": "saraza",
28
- "sultano.rb": "sultano",
29
- "mengano.js": "mengano",
30
- "archivo con un nombre largo.doc": "un doc"
31
- }'>
32
- </div>
33
- ```
34
-
35
- #### mu-file-browser attributes
36
-
37
- * `data-can-browse`: (Boolean) user can enter into a folder (default `false`).
38
- * `data-on-file-open`: (Function) receives 2 params, file name and file content. If no function given user can't open files.
39
- * `data-file`: (Hash) hash `keys` are the names of the resources and hash `values` are theirs contents (sub-hash for a folder and a string for a file).
40
-
41
- With jQuery you can manually render this component using `$('.mu-file-browser').renderFileBrowser()`;
42
-
43
-
44
- ### mu-erd
45
-
46
- ![image](https://user-images.githubusercontent.com/1039278/34626539-df245f30-f23b-11e7-9b21-1456c63105c9.png)
47
-
48
- ```html
49
- <div class='mu-erd'
50
- data-entities='{
51
- "Entity_1": {
52
- "ent1_id": {
53
- "type": "Integer",
54
- "pk": true
55
- },
56
- "ent2_id": {
57
- "type": "Integer",
58
- "pk": true,
59
- "fk": {
60
- "to": { "entity": "Entity_2", "column": "ent2_id" },
61
- "type": "one_to_one"
62
- }
63
- },
64
- "ent1_description": {
65
- "type": "Varchar"
66
- }
67
- },
68
- "Entity_2": {
69
- "ent2_id": {
70
- "type": "Integer",
71
- "pk": true
72
- }
73
- },
74
- "Entity_3": {
75
- "ent3_id": {
76
- "type": "Integer",
77
- "pk": true
78
- },
79
- "ent2_id": {
80
- "type": "Integer",
81
- "pk": true,
82
- "fk": {
83
- "to": { "entity": "Entity_2", "column": "ent2_id" },
84
- "type": "many_to_one"
85
- }
86
- },
87
- "ent1_description": {
88
- "type": "Varchar"
89
- }
90
- }
91
- }'>
92
- </div>
93
- ```
94
-
95
- #### mu-erd attributes
96
-
97
- * `data-entities`: (`Hash<EntityName, EntityColumns>`)
98
- * `EntityName`: (`String`).
99
- * `EntityColumns`: (`Hash<ColumnName, ColumnMetadata>`)
100
- * `ColumnName`: (`String`)
101
- * `ColumnMetadata`: (`Hash`)
102
- * `type`: (`String`) Column type (Char, Number, Integer, Varchar, etc),
103
- * `pk`: (`Boolean` - Optional) True if column es PK or part of one,
104
- * `fk`: (`Hash` - Optional) with properties:
105
- * `to`: (`Object`) { entity: (Foreign entity), column: (Foreign column name) }
106
- * `type`: (`String`) one\_to\_one | one\_to\_many | many\_to\_one | many\_to\_many
107
-
108
- With jQuery you can manually render this component using `$('.mu-erd').renderERD()`;
109
-
110
- ### mu-browser
111
-
112
- ![image](https://user-images.githubusercontent.com/1039278/34626588-1829fbb4-f23c-11e7-89ec-540a23a41240.png)
113
-
114
- ```html
115
- <div class='mu-browser'
116
- data-url='https://mi-sitio.mumuki.io'
117
- data-title='Mumuki - Aprender a programar'
118
- data-favicon='https://mumuki.io/logo-alt.png'
119
- data-srcdoc='<p>Hello Mumuki Browser</p>'>
120
- </div>
121
- ```
122
-
123
- #### mu-browser attributes
124
-
125
- * `data-srcdoc`: HTML of the page to show
126
- * `data-url`: (Optional) URL of the page (default: `https://mumuki.io`)
127
- * `data-title`: (Optional) Title of the browser's tab (default: `Mumuki`)
128
- * `data-favicon`: (Optional) Favicon of the brower's tab (default: `https://mumuki.io/logo-alt.png`)
129
-
130
- With jQuery you can manually render this component using `$('.mu-browser').renderWebBrowser()`;
131
-
132
-
133
- ### mu-sql-table
134
-
135
- ![image](https://user-images.githubusercontent.com/1039278/34626563-f531ec3e-f23b-11e7-8534-fd6855fea0b1.png)
136
-
137
- ```html
138
- <div class='mu-sql-table'
139
- data-name='Personas'
140
- data-columns='[{"name": "id_persona", "pk": true}, "Nombre", "Apellido", {"name": "Pareja", "fk": true}]'
141
- data-rows='[
142
- [1, "Homero", "Simpson", 2],
143
- [2, "Marge", "Bouvier", 1],
144
- [3, "Moe", "Szyslak", null]
145
- ]'>
146
- </div>
147
- ```
148
-
149
- #### mu-sql-table attributes
150
-
151
- * `data-name`: (String) Entity name
152
- * `data-columns`: (String|Hash):
153
- * if `String`: Column name
154
- * if `Hash`: you need the next keys
155
- * `name`: (String) Column name
156
- * `pk`: (Bool) if column is PK or part of one
157
- * `fk`: (Bool) if column is FK or part of one
158
- * `data-rows`: (Array<Array<Value>>)
159
-
160
- With jQuery you can manually render this component using `$('.mu-sql-table').renderSqlTable()`;
161
-
162
- ### mu-sql-table-rendered
163
-
164
- ![image](https://user-images.githubusercontent.com/1039278/34626563-f531ec3e-f23b-11e7-8534-fd6855fea0b1.png)
165
-
166
- ```html
167
- <div class="mu-sql-table-rendered">
168
- <header>Personas</header>
169
- <table>
170
- <thead>
171
- <tr>
172
- <th class="mu-sql-table-pk">id_persona</th>
173
- <th>Nombre</th>
174
- <th>Apellido</th>
175
- <th class="mu-sql-table-fk">Pareja</th>
176
- </tr>
177
- </thead>
178
- <tbody>
179
- <tr>
180
- <td>1</td>
181
- <td>Homero</td>
182
- <td>Simpson</td>
183
- <td>2</td>
184
- </tr>
185
- <tr>
186
- <td>2</td>
187
- <td>Marge</td>
188
- <td>Bouvier</td>
189
- <td>1</td>
190
- </tr>
191
- <tr>
192
- <td>3</td>
193
- <td>Moe</td>
194
- <td>Szyslak</td>
195
- <td>NULL</td>
196
- </tr>
197
- </tbody>
198
- </table>
199
- </div>
200
- ```
201
-
202
- #### mu-sql-table-rendered attributes
203
-
204
- You don't need any data attribute - just follow this convention:
205
-
206
- * `div` (with `mu-sql-table-rendered` class)
207
- * `div > header`
208
- * `div > table`
209
- * `div > table > thead`
210
- * `div > table > thead > tr > th` (th tag can have `mu-sql-table-pk` and/or `mu-sql-table-fk`)
211
- * `div > table > tbody`
212
- * `div > table > tbody > tr > td`
213
-
214
- With jQuery you can manually render this component using `$('.mu-sql-table-rendered').renderPrerenderedSqlTable()`;
215
-
216
-
217
- ## Installing
218
-
219
- You usually add `mumuki-styles` to an empty project. First you need to add it to your Gemfile:
7
+ Add this line to your application's Gemfile:
220
8
 
221
9
  ```ruby
222
10
  gem 'mumuki-styles'
223
11
  ```
224
12
 
225
- or, if you want latest version:
226
-
227
- ```ruby
228
- gem 'mumuki-styles', github: 'mumuki/mumuki-styles', branch: 'master'
229
- ```
230
-
231
- And then bundle install
232
-
233
- ### How to use it in with rails-assets?
234
-
235
- 1. Add the following code into `Gemfile`
236
-
237
- ```ruby
238
- gem 'mumuki-styles'
239
- ```
240
-
241
- 1. Install it running
242
-
243
- ```bash
244
- bundle install
245
- ```
246
-
247
- 1. Add the following code into `app/assets/javascripts/application.js`
248
-
249
- ```js
250
- //= require mumuki-styles
251
- ```
13
+ And then execute:
252
14
 
253
- 1. Add the following code into `app/assets/stylesheets/application.scss`
15
+ $ bundle
254
16
 
255
- ```scss
256
- @import "mumuki-styles";
257
- ```
258
- **Note**: If you do not use SCSS, add `*= require mumuki-styles` to `app/assets/stylesheets/application.css` file
17
+ Or install it yourself as:
259
18
 
19
+ $ gem install mumuki-styles
260
20
 
261
- ### How to use it with bower?
21
+ ## Usage
262
22
 
263
- 1. Run `bower install --save mumuki-styles`
264
- 1. Add the css and js files to `index.html`
23
+ TODO: Write usage instructions here
265
24
 
266
- ```html
267
- <link rel="stylesheet" href="bower_compoments/mumuki-styles/dist/css/mumuki-styles.css">
268
- <script src="bower_compoments/mumuki-styles/dist/javascript/mumuki-styles.js"></script>
269
- ```
270
- 1. if you are using SCSS, simply import the scss file
25
+ ## Development
271
26
 
272
- ```scss
273
- @import "bower_compoments/mumuki-styles/dist/scss/mumuki-styles.scss"
274
- ```
27
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
275
28
 
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
276
30
 
277
- ## Ruby Version
31
+ ## Contributing
278
32
 
279
- `mumuki-styles` works with Ruby 2.3.1
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mumuki/mumuki-styles.
280
34
 
281
35
 
282
36
  ## License
283
37
 
284
- This project is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
38
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,2 +1,24 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
2
6
  task :default => :spec
7
+
8
+ namespace :wrapper do
9
+ desc 'Wrap styles assets into this gem'
10
+ task wrap: :clean do
11
+ cp_r '../dist/css', 'app/assets/stylesheets'
12
+ cp_r '../dist/scss', 'app/assets/stylesheets'
13
+ mv 'app/assets/stylesheets/scss/vendor', 'app/assets/stylesheets'
14
+ cp_r '../dist/javascripts', 'app/assets'
15
+ cp_r '../dist/fonts', 'app/assets'
16
+ end
17
+
18
+ task :clean do
19
+ rm_rf 'app'
20
+ mkdir_p 'app/assets/stylesheets'
21
+ mkdir_p 'app/assets/javascripts'
22
+ mkdir_p 'app/assets/fonts'
23
+ end
24
+ end
@@ -13195,10 +13195,113 @@ mumuki.load(function () {
13195
13195
 
13196
13196
  });
13197
13197
 
13198
+ mumuki.load(function () {
13199
+
13200
+ var language = {
13201
+ es: {
13202
+ copy: 'Copiar',
13203
+ copied: 'Copiado'
13204
+ },
13205
+ en: {
13206
+ copy: 'Copy',
13207
+ copied: 'Copied'
13208
+ },
13209
+ pt: {
13210
+ copy: 'Copiar',
13211
+ copied: 'Copiado'
13212
+ },
13213
+ }
13214
+
13215
+ function getCopiedText() {
13216
+ var lang = (mumuki.locale || navigator.language || navigator.userLanguage || 'en').split('-')[0];
13217
+ return language[lang];
13218
+ }
13219
+
13220
+ function copyToClipboard(text) {
13221
+ var $temp = $("<textarea>");
13222
+ $("body").append($temp);
13223
+ $temp.val(text).select();
13224
+ document.execCommand("copy");
13225
+ $temp.remove();
13226
+ }
13227
+
13228
+ function getEditor() {
13229
+ return mumuki.page && mumuki.page.editors && mumuki.page.editors[0];
13230
+ }
13231
+
13232
+ function hasCodeMirrorEditor() {
13233
+ let editor = getEditor();
13234
+ return editor && editor instanceof window.CodeMirror;
13235
+ }
13236
+
13237
+ function pasteInCodeMirror(text) {
13238
+ var doc = getEditor().getDoc();
13239
+ var cursor = doc.getCursor();
13240
+ doc.replaceRange(text, cursor);
13241
+ }
13242
+
13243
+ function pasteInTextArea(text) {
13244
+ var $editor = $('.mu-paste-target');
13245
+ var cursorPosStart = $editor.prop('selectionStart');
13246
+ var cursorPosEnd = $editor.prop('selectionEnd');
13247
+ var v = $editor.val() || '';
13248
+ var textBefore = v.substring(0, cursorPosStart);
13249
+ var textAfter = v.substring(cursorPosEnd, v.length);
13250
+ $editor.val(textBefore + text + textAfter);
13251
+ }
13252
+
13253
+ function pasteInEditor(text) {
13254
+ if (hasCodeMirrorEditor()) {
13255
+ pasteInCodeMirror(text);
13256
+ } else {
13257
+ pasteInTextArea(text);
13258
+ }
13259
+ }
13260
+
13261
+ function changeTextAndColor($clipboard) {
13262
+ var $span = $clipboard.find('span');
13263
+ $clipboard.addClass('clicked');
13264
+ $span.text(getCopiedText().copied);
13265
+ setTimeout(function () {
13266
+ $span.text(getCopiedText().copy);
13267
+ $clipboard.removeClass('clicked')
13268
+ }, 2.5 * 1000);
13269
+ }
13270
+
13271
+ $.fn.renderCopyPaste = function () {
13272
+ var self = this;
13273
+ self.each(function (i) {
13274
+ var $pre = $(self[i]);
13275
+ var $code = $pre.children('code');
13276
+ if ($code.length > 0) {
13277
+ $pre.children('span').remove();
13278
+ var $clipboard = $('<span>', {
13279
+ class: 'mu-clipboard',
13280
+ html: '<i class="fa fa-fw fa-clipboard"></i> <span>' + getCopiedText().copy + '</span>',
13281
+ click: function () {
13282
+ copyToClipboard($code.text());
13283
+ pasteInEditor($code.text());
13284
+ changeTextAndColor($clipboard);
13285
+ }
13286
+ });
13287
+ $pre.append($clipboard);
13288
+ }
13289
+ });
13290
+
13291
+ return self;
13292
+ }
13293
+
13294
+ mumuki.resize(function () {
13295
+ $('pre').renderCopyPaste();
13296
+ });
13297
+
13298
+ });
13299
+
13198
13300
  mumuki.load(function () {
13199
13301
 
13200
13302
  $.fn.renderMuComponents = function () {
13201
13303
  this.find('.mu-erd').renderERD();
13304
+ this.find('pre').renderCopyPaste();
13202
13305
  this.find('.mu-browser').renderWebBrowser();
13203
13306
  this.find('.mu-sql-table').renderSqlTable();
13204
13307
  this.find('.mu-file-browser').renderFileBrowser();
@@ -1058,7 +1058,7 @@ th {
1058
1058
 
1059
1059
  html {
1060
1060
  font-size: 10px;
1061
- -webkit-tap-highlight-color: transparent; }
1061
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
1062
1062
 
1063
1063
  body {
1064
1064
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -2359,49 +2359,49 @@ input[type="search"] {
2359
2359
  input[type="datetime-local"].form-control,
2360
2360
  input[type="month"].form-control {
2361
2361
  line-height: 54px; }
2362
- input[type="date"].input-sm, .input-group-sm > input[type="date"].form-control,
2363
- .input-group-sm > input[type="date"].input-group-addon,
2364
- .input-group-sm > .input-group-btn > input[type="date"].btn,
2362
+ input[type="date"].input-sm, .input-group-sm > input.form-control[type="date"],
2363
+ .input-group-sm > input.input-group-addon[type="date"],
2364
+ .input-group-sm > .input-group-btn > input.btn[type="date"],
2365
2365
  .input-group-sm input[type="date"],
2366
2366
  input[type="time"].input-sm,
2367
- .input-group-sm > input[type="time"].form-control,
2368
- .input-group-sm > input[type="time"].input-group-addon,
2369
- .input-group-sm > .input-group-btn > input[type="time"].btn,
2367
+ .input-group-sm > input.form-control[type="time"],
2368
+ .input-group-sm > input.input-group-addon[type="time"],
2369
+ .input-group-sm > .input-group-btn > input.btn[type="time"],
2370
2370
  .input-group-sm
2371
2371
  input[type="time"],
2372
2372
  input[type="datetime-local"].input-sm,
2373
- .input-group-sm > input[type="datetime-local"].form-control,
2374
- .input-group-sm > input[type="datetime-local"].input-group-addon,
2375
- .input-group-sm > .input-group-btn > input[type="datetime-local"].btn,
2373
+ .input-group-sm > input.form-control[type="datetime-local"],
2374
+ .input-group-sm > input.input-group-addon[type="datetime-local"],
2375
+ .input-group-sm > .input-group-btn > input.btn[type="datetime-local"],
2376
2376
  .input-group-sm
2377
2377
  input[type="datetime-local"],
2378
2378
  input[type="month"].input-sm,
2379
- .input-group-sm > input[type="month"].form-control,
2380
- .input-group-sm > input[type="month"].input-group-addon,
2381
- .input-group-sm > .input-group-btn > input[type="month"].btn,
2379
+ .input-group-sm > input.form-control[type="month"],
2380
+ .input-group-sm > input.input-group-addon[type="month"],
2381
+ .input-group-sm > .input-group-btn > input.btn[type="month"],
2382
2382
  .input-group-sm
2383
2383
  input[type="month"] {
2384
2384
  line-height: 38px; }
2385
- input[type="date"].input-lg, .input-group-lg > input[type="date"].form-control,
2386
- .input-group-lg > input[type="date"].input-group-addon,
2387
- .input-group-lg > .input-group-btn > input[type="date"].btn,
2385
+ input[type="date"].input-lg, .input-group-lg > input.form-control[type="date"],
2386
+ .input-group-lg > input.input-group-addon[type="date"],
2387
+ .input-group-lg > .input-group-btn > input.btn[type="date"],
2388
2388
  .input-group-lg input[type="date"],
2389
2389
  input[type="time"].input-lg,
2390
- .input-group-lg > input[type="time"].form-control,
2391
- .input-group-lg > input[type="time"].input-group-addon,
2392
- .input-group-lg > .input-group-btn > input[type="time"].btn,
2390
+ .input-group-lg > input.form-control[type="time"],
2391
+ .input-group-lg > input.input-group-addon[type="time"],
2392
+ .input-group-lg > .input-group-btn > input.btn[type="time"],
2393
2393
  .input-group-lg
2394
2394
  input[type="time"],
2395
2395
  input[type="datetime-local"].input-lg,
2396
- .input-group-lg > input[type="datetime-local"].form-control,
2397
- .input-group-lg > input[type="datetime-local"].input-group-addon,
2398
- .input-group-lg > .input-group-btn > input[type="datetime-local"].btn,
2396
+ .input-group-lg > input.form-control[type="datetime-local"],
2397
+ .input-group-lg > input.input-group-addon[type="datetime-local"],
2398
+ .input-group-lg > .input-group-btn > input.btn[type="datetime-local"],
2399
2399
  .input-group-lg
2400
2400
  input[type="datetime-local"],
2401
2401
  input[type="month"].input-lg,
2402
- .input-group-lg > input[type="month"].form-control,
2403
- .input-group-lg > input[type="month"].input-group-addon,
2404
- .input-group-lg > .input-group-btn > input[type="month"].btn,
2402
+ .input-group-lg > input.form-control[type="month"],
2403
+ .input-group-lg > input.input-group-addon[type="month"],
2404
+ .input-group-lg > .input-group-btn > input.btn[type="month"],
2405
2405
  .input-group-lg
2406
2406
  input[type="month"] {
2407
2407
  line-height: 70px; } }
@@ -2504,9 +2504,9 @@ textarea.input-sm, .input-group-sm > textarea.form-control,
2504
2504
  .input-group-sm > textarea.input-group-addon,
2505
2505
  .input-group-sm > .input-group-btn > textarea.btn,
2506
2506
  select[multiple].input-sm,
2507
- .input-group-sm > select[multiple].form-control,
2508
- .input-group-sm > select[multiple].input-group-addon,
2509
- .input-group-sm > .input-group-btn > select[multiple].btn {
2507
+ .input-group-sm > select.form-control[multiple],
2508
+ .input-group-sm > select.input-group-addon[multiple],
2509
+ .input-group-sm > .input-group-btn > select.btn[multiple] {
2510
2510
  height: auto; }
2511
2511
 
2512
2512
  .form-group-sm .form-control {
@@ -2550,9 +2550,9 @@ textarea.input-lg, .input-group-lg > textarea.form-control,
2550
2550
  .input-group-lg > textarea.input-group-addon,
2551
2551
  .input-group-lg > .input-group-btn > textarea.btn,
2552
2552
  select[multiple].input-lg,
2553
- .input-group-lg > select[multiple].form-control,
2554
- .input-group-lg > select[multiple].input-group-addon,
2555
- .input-group-lg > .input-group-btn > select[multiple].btn {
2553
+ .input-group-lg > select.form-control[multiple],
2554
+ .input-group-lg > select.input-group-addon[multiple],
2555
+ .input-group-lg > .input-group-btn > select.btn[multiple] {
2556
2556
  height: auto; }
2557
2557
 
2558
2558
  .form-group-lg .form-control {
@@ -2594,18 +2594,14 @@ select[multiple].input-lg,
2594
2594
  text-align: center;
2595
2595
  pointer-events: none; }
2596
2596
 
2597
- .input-lg + .form-control-feedback, .input-group-lg > .form-control + .form-control-feedback,
2598
- .input-group-lg > .input-group-addon + .form-control-feedback,
2599
- .input-group-lg > .input-group-btn > .btn + .form-control-feedback,
2597
+ .input-lg + .form-control-feedback, .input-group-lg > .form-control + .form-control-feedback, .input-group-lg > .input-group-addon + .form-control-feedback, .input-group-lg > .input-group-btn > .btn + .form-control-feedback,
2600
2598
  .input-group-lg + .form-control-feedback,
2601
2599
  .form-group-lg .form-control + .form-control-feedback {
2602
2600
  width: 70px;
2603
2601
  height: 70px;
2604
2602
  line-height: 70px; }
2605
2603
 
2606
- .input-sm + .form-control-feedback, .input-group-sm > .form-control + .form-control-feedback,
2607
- .input-group-sm > .input-group-addon + .form-control-feedback,
2608
- .input-group-sm > .input-group-btn > .btn + .form-control-feedback,
2604
+ .input-sm + .form-control-feedback, .input-group-sm > .form-control + .form-control-feedback, .input-group-sm > .input-group-addon + .form-control-feedback, .input-group-sm > .input-group-btn > .btn + .form-control-feedback,
2609
2605
  .input-group-sm + .form-control-feedback,
2610
2606
  .form-group-sm .form-control + .form-control-feedback {
2611
2607
  width: 38px;
@@ -3634,16 +3630,20 @@ tbody.collapse.in {
3634
3630
  margin-right: 0;
3635
3631
  border-radius: 4px; }
3636
3632
  .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a,
3637
- .nav-tabs-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:hover,
3638
- .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
3633
+ .nav-tabs-justified > .active > a:hover,
3634
+ .nav-tabs.nav-justified > .active > a:hover,
3635
+ .nav-tabs-justified > .active > a:focus,
3636
+ .nav-tabs.nav-justified > .active > a:focus {
3639
3637
  border: 1px solid #ecf0f1; }
3640
3638
  @media (min-width: 768px) {
3641
3639
  .nav-tabs-justified > li > a, .nav-tabs.nav-justified > li > a {
3642
3640
  border-bottom: 1px solid #ecf0f1;
3643
3641
  border-radius: 4px 4px 0 0; }
3644
3642
  .nav-tabs-justified > .active > a, .nav-tabs.nav-justified > .active > a,
3645
- .nav-tabs-justified > .active > a:hover, .nav-tabs.nav-justified > .active > a:hover,
3646
- .nav-tabs-justified > .active > a:focus, .nav-tabs.nav-justified > .active > a:focus {
3643
+ .nav-tabs-justified > .active > a:hover,
3644
+ .nav-tabs.nav-justified > .active > a:hover,
3645
+ .nav-tabs-justified > .active > a:focus,
3646
+ .nav-tabs.nav-justified > .active > a:focus {
3647
3647
  border-bottom-color: #fff; } }
3648
3648
 
3649
3649
  .tab-content > .tab-pane {
@@ -5495,7 +5495,7 @@ button.close {
5495
5495
  color: #fff;
5496
5496
  text-align: center;
5497
5497
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
5498
- background-color: transparent; }
5498
+ background-color: rgba(0, 0, 0, 0); }
5499
5499
  .carousel-control.left {
5500
5500
  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
5501
5501
  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
@@ -5564,7 +5564,7 @@ button.close {
5564
5564
  border-radius: 10px;
5565
5565
  cursor: pointer;
5566
5566
  background-color: #000 \9;
5567
- background-color: transparent; }
5567
+ background-color: rgba(0, 0, 0, 0); }
5568
5568
  .carousel-indicators .active {
5569
5569
  margin: 0;
5570
5570
  width: 12px;
@@ -6003,9 +6003,7 @@ input {
6003
6003
  .has-success .input-group-addon {
6004
6004
  border-color: #5cb85c; }
6005
6005
 
6006
- .nav .open > a,
6007
- .nav .open > a:hover,
6008
- .nav .open > a:focus {
6006
+ .nav .open > a, .nav .open > a:hover, .nav .open > a:focus {
6009
6007
  border-color: transparent; }
6010
6008
 
6011
6009
  .pager a,
@@ -9774,3 +9772,34 @@ pre code {
9774
9772
  .mu-file-browser main ul li:hover span {
9775
9773
  top: 70px;
9776
9774
  height: auto; }
9775
+
9776
+ pre {
9777
+ position: relative;
9778
+ border: 2px solid #cfd9db;
9779
+ border-width: 1px; }
9780
+ pre .mu-clipboard {
9781
+ font-size: 85%;
9782
+ cursor: pointer;
9783
+ display: flex;
9784
+ justify-content: center;
9785
+ align-items: center;
9786
+ position: absolute;
9787
+ z-index: 1;
9788
+ border-bottom-left-radius: 10px;
9789
+ border-left: 2px solid #cfd9db;
9790
+ border-left-width: 1px;
9791
+ border-bottom: 2px solid #cfd9db;
9792
+ border-bottom-width: 1px;
9793
+ height: 2em;
9794
+ width: 8em;
9795
+ color: #0B465D;
9796
+ top: 0;
9797
+ right: 0;
9798
+ background-color: #cfd9db; }
9799
+ pre .mu-clipboard span {
9800
+ margin-left: 0.25em;
9801
+ font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif; }
9802
+ pre .mu-clipboard:hover {
9803
+ background-color: #b1c2c6; }
9804
+ pre .mu-clipboard.clicked {
9805
+ font-weight: bold; }
@@ -1,9 +1,10 @@
1
1
  $font-size-base: 17px;
2
2
  $line-height-base: 1.8;
3
3
  $mu-fonts: (ahahamojimoji, mu-font);
4
+ $mu-font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
4
5
 
5
6
  body {
6
- font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
7
+ font-family: $mu-font-family;
7
8
  font-size: $font-size-base;
8
9
  line-height: $line-height-base;
9
10
  }
@@ -0,0 +1,39 @@
1
+ $mu-clipboard-background-color: darken($mu-color-component-title-background, 10%);
2
+
3
+ pre {
4
+
5
+ position: relative;
6
+ border: $mu-component-border;
7
+ border-width: 1px;
8
+
9
+ .mu-clipboard {
10
+ font-size: 85%;
11
+ cursor: pointer;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ position: absolute;
16
+ z-index: 1;
17
+ border-bottom-left-radius: 10px;
18
+ border-left: $mu-component-border;
19
+ border-left-width: 1px;
20
+ border-bottom: $mu-component-border;
21
+ border-bottom-width: 1px;
22
+ height: 2em;
23
+ width: 8em;
24
+ color: $mu-color-primary;
25
+ top: 0;
26
+ right: 0;
27
+ background-color: $mu-clipboard-background-color;
28
+ span {
29
+ margin-left: 0.25em;
30
+ font-family: $mu-font-family;
31
+ }
32
+ &:hover {
33
+ background-color: darken($mu-clipboard-background-color, 10%);
34
+ }
35
+ &.clicked {
36
+ font-weight: bold;
37
+ }
38
+ }
39
+ }
@@ -8,3 +8,4 @@ $mu-component-border-radius: 15px;
8
8
  @import 'mu-erd';
9
9
  @import 'mu-sql-table';
10
10
  @import 'mu-file-browser';
11
+ @import 'mu-pre-copy-paste';
data/lib/mumuki/styles.rb CHANGED
@@ -3,7 +3,12 @@ require "mumuki/styles/version"
3
3
  module Mumuki
4
4
  module Styles
5
5
  class Engine < ::Rails::Engine
6
- # Rails -> use app/assets directory.
6
+ end if defined? ::Rails::Engine
7
+
8
+ ASSETS_PATH=File.join(__dir__, '..', '..', 'app', 'assets')
9
+
10
+ def self.assets_path_for(asset)
11
+ File.join ASSETS_PATH, asset
7
12
  end
8
13
  end
9
14
  end
@@ -1,5 +1,5 @@
1
1
  module Mumuki
2
2
  module Styles
3
- VERSION = "1.16.2"
3
+ VERSION = "1.17.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-styles
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.2
4
+ version: 1.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Scarpa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-08 00:00:00.000000000 Z
11
+ date: 2018-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
41
55
  description:
42
56
  email:
43
57
  - fedescarpa@gmail.com
@@ -86,33 +100,34 @@ files:
86
100
  - app/assets/fonts/fontawesome-webfont.woff
87
101
  - app/assets/fonts/fontawesome-webfont.woff2
88
102
  - app/assets/javascripts/mumuki-styles.js
89
- - app/assets/stylesheets/_broken.scss
90
- - app/assets/stylesheets/_colors.scss
91
- - app/assets/stylesheets/_fonts.scss
92
- - app/assets/stylesheets/_footer.scss
93
- - app/assets/stylesheets/_hovers.scss
94
- - app/assets/stylesheets/_mixines.scss
95
- - app/assets/stylesheets/_modules.scss
96
- - app/assets/stylesheets/_navbar.scss
97
- - app/assets/stylesheets/_styles.scss
98
- - app/assets/stylesheets/_vendor.scss
99
- - app/assets/stylesheets/bootswatch/_bootswatch.scss
100
- - app/assets/stylesheets/bootswatch/_variables.scss
101
- - app/assets/stylesheets/components/_browser.scss
102
- - app/assets/stylesheets/components/_mu-erd.scss
103
- - app/assets/stylesheets/components/_mu-file-browser.scss
104
- - app/assets/stylesheets/components/_mu-sql-table.scss
105
- - app/assets/stylesheets/components/components.scss
106
- - app/assets/stylesheets/modules/_breadcrumb.scss
107
- - app/assets/stylesheets/modules/_callout.scss
108
- - app/assets/stylesheets/modules/_checkbox.scss
109
- - app/assets/stylesheets/modules/_conversation.scss
110
- - app/assets/stylesheets/modules/_follow_us.scss
111
- - app/assets/stylesheets/modules/_highlight.scss
112
- - app/assets/stylesheets/modules/_new_message.scss
113
- - app/assets/stylesheets/modules/_notification.scss
114
- - app/assets/stylesheets/mumuki-styles.css
115
- - app/assets/stylesheets/mumuki-styles.scss
103
+ - app/assets/stylesheets/css/mumuki-styles.css
104
+ - app/assets/stylesheets/scss/_broken.scss
105
+ - app/assets/stylesheets/scss/_colors.scss
106
+ - app/assets/stylesheets/scss/_fonts.scss
107
+ - app/assets/stylesheets/scss/_footer.scss
108
+ - app/assets/stylesheets/scss/_hovers.scss
109
+ - app/assets/stylesheets/scss/_mixines.scss
110
+ - app/assets/stylesheets/scss/_modules.scss
111
+ - app/assets/stylesheets/scss/_navbar.scss
112
+ - app/assets/stylesheets/scss/_styles.scss
113
+ - app/assets/stylesheets/scss/_vendor.scss
114
+ - app/assets/stylesheets/scss/bootswatch/_bootswatch.scss
115
+ - app/assets/stylesheets/scss/bootswatch/_variables.scss
116
+ - app/assets/stylesheets/scss/components/_browser.scss
117
+ - app/assets/stylesheets/scss/components/_mu-erd.scss
118
+ - app/assets/stylesheets/scss/components/_mu-file-browser.scss
119
+ - app/assets/stylesheets/scss/components/_mu-pre-copy-paste.scss
120
+ - app/assets/stylesheets/scss/components/_mu-sql-table.scss
121
+ - app/assets/stylesheets/scss/components/components.scss
122
+ - app/assets/stylesheets/scss/modules/_breadcrumb.scss
123
+ - app/assets/stylesheets/scss/modules/_callout.scss
124
+ - app/assets/stylesheets/scss/modules/_checkbox.scss
125
+ - app/assets/stylesheets/scss/modules/_conversation.scss
126
+ - app/assets/stylesheets/scss/modules/_follow_us.scss
127
+ - app/assets/stylesheets/scss/modules/_highlight.scss
128
+ - app/assets/stylesheets/scss/modules/_new_message.scss
129
+ - app/assets/stylesheets/scss/modules/_notification.scss
130
+ - app/assets/stylesheets/scss/mumuki-styles.scss
116
131
  - app/assets/stylesheets/vendor/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.scss
117
132
  - app/assets/stylesheets/vendor/awesome-bootstrap-checkbox/demo/bootstrap.scss
118
133
  - app/assets/stylesheets/vendor/awesome-bootstrap-checkbox/demo/build.scss
@@ -227,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
242
  version: '0'
228
243
  requirements: []
229
244
  rubyforge_project:
230
- rubygems_version: 2.5.1
245
+ rubygems_version: 2.7.7
231
246
  signing_key:
232
247
  specification_version: 4
233
248
  summary: Mumuki Styles