myg 2.10.3 → 2.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +143 -143
- data/app/helpers/myg/theme_helper.rb +38 -34
- data/app/views/mozaic/myg/_button.html.erb +5 -5
- data/app/views/mozaic/myg/_checkbox.html.erb +27 -27
- data/app/views/mozaic/myg/_drawer.html.erb +2 -2
- data/app/views/mozaic/myg/_form-field.html.erb +64 -64
- data/app/views/mozaic/myg/_hint.html.erb +7 -7
- data/app/views/mozaic/myg/_input.html.erb +15 -15
- data/app/views/mozaic/myg/_label.html.erb +12 -12
- data/app/views/mozaic/myg/_progress.html.erb +15 -15
- data/app/views/mozaic/myg/_radio.html.erb +24 -24
- data/app/views/mozaic/myg/_slider.html.erb +22 -22
- data/app/views/mozaic/myg/_switch.html.erb +24 -24
- data/app/views/mozaic/myg/_tabs.html.erb +43 -43
- data/app/views/mozaic/myg/_textarea.html.erb +14 -12
- data/app/views/mozaic/myg/_titlebar.html.erb +12 -12
- data/app/views/mozaic/myg/_toast.html.erb +10 -10
- data/app/views/mozaic/myg/_toolbar.html.erb +2 -2
- data/lib/generators/myg/install_generator.rb +72 -46
- data/lib/generators/myg/tabs_generator.rb +30 -23
- data/lib/generators/myg/theme_generator.rb +9 -5
- data/lib/generators/templates/install/initializer.rb +35 -36
- data/lib/generators/templates/install/javascripts/action-button.js +9 -9
- data/lib/generators/templates/install/javascripts/button.js +9 -9
- data/lib/generators/templates/install/javascripts/card.js +9 -9
- data/lib/generators/templates/install/javascripts/checkbox.js +9 -9
- data/lib/generators/templates/install/javascripts/dialog.js +9 -9
- data/lib/generators/templates/install/javascripts/drawer.js +9 -9
- data/lib/generators/templates/install/javascripts/dropdown.js +9 -9
- data/lib/generators/templates/install/javascripts/footer.js +9 -9
- data/lib/generators/templates/install/javascripts/form-field.js +9 -9
- data/lib/generators/templates/install/javascripts/index.js.erb +24 -24
- data/lib/generators/templates/install/javascripts/menu.js +9 -9
- data/lib/generators/templates/install/javascripts/modal.js +9 -9
- data/lib/generators/templates/install/javascripts/progress.js +9 -9
- data/lib/generators/templates/install/javascripts/radio.js +9 -9
- data/lib/generators/templates/install/javascripts/select.js +9 -9
- data/lib/generators/templates/install/javascripts/sidebar.js +9 -9
- data/lib/generators/templates/install/javascripts/slide.js +9 -9
- data/lib/generators/templates/install/javascripts/slider.js +9 -9
- data/lib/generators/templates/install/javascripts/tabs.js +9 -9
- data/lib/generators/templates/install/javascripts/text.js +9 -9
- data/lib/generators/templates/install/javascripts/theme.js +9 -9
- data/lib/generators/templates/install/javascripts/titlebar.js +9 -9
- data/lib/generators/templates/install/javascripts/toast.js +9 -9
- data/lib/generators/templates/install/javascripts/toolbar.js +9 -9
- data/lib/generators/templates/install/javascripts/tooltip.js +9 -9
- data/lib/generators/templates/install/stylesheets/myg.scss +107 -0
- data/lib/generators/templates/install/stylesheets/theme/_custom.scss +30 -0
- data/lib/generators/templates/install/stylesheets/theme/theme.scss +3 -0
- data/lib/generators/templates/install/stylesheets/variables/_action-button.scss +3 -3
- data/lib/generators/templates/install/stylesheets/variables/_animate.scss +15 -16
- data/lib/generators/templates/install/stylesheets/variables/_base.scss +16 -17
- data/lib/generators/templates/install/stylesheets/variables/_font.scss +6 -6
- data/lib/generators/templates/install/stylesheets/variables/_footer.scss +3 -3
- data/lib/generators/templates/install/stylesheets/variables/_grid.scss +15 -15
- data/lib/generators/templates/install/stylesheets/variables/_layout.scss +4 -4
- data/lib/generators/templates/install/stylesheets/variables/_spacing.scss +1 -1
- data/lib/generators/templates/install/stylesheets/variables/_text.scss +48 -48
- data/lib/generators/templates/install/stylesheets/variables/_theme.scss +38 -7
- data/lib/generators/templates/tabs/_tab.html.erb +1 -1
- data/lib/generators/templates/tabs/_tabs.html.erb +5 -5
- data/lib/generators/templates/tabs/tab.html.erb +1 -1
- data/lib/generators/templates/theme/stylesheets/_theme.scss.erb +30 -27
- data/lib/myg.rb +5 -5
- data/lib/myg/configuration.rb +38 -39
- data/lib/myg/engine.rb +8 -6
- data/lib/myg/railtie.rb +36 -34
- data/lib/myg/version.rb +3 -3
- data/vendor/assets/javascripts/myg.js +40 -16513
- data/vendor/assets/stylesheets/myg.css +33154 -696
- metadata +46 -36
- data/CHANGELOG.md +0 -170
- data/lib/generators/templates/install/javascripts/input.js +0 -9
- data/lib/generators/templates/install/stylesheets/_myg.sass +0 -77
- data/lib/generators/templates/install/stylesheets/_variables.sass +0 -12
- data/lib/generators/templates/install/stylesheets/myg.sass +0 -8
- data/lib/generators/templates/install/stylesheets/theme/_default.scss +0 -30
- data/lib/generators/templates/install/stylesheets/theme/theme.sass +0 -2
@@ -0,0 +1,30 @@
|
|
1
|
+
$myg-theme--custom: (
|
2
|
+
accent: (
|
3
|
+
light: #4063e8,
|
4
|
+
base: #042ecb,
|
5
|
+
dark: #052ab3,
|
6
|
+
contrast: #fff
|
7
|
+
),
|
8
|
+
text: (
|
9
|
+
lighter: #bec7cf,
|
10
|
+
light: #97a4b0,
|
11
|
+
base: #657786,
|
12
|
+
dark: #3d4553,
|
13
|
+
darker: #14171a
|
14
|
+
),
|
15
|
+
background: (
|
16
|
+
lighter: #fcfcfc,
|
17
|
+
light: #fff,
|
18
|
+
base: #fff,
|
19
|
+
dark: #fbfbfd,
|
20
|
+
darker: #ecf2f7
|
21
|
+
),
|
22
|
+
border: #dce2e7,
|
23
|
+
box-shadow: rgba(#000, 0.05),
|
24
|
+
error: #f6809a,
|
25
|
+
success: #6adb83,
|
26
|
+
overlay: (
|
27
|
+
light: transparentize(#e7ecf0, 0.13),
|
28
|
+
dark: transparentize(#14171a, 0.87)
|
29
|
+
)
|
30
|
+
);
|
@@ -1,3 +1,3 @@
|
|
1
|
-
$myg-action-button: (
|
2
|
-
|
3
|
-
);
|
1
|
+
$myg-action-button: (
|
2
|
+
diameter: myg__px(50)
|
3
|
+
);
|
@@ -1,16 +1,15 @@
|
|
1
|
-
$myg-animate__animation: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
);
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
);
|
1
|
+
$myg-animate__animation: (
|
2
|
+
shake: (
|
3
|
+
duration: 0.82s,
|
4
|
+
easing: cubic-bezier(0.36, 0.07, 0.19, 0.97) both
|
5
|
+
),
|
6
|
+
bell: (
|
7
|
+
duration: 3s,
|
8
|
+
easing: ease-in-out
|
9
|
+
)
|
10
|
+
);
|
11
|
+
|
12
|
+
$myg-animate__transition: (
|
13
|
+
duration: 0.15s,
|
14
|
+
easing: ease-out
|
15
|
+
);
|
@@ -1,17 +1,16 @@
|
|
1
|
-
$myg-base: (
|
2
|
-
|
3
|
-
|
4
|
-
);
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
);
|
1
|
+
$myg-base: (
|
2
|
+
font-size: 16,
|
3
|
+
pwa-display-mode: standalone
|
4
|
+
);
|
5
|
+
|
6
|
+
$myg__cursor: (
|
7
|
+
default: default,
|
8
|
+
text: text,
|
9
|
+
pointer: pointer,
|
10
|
+
help: help,
|
11
|
+
move: move,
|
12
|
+
grab: grab,
|
13
|
+
progress: progress,
|
14
|
+
wait: wait,
|
15
|
+
not-allowed: not-allowed
|
16
|
+
);
|
@@ -1,6 +1,6 @@
|
|
1
|
-
$myg-font: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
);
|
1
|
+
$myg-font: (
|
2
|
+
default: (-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"),
|
3
|
+
sans-serif: ("Inter UI", "Helvetica Neue", sans-serif),
|
4
|
+
serif: ("Freight Text Pro", "Georgia", serif),
|
5
|
+
monospace: ("Inconsolata", "Roboto Mono", "Courier New", monospace)
|
6
|
+
);
|
@@ -1,3 +1,3 @@
|
|
1
|
-
$myg-footer: (
|
2
|
-
|
3
|
-
);
|
1
|
+
$myg-footer: (
|
2
|
+
min-height: myg__px(25)
|
3
|
+
);
|
@@ -1,15 +1,15 @@
|
|
1
|
-
$myg-grid__breakpoints: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
);
|
8
|
-
|
9
|
-
$myg-grid__grid--default-columns: (
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
);
|
1
|
+
$myg-grid__breakpoints: (
|
2
|
+
phone: 512px,
|
3
|
+
tablet: 768px,
|
4
|
+
laptop: 1024px,
|
5
|
+
large: 1280px,
|
6
|
+
desktop: 1920px
|
7
|
+
);
|
8
|
+
|
9
|
+
$myg-grid__grid--default-columns: (
|
10
|
+
phone: 4,
|
11
|
+
tablet: 4,
|
12
|
+
laptop: 8,
|
13
|
+
large: 12,
|
14
|
+
desktop: 12
|
15
|
+
);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$myg-layout: (
|
2
|
-
|
3
|
-
|
4
|
-
);
|
1
|
+
$myg-layout: (
|
2
|
+
toolbar-height: myg__px(55),
|
3
|
+
sidebar-width: minmax(33%, myg__px(400))
|
4
|
+
);
|
@@ -1 +1 @@
|
|
1
|
-
$myg-spacing__factor: 5;
|
1
|
+
$myg-spacing__factor: 5;
|
@@ -1,48 +1,48 @@
|
|
1
|
-
$myg-text__size: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
);
|
10
|
-
$myg-text__size--mobile: (
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
);
|
19
|
-
|
20
|
-
$myg-text__family: (
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
);
|
29
|
-
|
30
|
-
$myg-text__color: (
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
);
|
39
|
-
|
40
|
-
$myg-text__weight: (
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
);
|
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
|
+
);
|
19
|
+
|
20
|
+
$myg-text__family: (
|
21
|
+
p: sans-serif,
|
22
|
+
h1: sans-serif,
|
23
|
+
h2: sans-serif,
|
24
|
+
h3: sans-serif,
|
25
|
+
h4: sans-serif,
|
26
|
+
h5: sans-serif,
|
27
|
+
h6: sans-serif
|
28
|
+
);
|
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
|
+
);
|
39
|
+
|
40
|
+
$myg-text__weight: (
|
41
|
+
p: normal,
|
42
|
+
h1: bold,
|
43
|
+
h2: bold,
|
44
|
+
h3: bold,
|
45
|
+
h4: bold,
|
46
|
+
h5: bold,
|
47
|
+
h6: bold
|
48
|
+
);
|
@@ -1,7 +1,38 @@
|
|
1
|
-
$myg-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
)
|
1
|
+
$myg-theme: (
|
2
|
+
accent: (
|
3
|
+
light: #4063e8,
|
4
|
+
base: #042ecb,
|
5
|
+
dark: #052ab3,
|
6
|
+
contrast: #fff
|
7
|
+
),
|
8
|
+
text: (
|
9
|
+
lighter: #bec7cf,
|
10
|
+
light: #97a4b0,
|
11
|
+
base: #657786,
|
12
|
+
dark: #3d4553,
|
13
|
+
darker: #14171a
|
14
|
+
),
|
15
|
+
background: (
|
16
|
+
lighter: #fcfcfc,
|
17
|
+
light: #fff,
|
18
|
+
base: #fff,
|
19
|
+
dark: #fbfbfd,
|
20
|
+
darker: #ecf2f7
|
21
|
+
),
|
22
|
+
border: #dce2e7,
|
23
|
+
box-shadow: rgba(#000, 0.05),
|
24
|
+
error: #f6809a,
|
25
|
+
success: #6adb83,
|
26
|
+
overlay: (
|
27
|
+
light: transparentize(#e7ecf0, 0.13),
|
28
|
+
dark: transparentize(#14171a, 0.87)
|
29
|
+
)
|
30
|
+
);
|
31
|
+
|
32
|
+
$myg-theme__scrollbar: (
|
33
|
+
width: myg__px(5),
|
34
|
+
track-background: transparent,
|
35
|
+
thumb-border-radius: myg__px(2.5),
|
36
|
+
thumb-background: myg-theme__color(border),
|
37
|
+
thumb-hover-background: myg-theme__color(text, dark)
|
38
|
+
);
|
@@ -1 +1 @@
|
|
1
|
-
<h1><%= @name.titleize %></h1>
|
1
|
+
<h1><%= @name.titleize %></h1>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<h1>Title</h1>
|
2
|
-
|
3
|
-
<%%= component 'myg/tabs', async: true, success: local_assigns[:success], tabs: <%= options[:method_names]&.map! { |t| { name: t.titleize, href: '' } } %> do %>
|
4
|
-
|
5
|
-
<%% end %>
|
1
|
+
<h1>Title</h1>
|
2
|
+
|
3
|
+
<%%= component 'myg/tabs', async: true, success: local_assigns[:success], tabs: <%= options[:method_names]&.map! { |t| { name: t.titleize, href: '' } } %> do %>
|
4
|
+
<p>An error occured</p>
|
5
|
+
<%% end %>
|
@@ -1 +1 @@
|
|
1
|
-
<%%= render 'tabs', tab: @name.titleize, success: { partial: @name } %>
|
1
|
+
<%%= render 'tabs', tab: @name.titleize, success: { partial: @name } %>
|
@@ -1,27 +1,30 @@
|
|
1
|
-
$myg-theme--<%= options[:name] %>: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
)
|
1
|
+
$myg-theme--<%= options[:name] %>: (
|
2
|
+
accent: (
|
3
|
+
light: #4063e8,
|
4
|
+
base: #042ecb,
|
5
|
+
dark: #052ab3,
|
6
|
+
contrast: #fff
|
7
|
+
),
|
8
|
+
text: (
|
9
|
+
lighter: #bec7cf,
|
10
|
+
light: #97a4b0,
|
11
|
+
base: #657786,
|
12
|
+
dark: #3d4553,
|
13
|
+
darker: #14171a
|
14
|
+
),
|
15
|
+
background: (
|
16
|
+
lighter: #fcfcfc,
|
17
|
+
light: #fff,
|
18
|
+
base: #fff,
|
19
|
+
dark: #ecf2f7,
|
20
|
+
darker: #ebf5fe
|
21
|
+
),
|
22
|
+
border: #dce2e7,
|
23
|
+
box-shadow: rgba(#000, 0.05),
|
24
|
+
error: #f6809a,
|
25
|
+
success: #6adb83,
|
26
|
+
overlay: (
|
27
|
+
light: transparentize(#e7ecf0, 0.13),
|
28
|
+
dark: transparentize(#14171a, 0.87)
|
29
|
+
)
|
30
|
+
);
|
data/lib/myg.rb
CHANGED
data/lib/myg/configuration.rb
CHANGED
@@ -1,39 +1,38 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Myg
|
4
|
+
class << self
|
5
|
+
attr_accessor :configuration
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.configure
|
9
|
+
self.configuration ||= Configuration.new
|
10
|
+
yield configuration
|
11
|
+
end
|
12
|
+
|
13
|
+
class Configuration
|
14
|
+
attr_accessor :stylesheets_dir
|
15
|
+
attr_accessor :javascripts_dir
|
16
|
+
attr_accessor :es6
|
17
|
+
attr_accessor :themes
|
18
|
+
attr_accessor :theme
|
19
|
+
attr_accessor :theme_auto
|
20
|
+
attr_accessor :theme_day
|
21
|
+
attr_accessor :theme_night
|
22
|
+
attr_accessor :theme_day_time
|
23
|
+
attr_accessor :theme_night_time
|
24
|
+
|
25
|
+
def initialize
|
26
|
+
@stylesheets_dir = 'app/assets/stylesheets/myg'
|
27
|
+
@javascripts_dir = 'app/assets/javascripts/myg'
|
28
|
+
@es6 = true
|
29
|
+
@themes = ['default']
|
30
|
+
@theme = 'default'
|
31
|
+
@theme_auto = false
|
32
|
+
@theme_day = 'light'
|
33
|
+
@theme_night = 'dark'
|
34
|
+
@theme_day_time = '6:00 am'
|
35
|
+
@theme_night_time = '6:00 pm'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|