Module: Ruflet::UI::MaterialControlMethods
- Included in:
- ControlMethods
- Defined in:
- lib/ruflet_ui/ruflet/ui/material_control_methods.rb
Instance Method Summary collapse
- #alert_dialog(**props) ⇒ Object
- #alertdialog(**props) ⇒ Object
- #app_bar(**props) ⇒ Object
- #appbar(**props) ⇒ Object
- #bar_chart(**props) ⇒ Object
- #bar_chart_group(**props) ⇒ Object
- #bar_chart_rod(**props) ⇒ Object
- #bar_chart_rod_stack_item(**props) ⇒ Object
- #barchart(**props) ⇒ Object
- #barchartgroup(**props) ⇒ Object
- #barchartrod(**props) ⇒ Object
- #barchartrodstackitem(**props) ⇒ Object
- #bottom_sheet(**props) ⇒ Object
- #bottomsheet(**props) ⇒ Object
- #button(**props) ⇒ Object
- #candlestick_chart(**props) ⇒ Object
- #candlestick_chart_spot(**props) ⇒ Object
- #candlestickchart(**props) ⇒ Object
- #candlestickchartspot(**props) ⇒ Object
- #center(**props, &block) ⇒ Object
- #chart_axis(**props) ⇒ Object
- #chart_axis_label(**props) ⇒ Object
- #chartaxis(**props) ⇒ Object
- #chartaxislabel(**props) ⇒ Object
- #checkbox(**props) ⇒ Object
- #clipboard(**props) ⇒ Object
- #column(**props, &block) ⇒ Object
- #container(**props, &block) ⇒ Object
- #drag_target(**props, &block) ⇒ Object
- #draggable(**props, &block) ⇒ Object
- #dragtarget(**props, &block) ⇒ Object
-
#elevated_button(**props) ⇒ Object
Ruflet currently uses a single Material button control schema.
- #fab(content = nil, **props) ⇒ Object
- #filled_button(**props) ⇒ Object
- #filledbutton(**props) ⇒ Object
- #floating_action_button(**props) ⇒ Object
- #floatingactionbutton(**props) ⇒ Object
- #gesture_detector(**props, &block) ⇒ Object
- #gesturedetector(**props, &block) ⇒ Object
- #grid_view(**props, &block) ⇒ Object
- #gridview(**props, &block) ⇒ Object
- #icon(**props) ⇒ Object
- #icon_button(**props) ⇒ Object
- #iconbutton(**props) ⇒ Object
- #image(src = nil, src_base64: nil, placeholder_src: nil, **props) ⇒ Object
- #line_chart(**props) ⇒ Object
- #line_chart_data(**props) ⇒ Object
- #line_chart_data_point(**props) ⇒ Object
- #linechart(**props) ⇒ Object
- #linechartdata(**props) ⇒ Object
- #linechartdatapoint(**props) ⇒ Object
- #markdown(value = nil, **props) ⇒ Object
- #navigation_bar(**props, &block) ⇒ Object
- #navigation_bar_destination(**props, &block) ⇒ Object
- #navigationbar(**props, &block) ⇒ Object
- #navigationbardestination(**props, &block) ⇒ Object
- #pie_chart(**props) ⇒ Object
- #pie_chart_section(**props) ⇒ Object
- #piechart(**props) ⇒ Object
- #piechartsection(**props) ⇒ Object
- #radar_chart(**props) ⇒ Object
- #radar_chart_title(**props) ⇒ Object
- #radar_data_set(**props) ⇒ Object
- #radar_data_set_entry(**props) ⇒ Object
- #radarchart(**props) ⇒ Object
- #radarcharttitle(**props) ⇒ Object
- #radardataset(**props) ⇒ Object
- #radardatasetentry(**props) ⇒ Object
- #radio(**props) ⇒ Object
- #radio_group(**props) ⇒ Object
- #radiogroup(**props) ⇒ Object
- #row(**props, &block) ⇒ Object
- #scatter_chart(**props) ⇒ Object
- #scatter_chart_spot(**props) ⇒ Object
- #scatterchart(**props) ⇒ Object
- #scatterchartspot(**props) ⇒ Object
- #snack_bar(**props) ⇒ Object
- #snackbar(**props) ⇒ Object
- #stack(**props, &block) ⇒ Object
- #tab(**props, &block) ⇒ Object
- #tab_bar(**props, &block) ⇒ Object
- #tab_bar_view(**props, &block) ⇒ Object
- #tabbar(**props, &block) ⇒ Object
- #tabbarview(**props, &block) ⇒ Object
- #tabs(**props, &block) ⇒ Object
- #text(value = nil, **props) ⇒ Object
- #text_button(**props) ⇒ Object
- #text_field(**props) ⇒ Object
- #textbutton(**props) ⇒ Object
- #textfield(**props) ⇒ Object
- #url_launcher(**props) ⇒ Object
- #view(**props, &block) ⇒ Object
- #web_view(**props) ⇒ Object
- #webview(**props) ⇒ Object
Instance Method Details
#alert_dialog(**props) ⇒ Object
62 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 62 def alert_dialog(**props) = (:alertdialog, **props) |
#alertdialog(**props) ⇒ Object
63 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 63 def alertdialog(**props) = alert_dialog(**props) |
#app_bar(**props) ⇒ Object
85 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 85 def (**props) = (:appbar, **props) |
#appbar(**props) ⇒ Object
86 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 86 def (**props) = (**props) |
#bar_chart(**props) ⇒ Object
101 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 101 def (**props) = (:barchart, **props) |
#bar_chart_group(**props) ⇒ Object
103 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 103 def (**props) = (:barchartgroup, **props) |
#bar_chart_rod(**props) ⇒ Object
105 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 105 def (**props) = (:barchartrod, **props) |
#bar_chart_rod_stack_item(**props) ⇒ Object
107 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 107 def (**props) = (:barchartrodstackitem, **props) |
#barchart(**props) ⇒ Object
102 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 102 def (**props) = (**props) |
#barchartgroup(**props) ⇒ Object
104 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 104 def (**props) = (**props) |
#barchartrod(**props) ⇒ Object
106 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 106 def (**props) = (**props) |
#barchartrodstackitem(**props) ⇒ Object
108 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 108 def (**props) = (**props) |
#bottom_sheet(**props) ⇒ Object
66 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 66 def bottom_sheet(**props) = (:bottomsheet, **props) |
#bottomsheet(**props) ⇒ Object
67 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 67 def bottomsheet(**props) = bottom_sheet(**props) |
#button(**props) ⇒ Object
45 46 47 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 45 def (**props) = (:button, **props) # Ruflet currently uses a single Material button control schema. # Keep elevated_button DSL available by routing to :button. |
#candlestick_chart(**props) ⇒ Object
119 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 119 def candlestick_chart(**props) = (:candlestickchart, **props) |
#candlestick_chart_spot(**props) ⇒ Object
121 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 121 def candlestick_chart_spot(**props) = (:candlestickchartspot, **props) |
#candlestickchart(**props) ⇒ Object
120 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 120 def candlestickchart(**props) = candlestick_chart(**props) |
#candlestickchartspot(**props) ⇒ Object
122 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 122 def candlestickchartspot(**props) = candlestick_chart_spot(**props) |
#center(**props, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 9 def center(**props, &block) mapped = props.dup defaults = { expand: true, alignment: { x: 0, y: 0 } } if block nested = WidgetBuilder.new block_result = nested.instance_eval(&block) child = if nested.children.any? nested.children.first elsif block_result.is_a?(Ruflet::Control) block_result end mapped[:content] = child if child end (:container, **normalize_container_props(defaults.merge(mapped))) end |
#chart_axis(**props) ⇒ Object
135 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 135 def chart_axis(**props) = (:chartaxis, **props) |
#chart_axis_label(**props) ⇒ Object
137 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 137 def chart_axis_label(**props) = (:chartaxislabel, **props) |
#chartaxis(**props) ⇒ Object
136 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 136 def chartaxis(**props) = chart_axis(**props) |
#chartaxislabel(**props) ⇒ Object
138 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 138 def chartaxislabel(**props) = chart_axis_label(**props) |
#checkbox(**props) ⇒ Object
58 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 58 def checkbox(**props) = (:checkbox, **props) |
#clipboard(**props) ⇒ Object
88 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 88 def clipboard(**props) = (:clipboard, **props) |
#column(**props, &block) ⇒ Object
7 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 7 def column(**props, &block) = (:column, **props, &block) |
#container(**props, &block) ⇒ Object
32 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 32 def container(**props, &block) = (:container, **normalize_container_props(props), &block) |
#drag_target(**props, &block) ⇒ Object
36 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 36 def drag_target(**props, &block) = (:dragtarget, **props, &block) |
#draggable(**props, &block) ⇒ Object
35 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 35 def draggable(**props, &block) = (:draggable, **props, &block) |
#dragtarget(**props, &block) ⇒ Object
37 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 37 def dragtarget(**props, &block) = drag_target(**props, &block) |
#elevated_button(**props) ⇒ Object
Ruflet currently uses a single Material button control schema. Keep elevated_button DSL available by routing to :button.
48 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 48 def (**props) = (:button, **props) |
#fab(content = nil, **props) ⇒ Object
142 143 144 145 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 142 def fab(content = nil, **props) mapped = normalize_fab_props(props.dup, content) (:floatingactionbutton, **mapped) end |
#filled_button(**props) ⇒ Object
51 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 51 def (**props) = (:filledbutton, **props) |
#filledbutton(**props) ⇒ Object
52 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 52 def (**props) = (**props) |
#floating_action_button(**props) ⇒ Object
89 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 89 def (**props) = (:floatingactionbutton, **props) |
#floatingactionbutton(**props) ⇒ Object
90 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 90 def (**props) = (**props) |
#gesture_detector(**props, &block) ⇒ Object
33 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 33 def gesture_detector(**props, &block) = (:gesturedetector, **props, &block) |
#gesturedetector(**props, &block) ⇒ Object
34 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 34 def gesturedetector(**props, &block) = gesture_detector(**props, &block) |
#grid_view(**props, &block) ⇒ Object
30 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 30 def grid_view(**props, &block) = (:gridview, **props, &block) |
#gridview(**props, &block) ⇒ Object
31 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 31 def gridview(**props, &block) = grid_view(**props, &block) |
#icon(**props) ⇒ Object
75 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 75 def icon(**props) = (:icon, **props) |
#icon_button(**props) ⇒ Object
54 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 54 def (**props) = (:iconbutton, **props) |
#iconbutton(**props) ⇒ Object
55 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 55 def (**props) = (**props) |
#image(src = nil, src_base64: nil, placeholder_src: nil, **props) ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 77 def image(src = nil, src_base64: nil, placeholder_src: nil, **props) mapped = props.dup mapped[:src] = normalize_image_source(src) unless src.nil? mapped[:src] = normalize_image_source(src_base64) if mapped[:src].nil? && !src_base64.nil? mapped[:placeholder_src] = normalize_image_source(placeholder_src) unless placeholder_src.nil? (:image, **mapped) end |
#line_chart(**props) ⇒ Object
109 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 109 def line_chart(**props) = (:linechart, **props) |
#line_chart_data(**props) ⇒ Object
111 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 111 def line_chart_data(**props) = (:linechartdata, **props) |
#line_chart_data_point(**props) ⇒ Object
113 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 113 def line_chart_data_point(**props) = (:linechartdatapoint, **props) |
#linechart(**props) ⇒ Object
110 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 110 def linechart(**props) = line_chart(**props) |
#linechartdata(**props) ⇒ Object
112 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 112 def linechartdata(**props) = line_chart_data(**props) |
#linechartdatapoint(**props) ⇒ Object
114 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 114 def linechartdatapoint(**props) = line_chart_data_point(**props) |
#markdown(value = nil, **props) ⇒ Object
69 70 71 72 73 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 69 def markdown(value = nil, **props) mapped = props.dup mapped[:value] = value unless value.nil? (:markdown, **mapped) end |
#navigation_bar(**props, &block) ⇒ Object
97 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 97 def (**props, &block) = (:navigationbar, **props, &block) |
#navigation_bar_destination(**props, &block) ⇒ Object
99 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 99 def (**props, &block) = (:navigationbardestination, **props, &block) |
#navigationbar(**props, &block) ⇒ Object
98 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 98 def (**props, &block) = (**props, &block) |
#navigationbardestination(**props, &block) ⇒ Object
100 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 100 def (**props, &block) = (**props, &block) |
#pie_chart(**props) ⇒ Object
115 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 115 def pie_chart(**props) = (:piechart, **props) |
#pie_chart_section(**props) ⇒ Object
117 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 117 def pie_chart_section(**props) = (:piechartsection, **props) |
#piechart(**props) ⇒ Object
116 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 116 def piechart(**props) = pie_chart(**props) |
#piechartsection(**props) ⇒ Object
118 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 118 def piechartsection(**props) = pie_chart_section(**props) |
#radar_chart(**props) ⇒ Object
123 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 123 def radar_chart(**props) = (:radarchart, **props) |
#radar_chart_title(**props) ⇒ Object
125 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 125 def radar_chart_title(**props) = (:radarcharttitle, **props) |
#radar_data_set(**props) ⇒ Object
127 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 127 def radar_data_set(**props) = (:radardataset, **props) |
#radar_data_set_entry(**props) ⇒ Object
129 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 129 def radar_data_set_entry(**props) = (:radardatasetentry, **props) |
#radarchart(**props) ⇒ Object
124 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 124 def radarchart(**props) = radar_chart(**props) |
#radarcharttitle(**props) ⇒ Object
126 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 126 def radarcharttitle(**props) = radar_chart_title(**props) |
#radardataset(**props) ⇒ Object
128 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 128 def radardataset(**props) = radar_data_set(**props) |
#radardatasetentry(**props) ⇒ Object
130 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 130 def radardatasetentry(**props) = radar_data_set_entry(**props) |
#radio(**props) ⇒ Object
59 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 59 def radio(**props) = (:radio, **props) |
#radio_group(**props) ⇒ Object
60 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 60 def radio_group(**props) = (:radiogroup, **props) |
#radiogroup(**props) ⇒ Object
61 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 61 def radiogroup(**props) = radio_group(**props) |
#row(**props, &block) ⇒ Object
28 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 28 def row(**props, &block) = (:row, **props, &block) |
#scatter_chart(**props) ⇒ Object
131 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 131 def scatter_chart(**props) = (:scatterchart, **props) |
#scatter_chart_spot(**props) ⇒ Object
133 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 133 def scatter_chart_spot(**props) = (:scatterchartspot, **props) |
#scatterchart(**props) ⇒ Object
132 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 132 def scatterchart(**props) = scatter_chart(**props) |
#scatterchartspot(**props) ⇒ Object
134 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 134 def scatterchartspot(**props) = scatter_chart_spot(**props) |
#snack_bar(**props) ⇒ Object
64 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 64 def (**props) = (:snackbar, **props) |
#snackbar(**props) ⇒ Object
65 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 65 def (**props) = (**props) |
#stack(**props, &block) ⇒ Object
29 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 29 def stack(**props, &block) = (:stack, **props, &block) |
#tab(**props, &block) ⇒ Object
92 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 92 def tab(**props, &block) = (:tab, **props, &block) |
#tab_bar(**props, &block) ⇒ Object
93 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 93 def (**props, &block) = (:tabbar, **props, &block) |
#tab_bar_view(**props, &block) ⇒ Object
95 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 95 def (**props, &block) = (:tabbarview, **props, &block) |
#tabbar(**props, &block) ⇒ Object
94 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 94 def (**props, &block) = (**props, &block) |
#tabbarview(**props, &block) ⇒ Object
96 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 96 def (**props, &block) = (**props, &block) |
#tabs(**props, &block) ⇒ Object
91 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 91 def tabs(**props, &block) = (:tabs, **props, &block) |
#text(value = nil, **props) ⇒ Object
39 40 41 42 43 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 39 def text(value = nil, **props) mapped = props.dup mapped[:value] = value unless value.nil? (:text, **mapped) end |
#text_button(**props) ⇒ Object
49 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 49 def (**props) = (:textbutton, **props) |
#text_field(**props) ⇒ Object
56 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 56 def text_field(**props) = (:textfield, **props) |
#textbutton(**props) ⇒ Object
50 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 50 def (**props) = (**props) |
#textfield(**props) ⇒ Object
57 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 57 def textfield(**props) = text_field(**props) |
#url_launcher(**props) ⇒ Object
87 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 87 def url_launcher(**props) = (:url_launcher, **props) |
#view(**props, &block) ⇒ Object
6 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 6 def view(**props, &block) = (:view, **props, &block) |
#web_view(**props) ⇒ Object
139 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 139 def web_view(**props) = (:webview, **props) |
#webview(**props) ⇒ Object
140 |
# File 'lib/ruflet_ui/ruflet/ui/material_control_methods.rb', line 140 def webview(**props) = web_view(**props) |