ruflet_core 0.0.17 → 0.0.18
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 +4 -4
- data/README.md +2 -30
- data/lib/ruflet/version.rb +1 -1
- data/lib/ruflet_core.rb +9 -7
- data/lib/ruflet_protocol/ruflet/protocol.rb +28 -54
- data/lib/ruflet_ui/ruflet/app.rb +1 -1
- data/lib/ruflet_ui/ruflet/colors.rb +4 -50
- data/lib/ruflet_ui/ruflet/control.rb +69 -64
- data/lib/ruflet_ui/ruflet/dsl.rb +10 -3
- data/lib/ruflet_ui/ruflet/icons/cupertino/cupertino_icons.rb +2 -2
- data/lib/ruflet_ui/ruflet/icons/cupertino_icon_lookup.rb +1 -0
- data/lib/ruflet_ui/ruflet/icons/icon_constant_names.rb +29 -0
- data/lib/ruflet_ui/ruflet/icons/material/material_icons.rb +2 -2
- data/lib/ruflet_ui/ruflet/icons/material_icon_lookup.rb +1 -0
- data/lib/ruflet_ui/ruflet/page.rb +308 -526
- data/lib/ruflet_ui/ruflet/ui/control_factory.rb +68 -12
- data/lib/ruflet_ui/ruflet/ui/control_registry.rb +13 -6
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheet_control.rb +8 -45
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactionsheetaction_control.rb +45 -2
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoactivityindicator_control.rb +43 -2
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoalertdialog_control.rb +0 -5
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinobutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocheckbox_control.rb +56 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenu_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinocontextmenuaction_control.rb +1 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodatepicker_control.rb +53 -8
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinodialogaction_control.rb +1 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinofilledbutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinolisttile_control.rb +54 -9
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinonavigationbar_control.rb +47 -9
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinopicker_control.rb +52 -10
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoradio_control.rb +52 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinosegmentedbutton_control.rb +49 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslider_control.rb +50 -5
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoslidingsegmentedbutton_control.rb +46 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinoswitch_control.rb +61 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotextfield_control.rb +145 -1
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotimerpicker_control.rb +47 -12
- data/lib/ruflet_ui/ruflet/ui/controls/cupertinos/cupertinotintedbutton_control.rb +59 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/alertdialog_control.rb +8 -45
- data/lib/ruflet_ui/ruflet/ui/controls/materials/appbar_control.rb +8 -40
- data/lib/ruflet_ui/ruflet/ui/controls/materials/audio_control.rb +16 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/autocomplete_control.rb +44 -1
- data/lib/ruflet_ui/ruflet/ui/controls/materials/badge_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/banner_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomappbar_control.rb +8 -47
- data/lib/ruflet_ui/ruflet/ui/controls/materials/bottomsheet_control.rb +0 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/button_control.rb +8 -54
- data/lib/ruflet_ui/ruflet/ui/controls/materials/card_control.rb +8 -50
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chart_controls.rb +19 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/checkbox_control.rb +9 -60
- data/lib/ruflet_ui/ruflet/ui/controls/materials/chip_control.rb +7 -81
- data/lib/ruflet_ui/ruflet/ui/controls/materials/circleavatar_control.rb +7 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/container_control.rb +9 -65
- data/lib/ruflet_ui/ruflet/ui/controls/materials/contextmenu_control.rb +50 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacell_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datacolumn_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datatable_control.rb +7 -88
- data/lib/ruflet_ui/ruflet/ui/controls/materials/datepicker_control.rb +9 -55
- data/lib/ruflet_ui/ruflet/ui/controls/materials/daterangepicker_control.rb +8 -58
- data/lib/ruflet_ui/ruflet/ui/controls/materials/divider_control.rb +0 -9
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdown_control.rb +8 -93
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownm2_control.rb +9 -103
- data/lib/ruflet_ui/ruflet/ui/controls/materials/dropdownoption_control.rb +0 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanel_control.rb +7 -51
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansionpanellist_control.rb +46 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/expansiontile_control.rb +69 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledbutton_control.rb +54 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/fillediconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonalbutton_control.rb +54 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/filledtonaliconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/floatingactionbutton_control.rb +7 -69
- data/lib/ruflet_ui/ruflet/ui/controls/materials/iconbutton_control.rb +8 -68
- data/lib/ruflet_ui/ruflet/ui/controls/materials/listtile_control.rb +8 -74
- data/lib/ruflet_ui/ruflet/ui/controls/materials/map_control.rb +99 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/menuitembutton_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationbar_control.rb +7 -59
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationdrawer_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/navigationrail_control.rb +7 -73
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinedbutton_control.rb +51 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/outlinediconbutton_control.rb +67 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenubutton_control.rb +8 -61
- data/lib/ruflet_ui/ruflet/ui/controls/materials/popupmenuitem_control.rb +0 -6
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressbar_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/progressring_control.rb +8 -56
- data/lib/ruflet_ui/ruflet/ui/controls/materials/radio_control.rb +9 -54
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rangeslider_control.rb +7 -62
- data/lib/ruflet_ui/ruflet/ui/controls/materials/reorderablelistview_control.rb +9 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/ruflet_controls.rb +5 -26
- data/lib/ruflet_ui/ruflet/ui/controls/materials/searchbar_control.rb +80 -11
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segment_control.rb +0 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/segmentedbutton_control.rb +7 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/selectionarea_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/materials/slider_control.rb +9 -60
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbar_control.rb +37 -4
- data/lib/ruflet_ui/ruflet/ui/controls/materials/snackbaraction_control.rb +38 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/spinkit_control.rb +25 -0
- data/lib/ruflet_ui/ruflet/ui/controls/materials/submenubutton_control.rb +52 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/switch_control.rb +9 -61
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tab_control.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbar_control.rb +8 -64
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabbarview_control.rb +43 -5
- data/lib/ruflet_ui/ruflet/ui/controls/materials/tabs_control.rb +7 -47
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textbutton_control.rb +51 -2
- data/lib/ruflet_ui/ruflet/ui/controls/materials/textfield_control.rb +9 -132
- data/lib/ruflet_ui/ruflet/ui/controls/materials/timepicker_control.rb +10 -34
- data/lib/ruflet_ui/ruflet/ui/controls/materials/verticaldivider_control.rb +0 -9
- data/lib/ruflet_ui/ruflet/ui/controls/materials/video_control.rb +9 -42
- data/lib/ruflet_ui/ruflet/ui/controls/materials/webview_control.rb +1 -114
- data/lib/ruflet_ui/ruflet/ui/controls/ruflet_controls.rb +13 -28
- data/lib/ruflet_ui/ruflet/ui/controls/shared/animatedswitcher_control.rb +46 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/arc_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/browsercontextmenu_control.rb +1 -12
- data/lib/ruflet_ui/ruflet/ui/controls/shared/canvas_control.rb +8 -54
- data/lib/ruflet_ui/ruflet/ui/controls/shared/circle_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/column_control.rb +9 -51
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dismissible_control.rb +52 -12
- data/lib/ruflet_ui/ruflet/ui/controls/shared/draggable_control.rb +1 -7
- data/lib/ruflet_ui/ruflet/ui/controls/shared/dragtarget_control.rb +1 -3
- data/lib/ruflet_ui/ruflet/ui/controls/shared/fletapp_control.rb +9 -46
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gesturedetector_control.rb +9 -113
- data/lib/ruflet_ui/ruflet/ui/controls/shared/gridview_control.rb +57 -13
- data/lib/ruflet_ui/ruflet/ui/controls/shared/hero_control.rb +9 -40
- data/lib/ruflet_ui/ruflet/ui/controls/shared/icon_control.rb +9 -48
- data/lib/ruflet_ui/ruflet/ui/controls/shared/interactiveviewer_control.rb +9 -53
- data/lib/ruflet_ui/ruflet/ui/controls/shared/line_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/listview_control.rb +57 -11
- data/lib/ruflet_ui/ruflet/ui/controls/shared/markdown_control.rb +9 -54
- data/lib/ruflet_ui/ruflet/ui/controls/shared/oval_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/page_control.rb +9 -58
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pagelet_control.rb +9 -48
- data/lib/ruflet_ui/ruflet/ui/controls/shared/pageview_control.rb +50 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/path_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/placeholder_control.rb +44 -9
- data/lib/ruflet_ui/ruflet/ui/controls/shared/points_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/rect_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/reorderabledraghandle_control.rb +43 -4
- data/lib/ruflet_ui/ruflet/ui/controls/shared/responsiverow_control.rb +47 -15
- data/lib/ruflet_ui/ruflet/ui/controls/shared/rotatedbox_control.rb +97 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/row_control.rb +9 -51
- data/lib/ruflet_ui/ruflet/ui/controls/shared/ruflet_controls.rb +5 -0
- data/lib/ruflet_ui/ruflet/ui/controls/shared/safearea_control.rb +48 -4
- data/lib/ruflet_ui/ruflet/ui/{services/ruflet → controls/shared}/screenshot_control.rb +18 -2
- data/lib/ruflet_ui/ruflet/ui/controls/shared/semantics_control.rb +65 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shadermask_control.rb +9 -41
- data/lib/ruflet_ui/ruflet/ui/controls/shared/shimmer_control.rb +9 -44
- data/lib/ruflet_ui/ruflet/ui/controls/shared/stack_control.rb +44 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/text_control.rb +9 -35
- data/lib/ruflet_ui/ruflet/ui/controls/shared/transparentpointer_control.rb +9 -38
- data/lib/ruflet_ui/ruflet/ui/controls/shared/view_control.rb +63 -1
- data/lib/ruflet_ui/ruflet/ui/controls/shared/window_control.rb +40 -66
- data/lib/ruflet_ui/ruflet/ui/controls/shared/windowdragarea_control.rb +45 -4
- data/lib/ruflet_ui/ruflet/ui/material_control_methods.rb +61 -17
- data/lib/ruflet_ui/ruflet/ui/material_control_registry.rb +22 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/accelerometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/audio_recorder_control.rb +14 -36
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/barometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/battery_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/camera_control.rb +9 -42
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/clipboard_control.rb +31 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/connectivity_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/filepicker_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/flashlight_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/geolocator_control.rb +14 -30
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/gyroscope_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/hapticfeedback_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/magnetometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/permissionhandler_control.rb +5 -20
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/screenbrightness_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/securestorage_control.rb +22 -49
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/semanticsservice_control.rb +20 -15
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/shakedetector_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/share_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/sharedpreferences_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/storagepaths_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/urllauncher_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/useraccelerometer_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/wakelock_control.rb +1 -0
- data/lib/ruflet_ui/ruflet/ui/services/ruflet_services.rb +0 -7
- data/lib/ruflet_ui/ruflet/ui/shared_control_forwarders.rb +20 -1
- data/lib/ruflet_ui.rb +12 -10
- metadata +7 -8
- data/lib/ruflet_ui/ruflet/types/animation.rb +0 -110
- data/lib/ruflet_ui/ruflet/ui/controls/materials/codeeditor_control.rb +0 -93
- data/lib/ruflet_ui/ruflet/ui/controls/materials/map_controls.rb +0 -311
- data/lib/ruflet_ui/ruflet/ui/controls/materials/rive_control.rb +0 -87
- data/lib/ruflet_ui/ruflet/ui/controls/materials/spinkit_controls.rb +0 -109
- data/lib/ruflet_ui/ruflet/ui/services/ruflet/tester_control.rb +0 -126
|
@@ -8,54 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "bottomappbar".freeze
|
|
9
9
|
WIRE = "BottomAppBar".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
raise ArgumentError, "bottom_app_bar elevation must be greater than or equal to 0" if !elevation.nil? && elevation.negative?
|
|
11
|
+
KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :border_radius, :bottom, :clip_behavior, :col, :content, :data, :disabled, :elevation, :expand, :expand_loose, :height, :key, :left, :margin, :notch_margin, :offset, :opacity, :padding, :right, :rotate, :rtl, :scale, :shadow_color, :shape, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_size_change].freeze
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
props
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
22
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
23
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
24
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
25
|
-
props[:badge] = badge unless badge.nil?
|
|
26
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
27
|
-
props[:border_radius] = border_radius unless border_radius.nil?
|
|
28
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
29
|
-
props[:clip_behavior] = clip_behavior unless clip_behavior.nil?
|
|
30
|
-
props[:col] = col unless col.nil?
|
|
31
|
-
props[:content] = content unless content.nil?
|
|
32
|
-
props[:data] = data unless data.nil?
|
|
33
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
34
|
-
props[:elevation] = elevation unless elevation.nil?
|
|
35
|
-
props[:expand] = expand unless expand.nil?
|
|
36
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
37
|
-
props[:height] = height unless height.nil?
|
|
38
|
-
props[:key] = key unless key.nil?
|
|
39
|
-
props[:left] = left unless left.nil?
|
|
40
|
-
props[:margin] = margin unless margin.nil?
|
|
41
|
-
props[:notch_margin] = notch_margin unless notch_margin.nil?
|
|
42
|
-
props[:offset] = offset unless offset.nil?
|
|
43
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
44
|
-
props[:padding] = padding unless padding.nil?
|
|
45
|
-
props[:right] = right unless right.nil?
|
|
46
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
47
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
48
|
-
props[:scale] = scale unless scale.nil?
|
|
49
|
-
props[:shadow_color] = shadow_color unless shadow_color.nil?
|
|
50
|
-
props[:shape] = shape unless shape.nil?
|
|
51
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
52
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
53
|
-
props[:top] = top unless top.nil?
|
|
54
|
-
props[:visible] = visible unless visible.nil?
|
|
55
|
-
props[:width] = width unless width.nil?
|
|
56
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
57
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
58
|
-
super(type: TYPE, id: id, **props)
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
59
20
|
end
|
|
60
21
|
end
|
|
61
22
|
end
|
|
@@ -10,9 +10,6 @@ module Ruflet
|
|
|
10
10
|
|
|
11
11
|
def initialize(id: nil, adaptive: nil, animation_style: nil, badge: nil, barrier_color: nil, bgcolor: nil, clip_behavior: nil, col: nil, content: nil, data: nil, disabled: nil, dismissible: nil, draggable: nil, elevation: nil, expand: nil, expand_loose: nil, fullscreen: nil, key: nil, maintain_bottom_view_insets_padding: nil, opacity: nil, open: nil, rtl: nil, scrollable: nil, shape: nil, show_drag_handle: nil, size_constraints: nil, tooltip: nil, use_safe_area: nil, visible: nil, on_dismiss: nil)
|
|
12
12
|
raise ArgumentError, "bottom_sheet requires content" if content.nil?
|
|
13
|
-
unless elevation.nil? || elevation >= 0
|
|
14
|
-
raise ArgumentError, "bottom_sheet elevation must be greater than or equal to 0"
|
|
15
|
-
end
|
|
16
13
|
|
|
17
14
|
props = {}
|
|
18
15
|
props[:adaptive] = adaptive unless adaptive.nil?
|
|
@@ -8,61 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "button".freeze
|
|
9
9
|
WIRE = "Button".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
raise ArgumentError, "button requires content or icon" if content.nil? && icon.nil?
|
|
11
|
+
KEYWORDS = [:adaptive, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bgcolor, :bottom, :clip_behavior, :col, :color, :content, :data, :disabled, :elevation, :expand, :expand_loose, :height, :icon, :icon_color, :key, :left, :margin, :offset, :opacity, :right, :rotate, :rtl, :scale, :size_change_interval, :style, :tooltip, :top, :url, :visible, :width, :on_animation_end, :on_blur, :on_click, :on_focus, :on_hover, :on_long_press, :on_size_change].freeze
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
props
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
props[:animate_position] = animate_position unless animate_position.nil?
|
|
22
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
23
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
24
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
25
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
26
|
-
props[:autofocus] = autofocus unless autofocus.nil?
|
|
27
|
-
props[:badge] = badge unless badge.nil?
|
|
28
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
29
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
30
|
-
props[:clip_behavior] = clip_behavior unless clip_behavior.nil?
|
|
31
|
-
props[:col] = col unless col.nil?
|
|
32
|
-
props[:color] = color unless color.nil?
|
|
33
|
-
props[:content] = content unless content.nil?
|
|
34
|
-
props[:data] = data unless data.nil?
|
|
35
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
36
|
-
props[:elevation] = elevation unless elevation.nil?
|
|
37
|
-
props[:expand] = expand unless expand.nil?
|
|
38
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
39
|
-
props[:height] = height unless height.nil?
|
|
40
|
-
props[:icon] = icon unless icon.nil?
|
|
41
|
-
props[:icon_color] = icon_color unless icon_color.nil?
|
|
42
|
-
props[:key] = key unless key.nil?
|
|
43
|
-
props[:left] = left unless left.nil?
|
|
44
|
-
props[:margin] = margin unless margin.nil?
|
|
45
|
-
props[:offset] = offset unless offset.nil?
|
|
46
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
47
|
-
props[:right] = right unless right.nil?
|
|
48
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
49
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
50
|
-
props[:scale] = scale unless scale.nil?
|
|
51
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
52
|
-
props[:style] = style unless style.nil?
|
|
53
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
54
|
-
props[:top] = top unless top.nil?
|
|
55
|
-
props[:url] = url unless url.nil?
|
|
56
|
-
props[:visible] = visible unless visible.nil?
|
|
57
|
-
props[:width] = width unless width.nil?
|
|
58
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
59
|
-
props[:on_blur] = on_blur unless on_blur.nil?
|
|
60
|
-
props[:on_click] = on_click unless on_click.nil?
|
|
61
|
-
props[:on_focus] = on_focus unless on_focus.nil?
|
|
62
|
-
props[:on_hover] = on_hover unless on_hover.nil?
|
|
63
|
-
props[:on_long_press] = on_long_press unless on_long_press.nil?
|
|
64
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
65
|
-
super(type: TYPE, id: id, **props)
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
66
20
|
end
|
|
67
21
|
end
|
|
68
22
|
end
|
|
@@ -8,57 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "card".freeze
|
|
9
9
|
WIRE = "Card".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
unless elevation.nil? || elevation >= 0
|
|
13
|
-
raise ArgumentError, "card elevation must be greater than or equal to 0"
|
|
14
|
-
end
|
|
11
|
+
KEYWORDS = [:adaptive, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :badge, :bgcolor, :bottom, :clip_behavior, :col, :content, :data, :disabled, :elevation, :expand, :expand_loose, :height, :key, :left, :margin, :offset, :opacity, :right, :rotate, :rtl, :scale, :semantic_container, :shadow_color, :shape, :show_border_on_foreground, :size_change_interval, :tooltip, :top, :variant, :visible, :width, :on_animation_end, :on_size_change].freeze
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
props
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
props[:animate_position] = animate_position unless animate_position.nil?
|
|
24
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
25
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
26
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
27
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
28
|
-
props[:badge] = badge unless badge.nil?
|
|
29
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
30
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
31
|
-
props[:clip_behavior] = clip_behavior unless clip_behavior.nil?
|
|
32
|
-
props[:col] = col unless col.nil?
|
|
33
|
-
props[:content] = content unless content.nil?
|
|
34
|
-
props[:data] = data unless data.nil?
|
|
35
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
36
|
-
props[:elevation] = elevation unless elevation.nil?
|
|
37
|
-
props[:expand] = expand unless expand.nil?
|
|
38
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
39
|
-
props[:height] = height unless height.nil?
|
|
40
|
-
props[:key] = key unless key.nil?
|
|
41
|
-
props[:left] = left unless left.nil?
|
|
42
|
-
props[:margin] = margin unless margin.nil?
|
|
43
|
-
props[:offset] = offset unless offset.nil?
|
|
44
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
45
|
-
props[:right] = right unless right.nil?
|
|
46
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
47
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
48
|
-
props[:scale] = scale unless scale.nil?
|
|
49
|
-
props[:semantic_container] = semantic_container unless semantic_container.nil?
|
|
50
|
-
props[:shadow_color] = shadow_color unless shadow_color.nil?
|
|
51
|
-
props[:shape] = shape unless shape.nil?
|
|
52
|
-
props[:show_border_on_foreground] = show_border_on_foreground unless show_border_on_foreground.nil?
|
|
53
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
54
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
55
|
-
props[:top] = top unless top.nil?
|
|
56
|
-
props[:variant] = variant unless variant.nil?
|
|
57
|
-
props[:visible] = visible unless visible.nil?
|
|
58
|
-
props[:width] = width unless width.nil?
|
|
59
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
60
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
61
|
-
super(type: TYPE, id: id, **props)
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
62
20
|
end
|
|
63
21
|
end
|
|
64
22
|
end
|
|
@@ -7,6 +7,7 @@ module Ruflet
|
|
|
7
7
|
class ChartAxisControl < Ruflet::Control
|
|
8
8
|
TYPE = "chartaxis".freeze
|
|
9
9
|
WIRE = "axis".freeze
|
|
10
|
+
KEYWORDS = [:title, :labels, :label_size, :title_size, :show_labels].freeze
|
|
10
11
|
|
|
11
12
|
def initialize(id: nil, title: nil, labels: nil, label_size: nil, title_size: nil, show_labels: nil)
|
|
12
13
|
props = {}
|
|
@@ -22,6 +23,7 @@ module Ruflet
|
|
|
22
23
|
class ChartAxisLabelControl < Ruflet::Control
|
|
23
24
|
TYPE = "chartaxislabel".freeze
|
|
24
25
|
WIRE = "l".freeze
|
|
26
|
+
KEYWORDS = [:value, :label].freeze
|
|
25
27
|
|
|
26
28
|
def initialize(id: nil, value: nil, label: nil)
|
|
27
29
|
props = {}
|
|
@@ -34,6 +36,7 @@ module Ruflet
|
|
|
34
36
|
class BarChartControl < Ruflet::Control
|
|
35
37
|
TYPE = "barchart".freeze
|
|
36
38
|
WIRE = "BarChart".freeze
|
|
39
|
+
KEYWORDS = [:width, :height, :min_y, :max_y, :min_x, :max_x, :groups, :left_axis, :right_axis, :top_axis, :bottom_axis, :horizontal_grid_lines, :vertical_grid_lines, :border, :tooltip, :on_event].freeze
|
|
37
40
|
|
|
38
41
|
def initialize(id: nil, width: nil, height: nil, min_y: nil, max_y: nil, min_x: nil, max_x: nil, groups: nil, left_axis: nil, right_axis: nil, top_axis: nil, bottom_axis: nil, horizontal_grid_lines: nil, vertical_grid_lines: nil, border: nil, tooltip: nil, on_event: nil)
|
|
39
42
|
props = {}
|
|
@@ -60,6 +63,7 @@ module Ruflet
|
|
|
60
63
|
class BarChartGroupControl < Ruflet::Control
|
|
61
64
|
TYPE = "barchartgroup".freeze
|
|
62
65
|
WIRE = "group".freeze
|
|
66
|
+
KEYWORDS = [:x, :rods, :bars_space, :showing_tooltip_indicators].freeze
|
|
63
67
|
|
|
64
68
|
def initialize(id: nil, x: nil, rods: nil, bars_space: nil, showing_tooltip_indicators: nil)
|
|
65
69
|
props = {}
|
|
@@ -74,6 +78,7 @@ module Ruflet
|
|
|
74
78
|
class BarChartRodControl < Ruflet::Control
|
|
75
79
|
TYPE = "barchartrod".freeze
|
|
76
80
|
WIRE = "rod".freeze
|
|
81
|
+
KEYWORDS = [:from_y, :to_y, :width, :color, :gradient, :border_radius, :rod_stack_items].freeze
|
|
77
82
|
|
|
78
83
|
def initialize(id: nil, from_y: nil, to_y: nil, width: nil, color: nil, gradient: nil, border_radius: nil, rod_stack_items: nil)
|
|
79
84
|
props = {}
|
|
@@ -91,6 +96,7 @@ module Ruflet
|
|
|
91
96
|
class BarChartRodStackItemControl < Ruflet::Control
|
|
92
97
|
TYPE = "barchartrodstackitem".freeze
|
|
93
98
|
WIRE = "stack_item".freeze
|
|
99
|
+
KEYWORDS = [:from_y, :to_y, :color, :border_side].freeze
|
|
94
100
|
|
|
95
101
|
def initialize(id: nil, from_y: nil, to_y: nil, color: nil, border_side: nil)
|
|
96
102
|
props = {}
|
|
@@ -105,6 +111,7 @@ module Ruflet
|
|
|
105
111
|
class LineChartControl < Ruflet::Control
|
|
106
112
|
TYPE = "linechart".freeze
|
|
107
113
|
WIRE = "LineChart".freeze
|
|
114
|
+
KEYWORDS = [:width, :height, :min_y, :max_y, :min_x, :max_x, :data_series, :left_axis, :right_axis, :top_axis, :bottom_axis, :interactive, :tooltip, :on_event].freeze
|
|
108
115
|
|
|
109
116
|
def initialize(id: nil, width: nil, height: nil, min_y: nil, max_y: nil, min_x: nil, max_x: nil, data_series: nil, left_axis: nil, right_axis: nil, top_axis: nil, bottom_axis: nil, interactive: nil, tooltip: nil, on_event: nil)
|
|
110
117
|
props = {}
|
|
@@ -129,6 +136,7 @@ module Ruflet
|
|
|
129
136
|
class LineChartDataControl < Ruflet::Control
|
|
130
137
|
TYPE = "linechartdata".freeze
|
|
131
138
|
WIRE = "data".freeze
|
|
139
|
+
KEYWORDS = [:points, :color, :gradient, :stroke_width, :curved, :rounded_stroke_cap].freeze
|
|
132
140
|
|
|
133
141
|
def initialize(id: nil, points: nil, color: nil, gradient: nil, stroke_width: nil, curved: nil, rounded_stroke_cap: nil)
|
|
134
142
|
props = {}
|
|
@@ -145,6 +153,7 @@ module Ruflet
|
|
|
145
153
|
class LineChartDataPointControl < Ruflet::Control
|
|
146
154
|
TYPE = "linechartdatapoint".freeze
|
|
147
155
|
WIRE = "p".freeze
|
|
156
|
+
KEYWORDS = [:x, :y].freeze
|
|
148
157
|
|
|
149
158
|
def initialize(id: nil, x: nil, y: nil)
|
|
150
159
|
props = {}
|
|
@@ -157,6 +166,7 @@ module Ruflet
|
|
|
157
166
|
class PieChartControl < Ruflet::Control
|
|
158
167
|
TYPE = "piechart".freeze
|
|
159
168
|
WIRE = "PieChart".freeze
|
|
169
|
+
KEYWORDS = [:width, :height, :sections, :sections_space, :center_space_radius, :tooltip, :on_event].freeze
|
|
160
170
|
|
|
161
171
|
def initialize(id: nil, width: nil, height: nil, sections: nil, sections_space: nil, center_space_radius: nil, tooltip: nil, on_event: nil)
|
|
162
172
|
props = {}
|
|
@@ -174,6 +184,7 @@ module Ruflet
|
|
|
174
184
|
class PieChartSectionControl < Ruflet::Control
|
|
175
185
|
TYPE = "piechartsection".freeze
|
|
176
186
|
WIRE = "section".freeze
|
|
187
|
+
KEYWORDS = [:value, :title, :color, :radius, :title_style, :badge_widget, :badge_position_percentage_offset].freeze
|
|
177
188
|
|
|
178
189
|
def initialize(id: nil, value: nil, title: nil, color: nil, radius: nil, title_style: nil, badge_widget: nil, badge_position_percentage_offset: nil)
|
|
179
190
|
props = {}
|
|
@@ -191,6 +202,7 @@ module Ruflet
|
|
|
191
202
|
class CandlestickChartControl < Ruflet::Control
|
|
192
203
|
TYPE = "candlestickchart".freeze
|
|
193
204
|
WIRE = "CandlestickChart".freeze
|
|
205
|
+
KEYWORDS = [:width, :height, :min_x, :max_x, :min_y, :max_y, :spots, :left_axis, :right_axis, :top_axis, :bottom_axis, :tooltip, :on_event].freeze
|
|
194
206
|
|
|
195
207
|
def initialize(id: nil, width: nil, height: nil, min_x: nil, max_x: nil, min_y: nil, max_y: nil, spots: nil, left_axis: nil, right_axis: nil, top_axis: nil, bottom_axis: nil, tooltip: nil, on_event: nil)
|
|
196
208
|
props = {}
|
|
@@ -214,6 +226,7 @@ module Ruflet
|
|
|
214
226
|
class CandlestickChartSpotControl < Ruflet::Control
|
|
215
227
|
TYPE = "candlestickchartspot".freeze
|
|
216
228
|
WIRE = "CandlestickChartSpot".freeze
|
|
229
|
+
KEYWORDS = [:x, :open, :high, :low, :close, :selected].freeze
|
|
217
230
|
|
|
218
231
|
def initialize(id: nil, x: nil, open: nil, high: nil, low: nil, close: nil, selected: nil)
|
|
219
232
|
props = {}
|
|
@@ -230,6 +243,7 @@ module Ruflet
|
|
|
230
243
|
class RadarChartControl < Ruflet::Control
|
|
231
244
|
TYPE = "radarchart".freeze
|
|
232
245
|
WIRE = "RadarChart".freeze
|
|
246
|
+
KEYWORDS = [:width, :height, :titles, :data_sets, :on_event].freeze
|
|
233
247
|
|
|
234
248
|
def initialize(id: nil, width: nil, height: nil, titles: nil, data_sets: nil, on_event: nil)
|
|
235
249
|
props = {}
|
|
@@ -245,6 +259,7 @@ module Ruflet
|
|
|
245
259
|
class RadarChartTitleControl < Ruflet::Control
|
|
246
260
|
TYPE = "radarcharttitle".freeze
|
|
247
261
|
WIRE = "RadarChartTitle".freeze
|
|
262
|
+
KEYWORDS = [:text, :angle, :position_percentage_offset].freeze
|
|
248
263
|
|
|
249
264
|
def initialize(id: nil, text: nil, angle: nil, position_percentage_offset: nil)
|
|
250
265
|
props = {}
|
|
@@ -258,6 +273,7 @@ module Ruflet
|
|
|
258
273
|
class RadarDataSetControl < Ruflet::Control
|
|
259
274
|
TYPE = "radardataset".freeze
|
|
260
275
|
WIRE = "RadarDataSet".freeze
|
|
276
|
+
KEYWORDS = [:entries, :border_color, :fill_color, :border_width].freeze
|
|
261
277
|
|
|
262
278
|
def initialize(id: nil, entries: nil, border_color: nil, fill_color: nil, border_width: nil)
|
|
263
279
|
props = {}
|
|
@@ -272,6 +288,7 @@ module Ruflet
|
|
|
272
288
|
class RadarDataSetEntryControl < Ruflet::Control
|
|
273
289
|
TYPE = "radardatasetentry".freeze
|
|
274
290
|
WIRE = "RadarDataSetEntry".freeze
|
|
291
|
+
KEYWORDS = [:value].freeze
|
|
275
292
|
|
|
276
293
|
def initialize(id: nil, value: nil)
|
|
277
294
|
props = {}
|
|
@@ -283,6 +300,7 @@ module Ruflet
|
|
|
283
300
|
class ScatterChartControl < Ruflet::Control
|
|
284
301
|
TYPE = "scatterchart".freeze
|
|
285
302
|
WIRE = "ScatterChart".freeze
|
|
303
|
+
KEYWORDS = [:width, :height, :min_x, :max_x, :min_y, :max_y, :spots, :left_axis, :right_axis, :top_axis, :bottom_axis, :on_event].freeze
|
|
286
304
|
|
|
287
305
|
def initialize(id: nil, width: nil, height: nil, min_x: nil, max_x: nil, min_y: nil, max_y: nil, spots: nil, left_axis: nil, right_axis: nil, top_axis: nil, bottom_axis: nil, on_event: nil)
|
|
288
306
|
props = {}
|
|
@@ -305,6 +323,7 @@ module Ruflet
|
|
|
305
323
|
class ScatterChartSpotControl < Ruflet::Control
|
|
306
324
|
TYPE = "scatterchartspot".freeze
|
|
307
325
|
WIRE = "ScatterChartSpot".freeze
|
|
326
|
+
KEYWORDS = [:x, :y, :radius, :color].freeze
|
|
308
327
|
|
|
309
328
|
def initialize(id: nil, x: nil, y: nil, radius: nil, color: nil)
|
|
310
329
|
props = {}
|
|
@@ -8,66 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "checkbox".freeze
|
|
9
9
|
WIRE = "Checkbox".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
props
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
props[:animate_position] = animate_position unless animate_position.nil?
|
|
21
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
22
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
23
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
24
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
25
|
-
props[:autofocus] = autofocus unless autofocus.nil?
|
|
26
|
-
props[:badge] = badge unless badge.nil?
|
|
27
|
-
props[:border_side] = border_side unless border_side.nil?
|
|
28
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
29
|
-
props[:check_color] = check_color unless check_color.nil?
|
|
30
|
-
props[:col] = col unless col.nil?
|
|
31
|
-
props[:data] = data unless data.nil?
|
|
32
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
33
|
-
props[:error] = error unless error.nil?
|
|
34
|
-
props[:expand] = expand unless expand.nil?
|
|
35
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
36
|
-
props[:fill_color] = fill_color unless fill_color.nil?
|
|
37
|
-
props[:focus_color] = focus_color unless focus_color.nil?
|
|
38
|
-
props[:height] = height unless height.nil?
|
|
39
|
-
props[:hover_color] = hover_color unless hover_color.nil?
|
|
40
|
-
props[:key] = key unless key.nil?
|
|
41
|
-
props[:label] = label unless label.nil?
|
|
42
|
-
props[:label_position] = label_position unless label_position.nil?
|
|
43
|
-
props[:label_style] = label_style unless label_style.nil?
|
|
44
|
-
props[:left] = left unless left.nil?
|
|
45
|
-
props[:margin] = margin unless margin.nil?
|
|
46
|
-
props[:mouse_cursor] = mouse_cursor unless mouse_cursor.nil?
|
|
47
|
-
props[:offset] = offset unless offset.nil?
|
|
48
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
49
|
-
props[:overlay_color] = overlay_color unless overlay_color.nil?
|
|
50
|
-
props[:right] = right unless right.nil?
|
|
51
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
52
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
53
|
-
props[:scale] = scale unless scale.nil?
|
|
54
|
-
props[:semantics_label] = semantics_label unless semantics_label.nil?
|
|
55
|
-
props[:shape] = shape unless shape.nil?
|
|
56
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
57
|
-
props[:splash_radius] = splash_radius unless splash_radius.nil?
|
|
58
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
59
|
-
props[:top] = top unless top.nil?
|
|
60
|
-
props[:tristate] = tristate unless tristate.nil?
|
|
61
|
-
props[:value] = value unless value.nil?
|
|
62
|
-
props[:visible] = visible unless visible.nil?
|
|
63
|
-
props[:visual_density] = visual_density unless visual_density.nil?
|
|
64
|
-
props[:width] = width unless width.nil?
|
|
65
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
66
|
-
props[:on_blur] = on_blur unless on_blur.nil?
|
|
67
|
-
props[:on_change] = on_change unless on_change.nil?
|
|
68
|
-
props[:on_focus] = on_focus unless on_focus.nil?
|
|
69
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
70
|
-
super(type: TYPE, id: id, **props)
|
|
11
|
+
KEYWORDS = [:active_color, :adaptive, :align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :border_side, :bottom, :check_color, :col, :data, :disabled, :error, :expand, :expand_loose, :fill_color, :focus_color, :height, :hover_color, :key, :label, :label_position, :label_style, :left, :margin, :mouse_cursor, :offset, :opacity, :overlay_color, :right, :rotate, :rtl, :scale, :semantics_label, :shape, :size_change_interval, :splash_radius, :tooltip, :top, :tristate, :value, :visible, :visual_density, :width, :on_animation_end, :on_blur, :on_change, :on_focus, :on_size_change].freeze
|
|
12
|
+
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
18
|
+
end
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
71
20
|
end
|
|
72
21
|
end
|
|
73
22
|
end
|
|
@@ -8,89 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "chip".freeze
|
|
9
9
|
WIRE = "Chip".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
if !on_click.nil? && !on_select.nil?
|
|
13
|
-
raise ArgumentError, "chip on_click and on_select cannot both be specified"
|
|
14
|
-
end
|
|
11
|
+
KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :autofocus, :badge, :bgcolor, :border_side, :bottom, :check_color, :clip_behavior, :col, :color, :data, :delete_drawer_animation_style, :delete_icon, :delete_icon_color, :delete_icon_size_constraints, :delete_icon_tooltip, :disabled, :disabled_color, :elevation, :elevation_on_click, :enable_animation_style, :expand, :expand_loose, :height, :key, :label, :label_padding, :label_text_style, :leading, :leading_drawer_animation_style, :leading_size_constraints, :left, :margin, :offset, :opacity, :padding, :right, :rotate, :rtl, :scale, :select_animation_style, :selected, :selected_color, :selected_shadow_color, :shadow_color, :shape, :show_checkmark, :size_change_interval, :tooltip, :top, :visible, :visual_density, :width, :on_animation_end, :on_blur, :on_click, :on_delete, :on_focus, :on_select, :on_size_change].freeze
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
21
18
|
end
|
|
22
|
-
|
|
23
|
-
props = {}
|
|
24
|
-
props[:align] = align unless align.nil?
|
|
25
|
-
props[:animate_align] = animate_align unless animate_align.nil?
|
|
26
|
-
props[:animate_margin] = animate_margin unless animate_margin.nil?
|
|
27
|
-
props[:animate_offset] = animate_offset unless animate_offset.nil?
|
|
28
|
-
props[:animate_opacity] = animate_opacity unless animate_opacity.nil?
|
|
29
|
-
props[:animate_position] = animate_position unless animate_position.nil?
|
|
30
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
31
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
32
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
33
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
34
|
-
props[:autofocus] = autofocus unless autofocus.nil?
|
|
35
|
-
props[:badge] = badge unless badge.nil?
|
|
36
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
37
|
-
props[:border_side] = border_side unless border_side.nil?
|
|
38
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
39
|
-
props[:check_color] = check_color unless check_color.nil?
|
|
40
|
-
props[:clip_behavior] = clip_behavior unless clip_behavior.nil?
|
|
41
|
-
props[:col] = col unless col.nil?
|
|
42
|
-
props[:color] = color unless color.nil?
|
|
43
|
-
props[:data] = data unless data.nil?
|
|
44
|
-
props[:delete_drawer_animation_style] = delete_drawer_animation_style unless delete_drawer_animation_style.nil?
|
|
45
|
-
props[:delete_icon] = delete_icon unless delete_icon.nil?
|
|
46
|
-
props[:delete_icon_color] = delete_icon_color unless delete_icon_color.nil?
|
|
47
|
-
props[:delete_icon_size_constraints] = delete_icon_size_constraints unless delete_icon_size_constraints.nil?
|
|
48
|
-
props[:delete_icon_tooltip] = delete_icon_tooltip unless delete_icon_tooltip.nil?
|
|
49
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
50
|
-
props[:disabled_color] = disabled_color unless disabled_color.nil?
|
|
51
|
-
props[:elevation] = elevation unless elevation.nil?
|
|
52
|
-
props[:elevation_on_click] = elevation_on_click unless elevation_on_click.nil?
|
|
53
|
-
props[:enable_animation_style] = enable_animation_style unless enable_animation_style.nil?
|
|
54
|
-
props[:expand] = expand unless expand.nil?
|
|
55
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
56
|
-
props[:height] = height unless height.nil?
|
|
57
|
-
props[:key] = key unless key.nil?
|
|
58
|
-
props[:label] = label unless label.nil?
|
|
59
|
-
props[:label_padding] = label_padding unless label_padding.nil?
|
|
60
|
-
props[:label_text_style] = label_text_style unless label_text_style.nil?
|
|
61
|
-
props[:leading] = leading unless leading.nil?
|
|
62
|
-
props[:leading_drawer_animation_style] = leading_drawer_animation_style unless leading_drawer_animation_style.nil?
|
|
63
|
-
props[:leading_size_constraints] = leading_size_constraints unless leading_size_constraints.nil?
|
|
64
|
-
props[:left] = left unless left.nil?
|
|
65
|
-
props[:margin] = margin unless margin.nil?
|
|
66
|
-
props[:offset] = offset unless offset.nil?
|
|
67
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
68
|
-
props[:padding] = padding unless padding.nil?
|
|
69
|
-
props[:right] = right unless right.nil?
|
|
70
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
71
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
72
|
-
props[:scale] = scale unless scale.nil?
|
|
73
|
-
props[:select_animation_style] = select_animation_style unless select_animation_style.nil?
|
|
74
|
-
props[:selected] = selected unless selected.nil?
|
|
75
|
-
props[:selected_color] = selected_color unless selected_color.nil?
|
|
76
|
-
props[:selected_shadow_color] = selected_shadow_color unless selected_shadow_color.nil?
|
|
77
|
-
props[:shadow_color] = shadow_color unless shadow_color.nil?
|
|
78
|
-
props[:shape] = shape unless shape.nil?
|
|
79
|
-
props[:show_checkmark] = show_checkmark unless show_checkmark.nil?
|
|
80
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
81
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
82
|
-
props[:top] = top unless top.nil?
|
|
83
|
-
props[:visible] = visible unless visible.nil?
|
|
84
|
-
props[:visual_density] = visual_density unless visual_density.nil?
|
|
85
|
-
props[:width] = width unless width.nil?
|
|
86
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
87
|
-
props[:on_blur] = on_blur unless on_blur.nil?
|
|
88
|
-
props[:on_click] = on_click unless on_click.nil?
|
|
89
|
-
props[:on_delete] = on_delete unless on_delete.nil?
|
|
90
|
-
props[:on_focus] = on_focus unless on_focus.nil?
|
|
91
|
-
props[:on_select] = on_select unless on_select.nil?
|
|
92
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
93
|
-
super(type: TYPE, id: id, **props)
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
94
20
|
end
|
|
95
21
|
end
|
|
96
22
|
end
|
|
@@ -8,64 +8,15 @@ module Ruflet
|
|
|
8
8
|
TYPE = "circleavatar".freeze
|
|
9
9
|
WIRE = "CircleAvatar".freeze
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
radius: radius,
|
|
14
|
-
min_radius: min_radius,
|
|
15
|
-
max_radius: max_radius
|
|
16
|
-
}.each do |name, value|
|
|
17
|
-
raise ArgumentError, "circle_avatar #{name} must be greater than or equal to 0" unless value.nil? || value >= 0
|
|
18
|
-
end
|
|
11
|
+
KEYWORDS = [:align, :animate_align, :animate_margin, :animate_offset, :animate_opacity, :animate_position, :animate_rotation, :animate_scale, :animate_size, :aspect_ratio, :background_image_src, :badge, :bgcolor, :bottom, :col, :color, :content, :data, :disabled, :expand, :expand_loose, :foreground_image_src, :height, :key, :left, :margin, :max_radius, :min_radius, :offset, :opacity, :radius, :right, :rotate, :rtl, :scale, :size_change_interval, :tooltip, :top, :visible, :width, :on_animation_end, :on_image_error, :on_size_change].freeze
|
|
19
12
|
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
def initialize(id: nil, **props)
|
|
14
|
+
compact = {}
|
|
15
|
+
props.each do |key, value|
|
|
16
|
+
raise ArgumentError, "unknown keyword: :#{key}" unless KEYWORDS.include?(key)
|
|
17
|
+
compact[key] = value unless value.nil?
|
|
22
18
|
end
|
|
23
|
-
|
|
24
|
-
props = {}
|
|
25
|
-
props[:align] = align unless align.nil?
|
|
26
|
-
props[:animate_align] = animate_align unless animate_align.nil?
|
|
27
|
-
props[:animate_margin] = animate_margin unless animate_margin.nil?
|
|
28
|
-
props[:animate_offset] = animate_offset unless animate_offset.nil?
|
|
29
|
-
props[:animate_opacity] = animate_opacity unless animate_opacity.nil?
|
|
30
|
-
props[:animate_position] = animate_position unless animate_position.nil?
|
|
31
|
-
props[:animate_rotation] = animate_rotation unless animate_rotation.nil?
|
|
32
|
-
props[:animate_scale] = animate_scale unless animate_scale.nil?
|
|
33
|
-
props[:animate_size] = animate_size unless animate_size.nil?
|
|
34
|
-
props[:aspect_ratio] = aspect_ratio unless aspect_ratio.nil?
|
|
35
|
-
props[:background_image_src] = background_image_src unless background_image_src.nil?
|
|
36
|
-
props[:badge] = badge unless badge.nil?
|
|
37
|
-
props[:bgcolor] = bgcolor unless bgcolor.nil?
|
|
38
|
-
props[:bottom] = bottom unless bottom.nil?
|
|
39
|
-
props[:col] = col unless col.nil?
|
|
40
|
-
props[:color] = color unless color.nil?
|
|
41
|
-
props[:content] = content unless content.nil?
|
|
42
|
-
props[:data] = data unless data.nil?
|
|
43
|
-
props[:disabled] = disabled unless disabled.nil?
|
|
44
|
-
props[:expand] = expand unless expand.nil?
|
|
45
|
-
props[:expand_loose] = expand_loose unless expand_loose.nil?
|
|
46
|
-
props[:foreground_image_src] = foreground_image_src unless foreground_image_src.nil?
|
|
47
|
-
props[:height] = height unless height.nil?
|
|
48
|
-
props[:key] = key unless key.nil?
|
|
49
|
-
props[:left] = left unless left.nil?
|
|
50
|
-
props[:margin] = margin unless margin.nil?
|
|
51
|
-
props[:max_radius] = max_radius unless max_radius.nil?
|
|
52
|
-
props[:min_radius] = min_radius unless min_radius.nil?
|
|
53
|
-
props[:offset] = offset unless offset.nil?
|
|
54
|
-
props[:opacity] = opacity unless opacity.nil?
|
|
55
|
-
props[:radius] = radius unless radius.nil?
|
|
56
|
-
props[:right] = right unless right.nil?
|
|
57
|
-
props[:rotate] = rotate unless rotate.nil?
|
|
58
|
-
props[:rtl] = rtl unless rtl.nil?
|
|
59
|
-
props[:scale] = scale unless scale.nil?
|
|
60
|
-
props[:size_change_interval] = size_change_interval unless size_change_interval.nil?
|
|
61
|
-
props[:tooltip] = tooltip unless tooltip.nil?
|
|
62
|
-
props[:top] = top unless top.nil?
|
|
63
|
-
props[:visible] = visible unless visible.nil?
|
|
64
|
-
props[:width] = width unless width.nil?
|
|
65
|
-
props[:on_animation_end] = on_animation_end unless on_animation_end.nil?
|
|
66
|
-
props[:on_image_error] = on_image_error unless on_image_error.nil?
|
|
67
|
-
props[:on_size_change] = on_size_change unless on_size_change.nil?
|
|
68
|
-
super(type: TYPE, id: id, **props)
|
|
19
|
+
super(type: TYPE, id: id, **compact)
|
|
69
20
|
end
|
|
70
21
|
end
|
|
71
22
|
end
|