myg 2.9.0 → 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/app/views/mozaic/myg/_form-field.html.erb +2 -2
  4. data/app/views/mozaic/myg/_tabs.html.erb +5 -5
  5. data/app/views/mozaic/myg/_textarea.html.erb +1 -1
  6. data/lib/generators/templates/install/javascripts/index.js.erb +0 -1
  7. data/lib/generators/templates/install/stylesheets/_myg.sass +34 -27
  8. data/lib/generators/templates/install/stylesheets/_variables.sass +0 -1
  9. data/lib/generators/templates/install/stylesheets/theme/_default.scss +1 -1
  10. data/lib/generators/templates/install/stylesheets/theme/theme.sass +1 -1
  11. data/lib/generators/templates/install/stylesheets/variables/_action-button.scss +2 -2
  12. data/lib/generators/templates/install/stylesheets/variables/_animate.scss +4 -6
  13. data/lib/generators/templates/install/stylesheets/variables/_base.scss +5 -6
  14. data/lib/generators/templates/install/stylesheets/variables/_font.scss +1 -2
  15. data/lib/generators/templates/install/stylesheets/variables/_footer.scss +2 -2
  16. data/lib/generators/templates/install/stylesheets/variables/_grid.scss +5 -5
  17. data/lib/generators/templates/install/stylesheets/variables/_layout.scss +3 -4
  18. data/lib/generators/templates/install/stylesheets/variables/_spacing.scss +1 -6
  19. data/lib/generators/templates/install/stylesheets/variables/_text.scss +31 -38
  20. data/lib/generators/templates/install/stylesheets/variables/_theme.scss +6 -16
  21. data/lib/myg/version.rb +1 -1
  22. metadata +2 -3
  23. data/lib/generators/templates/install/stylesheets/variables/_elevation.scss +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb17af5bbbc1e1b865e000c8099c716ff992b651250b4403957ebe3e9a83c679
4
- data.tar.gz: c99b18a42e3a793a0328835da730745fdc1d1c388a2a6b7026d3415bc4714ed3
3
+ metadata.gz: 4eecc6e83a49f0bd0650c6387e64b1a7a8b6398f6a32377e3bc74066aff36937
4
+ data.tar.gz: 51b17c34d0d68565eaeb7f9e1a4b9d7a2eb6306ca16f2f0e83ab2bc7fdafd156
5
5
  SHA512:
6
- metadata.gz: e4070d42c085a9ff1cf201decc487a099ad8a6c476be0842f68a108405d413260a87f1fe7639372a37ec6c26104747eaa4a56b817d8db368f79de290fe869549
7
- data.tar.gz: 4f1721cdff5ee79322889ddc7937985be3a5aa325061fd798aacf8351f752835d6555d69a76bbddb0e365b0140ef41a32ee22f130b7ebd56400878b68432ce87
6
+ metadata.gz: 6b8a80a79943865ca3adf30ee79ed19448e0ce131c525bde0ac61b08b8f74a9a45df384c62a862d5b8efb8b12ad5df798e43d25d74d9a99bf9f7f540241dfbfc
7
+ data.tar.gz: 03e40b9c3d1a48cda1aba64b697c666113b276ead5908de8ddfa5182f17c5a7e7a08474c9ff27c1191c07072851034c0a040d430b2fb33e7ad92822e958b3568
@@ -4,6 +4,11 @@
4
4
 
5
5
  * nothing yet
6
6
 
7
+ ### 2.10.0 - 2018/05/18
8
+
9
+ * features
10
+ * update to Myg 0.13.0
11
+
7
12
  ### 2.9.0 - 2018/04/16
8
13
 
9
14
  * features
@@ -1,5 +1,5 @@
1
1
  <% wrapper_html = {
2
- class: ['myg-form-field', ('myg-form-field--inline-label' if options[:inline_label]), ('myg-form-field--floating-label' if options[:floating_label]), ('myg-form-field--file' if options[:file]), options.dig(:wrapper_html, :class)].join(' ')
2
+ class: [('myg-form-field' unless options[:file]), ('-inline-label' if options[:inline_label]), ('-floating-label' if options[:floating_label]), ('myg-form-field--file' if options[:file]), options.dig(:wrapper_html, :class)].join(' ')
3
3
  } %>
