glib-web 4.10.0 → 4.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfd1804082f7f14167a579c42e2d1bde31ad7dbd928bc764ca3de0ba0259ad99
4
- data.tar.gz: 1cde932d484baa31d4074ce52bdf5d955c51fc70008016b8bbcb6ead85746107
3
+ metadata.gz: ddb48299bbf1685aed5b8fd994ca3ffc8eba555e097cc77dbd38cb7b48707e6c
4
+ data.tar.gz: 8569bc0e88d99f4dae7e1d2be733168e2ee7f0acd499e565a5fef0cca2a50ca9
5
5
  SHA512:
6
- metadata.gz: 73d15de9c4abe80f6148b67b328ac4c4ece94231900a62c3fcddabd06db453efb462ef296659dfdd8f36674e353815c58dd4a4d337ab15f07385eaa96e2a09e0
7
- data.tar.gz: aea3aba2adb595aa2eaaef5275b2bf6b8e1b04731b910678c651d1f170ae1e2127035735955c30bf4d8e7238491fabdb236f9f9b6531239a77f639c799460599
6
+ metadata.gz: 328b8d4f45b8cd8a0e99029f5edfe0e20469e860a27282cf26a7173a7538b8bfb2310ba8b877c53ac05ac963c395f32767c69e25f568a7c67db262ea58ccc144
7
+ data.tar.gz: 5f1b8c282c4c82aa77474304f584e22426188b04135af2387da8ee0099cc2eef85e527333966d439fa511aa14ef5a32d6bf3301d040ed9eb38e9f79066fe4991
@@ -494,6 +494,14 @@ class Glib::JsonUi::ViewBuilder
494
494
 
495
495
  class Flow < View
496
496
  hash :innerPadding, optional: [:top, :right, :bottom, :left, :x, :y]
497
+
498
+ hash :xxl, optional: [:gap, :padding]
499
+ hash :xl, optional: [:gap, :padding]
500
+ hash :lg, optional: [:gap, :padding]
501
+ hash :md, optional: [:gap, :padding]
502
+ hash :sm, optional: [:gap, :padding]
503
+ hash :xs, optional: [:gap, :padding]
504
+
497
505
  views :childViews
498
506
 
499
507
  required :innerPadding
@@ -93,6 +93,72 @@ page.form \
93
93
  form.spacer height: 10
94
94
  form.label id: 'label22', text: 'Is Checked22'
95
95
 
96
+ form.spacer height: 20
97
+ form.h1 text: 'Radio inside panels'
98
+
99
+ form.fields_radioGroup \
100
+ name: 'user[radio9]',
101
+ value: 'no',
102
+ width: 'matchParent',
103
+ onChangeAndLoad: ->(action) do
104
+ action.runMultiple childActions: ->(saction) do
105
+ saction.logics_set targetId: 'radiolabel1', conditionalData: {
106
+ displayed: {
107
+ "==": [
108
+ {
109
+ "var": 'user[radio9]'
110
+ },
111
+ 'yes'
112
+ ]
113
+ }
114
+ }
115
+ saction.logics_set targetId: 'radiolabel2', conditionalData: {
116
+ displayed: {
117
+ "==": [
118
+ {
119
+ "var": 'user[radio9]'
120
+ },
121
+ 'no'
122
+ ]
123
+ }
124
+ }
125
+ end
126
+ end,
127
+ childViews: ->(group) do
128
+ group.panels_responsive width: 'matchParent', childViews: ->(res) do
129
+
130
+ res.panels_column width: 'matchParent', lg: { cols: 4 }, childViews: ->(column) do
131
+ column.fields_radio\
132
+ width: 350,
133
+ value: 'yes', label: 'Yes', icon: { template: 'featured', name: 'edit', size: 40, color: '#d1d1d1' },
134
+ onClick: ->(action) do
135
+ action.windows_openWeb url: 'http://www.google.com'
136
+ end
137
+ end
138
+ res.panels_column width: 'matchParent', lg: { cols: 4 }, childViews: ->(column) do
139
+ column.fields_radio\
140
+ width: 350,
141
+ value: 'no', label: 'No',
142
+ image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 },
143
+ onClick: ->(action) do
144
+ action.windows_openWeb url: 'http://www.google.com'
145
+ end
146
+ end
147
+ res.panels_column width: 'matchParent', lg: { cols: 4 }, childViews: ->(column) do
148
+ column.fields_radio\
149
+ value: 'idk', label: 'Not Sure',
150
+ image: { template: 'thumbnail', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 24, height: 24 }
151
+ column.fields_radio value: '', label: 'Empty'
152
+ end
153
+
154
+ end
155
+ end
156
+
157
+
158
+ form.spacer height: 10
159
+ form.label id: 'radiolabel1', text: 'Yes'
160
+ form.label id: 'radiolabel2', text: 'No'
161
+
96
162
  form.spacer height: 20
