glib-web 0.4.29 → 0.4.30

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b077889e4be620efc4f9f9dd4ff92bbdb5f1755c
4
- data.tar.gz: e05cceb6de9a7310141f60d46894571a7d0901c3
3
+ metadata.gz: e2750a8520ebd3ccd30d105d4e0130b7c10ed980
4
+ data.tar.gz: b6ec55316c97ff855fc8026848eceb05cbe91004
5
5
  SHA512:
6
- metadata.gz: 86651872a1648412cce138ebe10ee1152bf99e3f996af3ff506bc7db0b1e955f08fa2adea1be6e93b6e2830ae05e70701f54a8ef64c0e953038ab7c74eac7c91
7
- data.tar.gz: 11c2d3d86873d06958a70a72afae3ab8694768a264ae1755edfd5997183b082dfe970169dec916b8f0288192832d053bcc56adaf9fd37130e834c69991c88147
6
+ metadata.gz: c3b3d01289786edccbab16230ac711238767f09ded6f9523b0936f1e71f4100ce65c5115a13ed2261d718bc8a642299614de4badbaef8c987fbec9d95de0e726
7
+ data.tar.gz: 9ae23e25a7a6adfd68b117ad221a3d7bceea8d13f78cecae36a5457f7e5f4876640a0faa5b4612236cb9ba9593edceecfccb86d834105d69fb98b8e5ef6c3a87
@@ -64,6 +64,9 @@ module Glib::Json::Traversal
64
64
  # Generic view children
65
65
  traverse_multiple view['childViews'], block
66
66
 
67
+ # Generic menu buttons
68
+ traverse_multiple view['buttons'], block
69
+
67
70
  # Split panel
68
71
  traverse_vertical_content view['left'], block
69
72
  traverse_vertical_content view['center'], block
@@ -8,8 +8,7 @@ class Glib::JsonUi::ViewBuilder
8
8
  singleton_array :styleClass, :styleClasses
9
9
  end
10
10
 
11
- # TODO: Implement
12
- class Options < View
11
+ class Select < View
13
12
  icon :icon
14
13
  string :message
15
14
  singleton_array :styleClass, :styleClasses
@@ -7,10 +7,10 @@ section.rows builder: ->(template) do
7
7
  template.thumbnail title: 'sheets/select', onClick: ->(action) do
8
8
  action.sheets_select message: 'Select one', buttons: ->(menu) do
9
9
  menu.button text: 'Option1', onClick: ->(subaction) do
10
- action.dialogs_alert message: 'Option 1'
10
+ subaction.dialogs_alert message: 'Option 1'
11
11
  end
12
12
  menu.button text: 'Option2', onClick: ->(subaction) do
13
- action.dialogs_alert message: 'Option 2'
13
+ subaction.dialogs_alert message: 'Option 2'
14
14
  end
15
15
  menu.button text: 'Cancel'
16
16
  end
@@ -0,0 +1,49 @@
1
+ json.title 'Panels'
2
+
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.h1 text: 'Basic'
8
+ scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
9
+ panel.button text: '1'
10
+ panel.button text: '2'
11
+ panel.button text: '3'
12
+ panel.button text: '4'
13
+ panel.button text: '5'
14
+ panel.button text: '6'
15
+ panel.button text: '7'
16
+ end
17
+
18
+ scroll.label text: "\n"
19
+ scroll.h1 text: 'Spacers'
20
+ scroll.panels_flow width: 300, backgroundColor: '#b3bac2', childViews: ->(panel) do
21
+ panel.button text: '1'
22
+ panel.spacer width: 30
23
+ panel.button text: '2'
24
+ panel.spacer width: 30
25
+ panel.button text: '3'
26
+ panel.spacer width: 30
27
+ panel.button text: '4'
28
+ panel.spacer width: 30
29
+ panel.button text: '5'
30
+ end
31
+
32
+ # scroll.label text: "\n"
33
+ # scroll.h1 text: 'Alignments'
34
+ # scroll.panels_horizontal align: 'top', childViews: ->(panel) do
35
+ # panel.button height: 50, text: 'Button'
36
+ # panel.spacer width: 10
37
+ # panel.label text: 'top'
38
+ # end
39
+ # scroll.panels_horizontal align: 'middle', childViews: ->(panel) do
40
+ # panel.button height: 50, text: 'Button'
41
+ # panel.spacer width: 10
42
+ # panel.label text: 'middle'
43
+ # end
44
+ # scroll.panels_horizontal align: 'bottom', childViews: ->(panel) do
45
+ # panel.button height: 50, text: 'Button'
46
+ # panel.spacer width: 10
47
+ # panel.label text: 'bottom'
48
+ # end
49
+ end
@@ -73,17 +73,17 @@ json_ui_page json do |page|
73
73
  scroll.label text: "\n"