4
4
  <% if options[:floating_label] %><% input_html = {
5
5
  class_name: options[:class_name],
@@ -39,7 +39,7 @@
39
39
  <% end %>
40
40
  <% end %>
41
41
  <% if options[:floating_label] %>
42
- <%= content_tag 'div', class: 'myg-input--container' do %>
42
+ <%= content_tag 'div', class: 'myg-input__container' do %>
43
43
  <%= component "myg/#{options[:as]}", input_defaults.merge((options[:input_html] || {}).merge(input_html)) %>
44
44
  <%= component 'myg/label', (options[:label_html] || {}).merge(label_html) do %><%= options[:floating_label] %><% end %>
45
45
  <% end %>
@@ -2,7 +2,7 @@
2
2
  class: ['myg-tabs mdc-tab-bar', options.dig(:nav_html, :class)].join(' ')
3
3
  } %>
4
4
  <% wrapper_html = {
5
- class: ['myg-tabs--panels', options.dig(:wrapper_html, :class)].join(' ')
5
+ class: ['myg-tabs__panels', options.dig(:wrapper_html, :class)].join(' ')
6
6
  } %>
7
7
 
8
8
  <%= content_tag 'nav', (options[:nav_html] || {}).merge(nav_html) do %>
@@ -20,15 +20,15 @@
20
20
  <% end %>
21
21
  <%= content_tag 'div', (options[:wrapper_html] || {}).merge(wrapper_html) do %>
22
22
  <% if options[:async] %>
23
- <div class="myg-tabs--loader">
23
+ <div class="myg-tabs__loader">
24
24
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24"><g transform="translate(0, 0)"><g class="nc-loop_bars-rotate-24" transform="rotate(270 12 12)"> <rect x="11" fill="#444444" width="2" height="6"></rect> <rect x="17.3639603" y="2.636039" transform="matrix(0.7071068 0.7071068 -0.7071068 0.7071068 9.3639612 -11.3345242)" fill="#444444" width="2" height="6" style="opacity: 0.4;"></rect> <rect x="18" y="11" fill="#444444" width="6" height="2" style="opacity: 0.4;"></rect> <rect x="17.3639603" y="15.3639612" transform="matrix(-0.7071068 0.7071068 -0.7071068 -0.7071068 44.3345222 18.3639603)" fill="#444444" width="2" height="6" style="opacity: 0.4;"></rect> <rect x="11" y="18" fill="#444444" width="2" height="6" style="opacity: 0.4;"></rect> <rect x="4.6360388" y="15.3639612" transform="matrix(-0.7071068 -0.7071068 0.7071068 -0.7071068 -3.363961 35.3345222)" fill="#444444" width="2" height="6" style="opacity: 0.4;"></rect> <rect x="0" y="11" fill="#444444" width="6" height="2" style="opacity: 0.5;"></rect> <rect x="4.6360388" y="2.636039" transform="matrix(0.7071068 -0.7071068 0.7071068 0.7071068 -2.3345237 5.6360388)" fill="#444444" width="2" height="6" style="opacity: 0.8;"></rect> </g> <script>!function(){function t(t){this.element=t,this.animationId,this.start=null,this.init()}if(!window.requestAnimationFrame){var i=null;window.requestAnimationFrame=function(t,n){var e=(new Date).getTime();i||(i=e);var a=Math.max(0,16-(e-i)),o=window.setTimeout(function(){t(e+a)},a);return i=e+a,o}}t.prototype.init=function(){var t=this;this.animationId=window.requestAnimationFrame(t.triggerAnimation.bind(t))},t.prototype.reset=function(){var t=this;window.cancelAnimationFrame(t.animationId)},t.prototype.triggerAnimation=function(t){var i=this;this.start||(this.start=t);var n=t-this.start;800&gt;n||(this.start=this.start+800),this.element.setAttribute("transform","rotate("+parseInt(Math.min(n/100,8))%8*45+" 12 12)");if(document.documentElement.contains(this.element))window.requestAnimationFrame(i.triggerAnimation.bind(i))};var n=document.getElementsByClassName("nc-loop_bars-rotate-24"),e=[];if(n)for(var a=0;n.length&gt;a;a++)!function(i){e.push(new t(n[i]))}(a);document.addEventListener("visibilitychange",function(){"hidden"==document.visibilityState?e.forEach(function(t){t.reset()}):e.forEach(function(t){t.init()})})}();</script></g></svg>
25
25
  </div>