97
163
  form.h1 text: 'Radio Group'
98
164
  form.fields_radioGroup \
@@ -123,15 +189,19 @@ page.form \
123
189
  end
124
190
  end,
125
191
  childViews: ->(group) do
126
- group.fields_radio\
127
- value: 'show', label: 'Show', icon: { template: 'featured', name: 'edit', size: 40, color: '#d1d1d1' }
128
- group.fields_radio\
129
- value: 'hide', label: 'Hide',
130
- image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 }
131
- group.fields_radio\
132
- value: 'no', label: 'No',
133
- image: { template: 'thumbnail', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 24, height: 24 }
134
- group.fields_radio value: '', label: 'Empty'
192
+ # TODO: Fix a bug where if the fields_radio is wrapped in panels_horizontal,
193
+ # it cannot be selected.
194
+ group.panels_horizontal childViews: ->(horizontal) do
195
+ horizontal.fields_radio\
196
+ value: 'show', label: 'Show', icon: { template: 'featured', name: 'edit', size: 40, color: '#d1d1d1' }
197
+ horizontal.fields_radio\
198
+ value: 'hide', label: 'Hide',
199
+ image: { template: 'featured', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 80, height: 80 }
200
+ horizontal.fields_radio\
201
+ value: 'no', label: 'No',
202
+ image: { template: 'thumbnail', url: 'https://cdn.pixabay.com/photo/2020/08/05/13/12/eco-5465432_1280.png', width: 24, height: 24 }
203
+ horizontal.fields_radio value: '', label: 'Empty'
204
+ end
135
205
  end
136
206
  form.spacer height: 10
137
207
  form.label id: 'label6', text: 'Chosen'
@@ -5,11 +5,17 @@ render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
7
  scroll.h1 text: 'Show/hide'
8
- scroll.panels_flow id: 'flow1', width: 300, innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
9
- panel.button text: '1'
10
- panel.button text: '2'
11
- panel.button text: '3'
12
- end
8
+ scroll.panels_flow\
9
+ sm: { gap: { y: 4, x: 6 }, padding: { all: 16 } },
10
+ md: { gap: { y: 8, x: 8 }, padding: { x: 30, y: 30 } },
11
+ xs: { gap: { y: 2, x: 2 }, padding: { left: 10, bottom: 8 } },
12
+ lg: { gap: { all: 32 } },
13
+ id: 'flow1', width: 300,
14
+ innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
15
+ panel.button text: '1'
16
+ panel.button text: '2'
17
+ panel.button text: '3'
18
+ end
13
19
  scroll.button text: 'show', onClick: ->(action) do
14
20
  action.components_set targetId: 'flow1', data: { displayed: true }
15
21
  end
@@ -18,15 +24,17 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
18
24
  end
19
25
 
20
26
  scroll.h1 text: 'Basic'
21
- scroll.panels_flow width: 300, innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
22
- panel.button text: '1'
23
- panel.button text: '2'
24
- panel.button text: '3'
25
- panel.button text: '4'
26
- panel.button text: '5'
27
- panel.button text: '6'
28
- panel.button text: '7'
29
- end
27
+ scroll.panels_flow\
28
+ md: { padding: { all: 8 } },
29
+ width: 300, innerPadding: { top: 0 }, backgroundColor: '#b3bac2', childViews: ->(panel) do
30
+ panel.button text: '1'
31
+ panel.button text: '2'
32
+ panel.button text: '3'
33
+ panel.button text: '4'
34
+ panel.button text: '5'
35
+ panel.button text: '6'
36
+ panel.button text: '7'
37
+ end
30
38
 
31
39
  scroll.label text: "\n"
32
40
  scroll.h1 text: 'Spacers'
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: 4.10.0
4
+ version: 4.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''