74
74
  scroll.h1 text: 'Alignments'
75
75
  scroll.panels_horizontal align: 'top', childViews: ->(panel) do
76
- panel.button text: 'Button'
76
+ panel.button height: 50, text: 'Button'
77
77
  panel.spacer width: 10
78
78
  panel.label text: 'top'
79
79
  end
80
80
  scroll.panels_horizontal align: 'middle', childViews: ->(panel) do
81
- panel.button text: 'Button'
81
+ panel.button height: 50, text: 'Button'
82
82
  panel.spacer width: 10
83
83
  panel.label text: 'middle'
84
84
  end
85
85
  scroll.panels_horizontal align: 'bottom', childViews: ->(panel) do
86
- panel.button text: 'Button'
86
+ panel.button height: 50, text: 'Button'
87
87
  panel.spacer width: 10
88
88
  panel.label text: 'bottom'
89
89
  end
@@ -18,6 +18,9 @@ json_ui_page json do |page|
18
18
  template.thumbnail title: 'Horizontal', subtitle: 'Arrange child components horizontally', onClick: ->(action) do
19
19
  action.windows_open url: json_ui_garage_url(path: 'panels/horizontal')
20
20
  end
21
+ template.thumbnail title: 'Flow', subtitle: 'Arrange components in a left-to-right flow, much like lines of text in a paragraph', onClick: ->(action) do
22
+ action.windows_open url: json_ui_garage_url(path: 'panels/flow')
23
+ end
21
24
  template.thumbnail title: 'Carousel', subtitle: 'Arrange child components horizontally in a carousel', onClick: ->(action) do
22
25
  action.windows_open url: json_ui_garage_url(path: 'panels/carousel')
23
26
  end
@@ -104,7 +104,7 @@ json_ui_page json do |page|
104
104
  left.button text: 'L'
105
105
  end
106
106
  content.center childViews: ->(center) do
107
- center.panels_horizontal childViews: ->(h) do
107
+ center.panels_flow width: 'matchParent', backgroundColor: '#b3bac2', childViews: ->(h) do
108
108
  (1..20).each do |index|
109
109
  h.button text: index
110
110
  end
@@ -6,15 +6,30 @@ json_ui_page json do |page|
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
7
 
8
8
  scroll.spacer height: 20
9
- scroll.h2 text: 'Alert banner'
9
+ scroll.h2 text: 'Basic'
10
10
  scroll.spacer height: 6
11
11
  scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner'
12
12
 
13
13
  scroll.spacer height: 20
14
- scroll.h2 text: 'Alert banner with color styling'
14
+ scroll.h2 text: 'With color styling'
15
15
  scroll.spacer height: 6
16
16
  scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner', styleClass: 'success'
17
17
 
18
+ scroll.spacer height: 20
19
+ scroll.h2 text: 'With select options'
20
+ scroll.spacer height: 6
21
+ scroll.banners_select width: 'matchParent', icon: 'info', message: 'This is a select banner', buttons: ->(menu) do
22
+ menu.button text: 'Option1', onClick: ->(action) do
23
+ action.dialogs_alert message: 'Option 1'
24
+ end
25
+ menu.button text: 'Option2', onClick: ->(action) do
26
+ action.dialogs_alert message: 'Option 2'
27
+ end
28
+ menu.button text: 'Option3', onClick: ->(action) do
29
+ action.dialogs_alert message: 'Option 3'
30
+ end
31
+ end
32
+
18
33
  scroll.spacer height: 20
19
34
  scroll.h2 text: 'Alert banner with frameless styling (Experimental)'
20
35
  scroll.spacer height: 6
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.29
4
+ version: 0.4.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -147,6 +147,7 @@ files:
147
147
  - app/views/json_ui/garage/panels/card.json.jbuilder
148
148
  - app/views/json_ui/garage/panels/carousel.json.jbuilder
149
149
  - app/views/json_ui/garage/panels/custom.json.jbuilder
150
+ - app/views/json_ui/garage/panels/flow.json.jbuilder
150
151
  - app/views/json_ui/garage/panels/horizontal.json.jbuilder
151
152
  - app/views/json_ui/garage/panels/index.json.jbuilder
152
153
  - app/views/json_ui/garage/panels/responsive.json.jbuilder