26
- <div class="myg-tabs--panel" id="myg-tabs--panel-success" role="tabpanel" aria-hidden="true"><%= options.dig(:success, :content) || render(partial: options.dig(:success, :partial), locals: options.dig(:success, :partial_locals)) %></div>
27
- <div class="myg-tabs--panel" id="myg-tabs--panel-error" role="tabpanel" aria-hidden="true"><%= block %></div>
26
+ <div class="myg-tabs__panel" id="myg-tabs__panel--success" role="tabpanel" aria-hidden="true"><%= options.dig(:success, :content) || render(partial: options.dig(:success, :partial), locals: options.dig(:success, :partial_locals)) %></div>
27
+ <div class="myg-tabs__panel" id="myg-tabs__panel--error" role="tabpanel" aria-hidden="true"><%= block %></div>
28
28
  <% else %>
29
29
  <% options[:tabs]&.each do |tab| %>
30
30
  <% panel_html = {
31
- class: ['myg-tabs--panel', options.dig(:panel_html, :class), ('myg-tabs--shown' if tab[:active])].join(' '),
31
+ class: ['myg-tabs__panel', options.dig(:panel_html, :class), ('-shown' if tab[:active])].join(' '),
32
32
  id: tab[:id] || tab[:name].underscore,
33
33
  role: 'tabpanel',
34
34
  aria: {
@@ -4,7 +4,7 @@
4
4
  <% name = class_name ? "#{class_name.to_s.downcase}[#{attribute}]" : "#{attribute}" %>
5
5
  <% id = [class_name, identifier, attribute].map { |s| s.to_s.downcase }.join('_').tr('[', '_').tr(']', '_') %>
6
6
  <% html = {
7
- class: ['myg-textarea', options[:class]].join(' '),
7
+ class: ['myg-input__textarea', options[:class]].join(' '),
8
8
  name: name,
9
9
  id: id
10
10
  } %>
@@ -7,7 +7,6 @@ import './drawer';
7
7
  import './dropdown';
8
8
  import './footer';
9
9
  import './form-field';
10
- import './input';
11
10
  import './menu';
12
11
  import './modal';
13
12
  import './progress';
@@ -41,30 +41,37 @@
41
41
  // @import "myg-toolbar/toolbar"
42
42
  // @import "myg-tooltip/tooltip"
43
43
  //
44
- // +myg-animate--classes
45
- // +myg-base--classes
46
- // +myg-badge--classes
47
- // +myg-button--classes
48
- // +myg-card--classes
49
- // +myg-checkbox--classes
50
- // +myg-drawer--classes
51
- // +myg-dropdown--classes
52
- // +myg-elevation--classes
53
- // +myg-font--classes
54
- // +myg-footer--classes
55
- // +myg-form-field--classes
56
- // +myg-grid--classes
57
- // +myg-input--classes
58
- // +myg-label--classes
59
- // +myg-layout--classes
60
- // +myg-list--classes
61
- // +myg-progress--classes
62
- // +myg-radio--classes
63
- // +myg-switch--classes
64
- // +myg-tabs--classes
65
- // +myg-text--classes
66
- // +myg-theme--classes
67
- // +myg-titlebar--classes
68
- // +myg-toast--classes
69
- // +myg-toolbar--classes
70
- // +myg-tooltip--classes
44
+ // +myg__classes--animate
45
+ // +myg__classes--base
46
+ // +myg__classes--badge
47
+ // +myg__classes--button
48
+ // +myg__classes--card
49
+ // +myg__classes--checkbox
50
+ // +myg__classes--drawer
51
+ // +myg__classes--dropdown
52
+ // +myg__classes--elevation
53
+ // +myg__classes--font
54
+ // +myg__classes--footer
55
+ // +myg__classes--form-field
56
+ // +myg__classes--grid
57
+ // +myg__classes--hint
58
+ // +myg__classes--input
59
+ // +myg__classes--label
60
+ // +myg__classes--layout
61
+ // +myg__classes--list
62
+ // +myg__classes--progress
63
+ // +myg__classes--radio
64
+ // +myg__classes--tabs
65
+ // +myg__classes--switch
66
+ // +myg__classes--text
67
+ // +myg__classes--theme
68
+ // +myg__classes--titlebar
69
+ // +myg__classes--toast
70
+ // +myg__classes--toolbar
71
+ // +myg__classes--tooltip
72
+ //
73
+ // +myg__mappings--button
74
+ // +myg__mappings--input
75
+ // +myg__mappings--label
76
+ // +myg__mappings--layout
77
+ // +myg__mappings--text
@@ -3,7 +3,6 @@
3
3
  @import "variables/_action-button"
4
4
  @import "variables/_animate"
5
5
  @import "variables/_base"
6
- @import "variables/_elevation"
7
6
  @import "variables/_font"
8
7
  @import "variables/_footer"
9
8
  @import "variables/_grid"
@@ -20,7 +20,7 @@ $myg-theme: (
20
20
  darker: #ecf2f7
21
21
  ),
22
22
  border: #dce2e7,
23
- box-shadow: rgba(#000, .05),
23
+ box-shadow: rgba(#000, .16),
24
24
  error: #f6809a,
25
25
  success: #6adb83,
26
26
  overlay: (
@@ -1,2 +1,2 @@
1
1
  html
2
- // +theme($myg-theme--custom)
2
+ // +myg-theme($myg-theme--custom)
@@ -1,3 +1,3 @@
1
1
  $myg-action-button: (
2
- diameter: px(50)
3
- ) !default;
2
+ diameter: myg__px(50)
3
+ );
@@ -1,5 +1,4 @@
1
- // Animations
2
- $myg-animate: (
1
+ $myg-animate__animation: (
3
2
  shake: (
4
3
  duration: .82s,
5
4
  easing: cubic-bezier(.36,.07,.19,.97) both
@@ -8,11 +7,10 @@ $myg-animate: (
8
7
  duration: 3s,
9
8
  easing: ease-in-out
10
9
  )
11
- ) !default;
10
+ );
12
11
 
13
12
 
14
- // Transitions
15
- $myg-animate--transitions: (
13
+ $myg-animate__transition: (
16
14
  duration: .15s,
17
15
  easing: ease-out
18
- ) !default;
16
+ );
@@ -1,12 +1,10 @@
1
- // Base
2
1
  $myg-base: (
3
2
  font-size: 16,
4
3
  pwa-display-mode: standalone
5
- ) !default;
4
+ );
6
5
 
7
6
 
8
- // Cursor
9
- $myg--cursors: (
7
+ $myg__cursor: (
10
8
  default: default,
11
9
  text: text,
12
10
  pointer: pointer,
@@ -14,5 +12,6 @@ $myg--cursors: (
14
12
  move: move,
15
13
  grab: grab,
16
14
  progress: progress,
17
- wait: wait
18
- ) !default;
15
+ wait: wait,
16
+ not-allowed: not-allowed
17
+ );
@@ -1,7 +1,6 @@
1
- // Family
2
1
  $myg-font: (
3
2
  default: (-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"),
4
3
  sans-serif: ("Inter UI", "Helvetica Neue", sans-serif),
5
4
  serif: ("Freight Text Pro", "Georgia", serif),
6
5
  monospace: ("Inconsolata", "Roboto Mono", "Courier New", monospace)
7
- ) !default;
6
+ );
@@ -1,3 +1,3 @@
1
1
  $myg-footer: (
2
- min-height: px(25)
3
- ) !default;
2
+ min-height: myg__px(25)
3
+ );
@@ -1,15 +1,15 @@
1
- // Breakpoints
2
- $myg-grid--breakpoints: (
1
+ $myg-grid__breakpoints: (
3
2
  phone: 512px,
4
3
  tablet: 768px,
5
4
  laptop: 1024px,
6
5
  large: 1280px,
7
6
  desktop: 1920px
8
- ) !default;
9
- $myg-grid--columns: (
7
+ );
8
+
9
+ $myg-grid__grid--default-columns: (
10
10
  phone: 4,
11
11
  tablet: 4,
12
12
  laptop: 8,
13
13
  large: 12,
14
14
  desktop: 12
15
- ) !default;
15
+ );
@@ -1,5 +1,4 @@
1
- // Layout
2
1
  $myg-layout: (
3
- toolbar-height: px(55),
4
- sidebar-width: minmax(33%, px(400))
5
- ) !default;
2
+ toolbar-height: myg__px(55),
3
+ sidebar-width: minmax(33%, myg__px(400))
4
+ );
@@ -1,6 +1 @@
1
- $myg-spacing: (
2
- tn: px(15),
3
- sm: px(20),
4
- md: px(30),
5
- lg: px(50)
6
- ) !default;
1
+ $myg-spacing__factor: 5;
@@ -1,26 +1,23 @@
1
- // Text Size
2
- $myg-text--size: (
3
- p: (sm: px(14), base: px(16), lg: px(18), bg: px(20)),
4
- h1: (sm: px(36), base: px(48), lg: px(64), bg: px(74)),
5
- h2: (sm: px(21), base: px(24), lg: px(30), bg: px(36)),
6
- h3: (sm: px(18), base: px(21), lg: px(24), bg: px(30)),
7
- h4: (sm: px(16), base: px(18), lg: px(21), bg: px(24)),
8
- h5: (sm: px(14), base: px(16), lg: px(18), bg: px(21)),
9
- h6: (sm: px(13), base: px(14), lg: px(16), bg: px(18))
10
- ) !default;
11
- $myg-text--size-mobile: (
12
- p: (sm: px(14), base: px(16), lg: px(18), bg: px(20)),
13
- h1: (sm: px(30), base: px(36), lg: px(40), bg: px(48)),
14
- h2: (sm: px(18), base: px(21), lg: px(24), bg: px(30)),
15
- h3: (sm: px(16), base: px(18), lg: px(21), bg: px(24)),
16
- h4: (sm: px(16), base: px(17), lg: px(18), bg: px(21)),
17
- h5: (sm: px(15), base: px(16), lg: px(17), bg: px(18)),
18
- h6: (sm: px(13), base: px(14), lg: px(15), bg: px(16))
19
- ) !default;
1
+ $myg-text__size: (
2
+ p: (sm: myg__px(14), base: myg__px(16), lg: myg__px(18), bg: myg__px(20)),
3
+ h1: (sm: myg__px(36), base: myg__px(48), lg: myg__px(64), bg: myg__px(74)),
4
+ h2: (sm: myg__px(21), base: myg__px(24), lg: myg__px(30), bg: myg__px(36)),
5
+ h3: (sm: myg__px(18), base: myg__px(21), lg: myg__px(24), bg: myg__px(30)),
6
+ h4: (sm: myg__px(16), base: myg__px(18), lg: myg__px(21), bg: myg__px(24)),
7
+ h5: (sm: myg__px(14), base: myg__px(16), lg: myg__px(18), bg: myg__px(21)),
8
+ h6: (sm: myg__px(13), base: myg__px(14), lg: myg__px(16), bg: myg__px(18))
9
+ );
10
+ $myg-text__size--mobile: (
11
+ p: (sm: myg__px(14), base: myg__px(16), lg: myg__px(18), bg: myg__px(20)),
12
+ h1: (sm: myg__px(30), base: myg__px(36), lg: myg__px(40), bg: myg__px(48)),
13
+ h2: (sm: myg__px(18), base: myg__px(21), lg: myg__px(24), bg: myg__px(30)),
14
+ h3: (sm: myg__px(16), base: myg__px(18), lg: myg__px(21), bg: myg__px(24)),
15
+ h4: (sm: myg__px(16), base: myg__px(17), lg: myg__px(18), bg: myg__px(21)),
16
+ h5: (sm: myg__px(15), base: myg__px(16), lg: myg__px(17), bg: myg__px(18)),
17
+ h6: (sm: myg__px(13), base: myg__px(14), lg: myg__px(15), bg: myg__px(16))
18
+ );
20
19
 
21
-
22
- // Text Family
23
- $myg-text--family: (
20
+ $myg-text__family: (
24
21
  p: sans-serif,
25
22
  h1: sans-serif,
26
23
  h2: sans-serif,
@@ -28,23 +25,19 @@ $myg-text--family: (
28
25
  h4: sans-serif,
29
26
  h5: sans-serif,
30
27
  h6: sans-serif
31
- ) !default;
32
-
33
-
34
- // Text Color
35
- $myg-text--color: (
36
- p: color(text, base),
37
- h1: color(text, darker),
38
- h2: color(text, darker),
39
- h3: color(text, darker),
40
- h4: color(text, darker),
41
- h5: color(text, darker),
42
- h6: color(text, darker)
43
- ) !default;
28
+ );
44
29
 
30
+ $myg-text__color: (
31
+ p: myg-theme__color(text, base),
32
+ h1: myg-theme__color(text, darker),
33
+ h2: myg-theme__color(text, darker),
34
+ h3: myg-theme__color(text, darker),
35
+ h4: myg-theme__color(text, darker),
36
+ h5: myg-theme__color(text, darker),
37
+ h6: myg-theme__color(text, darker)
38
+ );
45
39
 
46
- // Text Weight
47
- $myg-text--weight: (
40
+ $myg-text__weight: (
48
41
  p: normal,
49
42
  h1: bold,
50
43
  h2: bold,
@@ -52,4 +45,4 @@ $myg-text--weight: (
52
45
  h4: bold,
53
46
  h5: bold,
54
47
  h6: bold
55
- ) !default;
48
+ );
@@ -1,17 +1,7 @@
1
- // Border Radius
2
- $border-radius: (
3
- none: 0,
4
- sm: px(3),
5
- md: px(5),
6
- lg: px(10)
7
- ) !default;
8
-
9
-
10
- // Scrollbar
11
- $scrollbar: (
12
- width: px(5),
1
+ $myg-theme__scrollbar: (
2
+ width: myg__px(5),
13
3
  track-background: transparent,
14
- thumb-border-radius: px(2.5),
15
- thumb-background: color(border),
16
- thumb-hover-background: color(text, dark)
17
- ) !default;
4
+ thumb-border-radius: myg__px(2.5),
5
+ thumb-background: myg-theme__color(border),
6
+ thumb-hover-background: myg-theme__color(text, dark)
7
+ );
@@ -1,5 +1,5 @@
1
1
  module Myg
2
2
 
3
- VERSION = '2.9.0'
3
+ VERSION = '2.10.0'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-16 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -159,7 +159,6 @@ files:
159
159
  - lib/generators/templates/install/stylesheets/variables/_action-button.scss
160
160
  - lib/generators/templates/install/stylesheets/variables/_animate.scss
161
161
  - lib/generators/templates/install/stylesheets/variables/_base.scss
162
- - lib/generators/templates/install/stylesheets/variables/_elevation.scss
163
162
  - lib/generators/templates/install/stylesheets/variables/_font.scss
164
163
  - lib/generators/templates/install/stylesheets/variables/_footer.scss
165
164
  - lib/generators/templates/install/stylesheets/variables/_grid.scss
@@ -1,5 +0,0 @@
1
- $myg-elevation: (
2
- sm: 0 .0625em .3125em 0 color(box-shadow),
3
- md: 0 .25em .9375em 0 color(box-shadow),
4
- lg: 0 .4375em 2.5em 0 color(box-shadow)
5
- ) !default;