fluxbit_view_components 0.2.0 → 0.4.0
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 +10 -0
- data/app/assets/javascripts/fluxbit_view_components/assigner_controller.js +49 -0
- data/app/assets/javascripts/fluxbit_view_components/auto_submit_controller.js +39 -0
- data/app/assets/javascripts/fluxbit_view_components/drawer_controller.js +135 -0
- data/app/assets/javascripts/fluxbit_view_components/index.js +56 -0
- data/app/assets/javascripts/fluxbit_view_components/method_link_controller.js +143 -0
- data/app/assets/javascripts/fluxbit_view_components/modal_controller.js +118 -0
- data/app/assets/javascripts/fluxbit_view_components/password_controller.js +170 -0
- data/app/assets/javascripts/fluxbit_view_components/progress_controller.js +374 -0
- data/app/assets/javascripts/fluxbit_view_components/row_click_controller.js +32 -0
- data/app/assets/javascripts/fluxbit_view_components/select_all_controller.js +122 -0
- data/app/assets/javascripts/fluxbit_view_components/spinner_percent_controller.js +174 -0
- data/app/assets/javascripts/fluxbit_view_components/theme_button_controller.js +90 -0
- data/app/assets/javascripts/fluxbit_view_components.js +1175 -0
- data/app/components/fluxbit/accordion_component.rb +125 -0
- data/app/components/fluxbit/alert_component.rb +8 -8
- data/app/components/fluxbit/avatar_component.rb +11 -12
- data/app/components/fluxbit/avatar_group_component.rb +1 -1
- data/app/components/fluxbit/badge_component.rb +8 -7
- data/app/components/fluxbit/banner_component.rb +139 -0
- data/app/components/fluxbit/bottom_navigation_component.rb +437 -0
- data/app/components/fluxbit/breadcrumb_component.rb +66 -0
- data/app/components/fluxbit/button_component.rb +39 -11
- data/app/components/fluxbit/button_group_component.rb +1 -1
- data/app/components/fluxbit/card_component.rb +26 -23
- data/app/components/fluxbit/carousel_component.rb +154 -0
- data/app/components/fluxbit/component.rb +24 -3
- data/app/components/fluxbit/drawer_component.html.erb +30 -0
- data/app/components/fluxbit/drawer_component.rb +125 -0
- data/app/components/fluxbit/dropdown_component.rb +41 -0
- data/app/components/fluxbit/dropdown_item_component.rb +68 -0
- data/app/components/fluxbit/flex_component.rb +1 -1
- data/app/components/fluxbit/form/check_box_component.rb +56 -0
- data/app/components/fluxbit/form/component.rb +27 -26
- data/app/components/fluxbit/form/dropzone_component.html.erb +39 -0
- data/app/components/fluxbit/form/dropzone_component.rb +39 -0
- data/app/components/fluxbit/form/field_component.rb +28 -0
- data/app/components/fluxbit/form/form_builder_component.rb +1 -1
- data/app/components/fluxbit/form/{helper_text_component.rb → help_text_component.rb} +9 -4
- data/app/components/fluxbit/form/label_component.rb +40 -30
- data/app/components/fluxbit/form/password_component.rb +247 -0
- data/app/components/fluxbit/form/radio_group_button_component.rb +126 -0
- data/app/components/fluxbit/form/range_component.rb +52 -0
- data/app/components/fluxbit/form/select_component.rb +185 -0
- data/app/components/fluxbit/form/text_field_component.rb +185 -0
- data/app/components/fluxbit/form/toggle_component.html.erb +23 -0
- data/app/components/fluxbit/form/toggle_component.rb +81 -0
- data/app/components/fluxbit/form/upload_image_component.html.erb +50 -0
- data/app/components/fluxbit/form/upload_image_component.rb +61 -0
- data/app/components/fluxbit/gravatar_component.rb +7 -0
- data/app/components/fluxbit/icon_helpers.rb +167 -0
- data/app/components/fluxbit/link_component.rb +42 -0
- data/app/components/fluxbit/modal_component.rb +28 -31
- data/app/components/fluxbit/pagination_component.rb +206 -0
- data/app/components/fluxbit/popover_component.rb +14 -14
- data/app/components/fluxbit/progress_component.rb +196 -0
- data/app/components/fluxbit/skeleton_component.rb +237 -0
- data/app/components/fluxbit/speed_dial_action_component.html.erb +30 -0
- data/app/components/fluxbit/speed_dial_action_component.rb +59 -0
- data/app/components/fluxbit/speed_dial_component.html.erb +33 -0
- data/app/components/fluxbit/speed_dial_component.rb +73 -0
- data/app/components/fluxbit/spinner_component.rb +71 -0
- data/app/components/fluxbit/spinner_percent_component.rb +174 -0
- data/app/components/fluxbit/stepper_component.rb +223 -0
- data/app/components/fluxbit/tab_component.rb +44 -25
- data/app/components/fluxbit/table_component.rb +186 -0
- data/app/components/fluxbit/table_group_component.rb +28 -0
- data/app/components/fluxbit/theme_button_component.rb +64 -0
- data/app/components/fluxbit/timeline_component.rb +63 -0
- data/app/components/fluxbit/timeline_item_component.html.erb +64 -0
- data/app/components/fluxbit/timeline_item_component.rb +78 -0
- data/app/components/fluxbit/tooltip_component.rb +2 -2
- data/app/helpers/fluxbit/components_helper.rb +93 -51
- data/app/helpers/fluxbit/form_builder.rb +136 -0
- data/app/helpers/fluxbit/view_helper.rb +71 -0
- data/config/locales/en.yml +37 -4
- data/config/locales/pt-BR.yml +36 -0
- data/lib/fluxbit/config/accordion_component.rb +73 -0
- data/lib/fluxbit/config/avatar_component.rb +11 -11
- data/lib/fluxbit/config/badge_component.rb +14 -11
- data/lib/fluxbit/config/banner_component.rb +60 -0
- data/lib/fluxbit/config/bottom_navigation_component.rb +74 -0
- data/lib/fluxbit/config/breadcrumb_component.rb +24 -0
- data/lib/fluxbit/config/button_component.rb +6 -4
- data/lib/fluxbit/config/card_component.rb +23 -12
- data/lib/fluxbit/config/carousel_component.rb +33 -0
- data/lib/fluxbit/config/drawer_component.rb +48 -0
- data/lib/fluxbit/config/dropdown_component.rb +29 -0
- data/lib/fluxbit/config/form/check_box_component.rb +19 -0
- data/lib/fluxbit/config/form/dropzone_component.rb +20 -0
- data/lib/fluxbit/config/form/{helper_text_component.rb → help_text_component.rb} +2 -2
- data/lib/fluxbit/config/form/label_component.rb +31 -0
- data/lib/fluxbit/config/form/password_component.rb +19 -0
- data/lib/fluxbit/config/form/radio_group_button_component.rb +24 -0
- data/lib/fluxbit/config/form/range_component.rb +15 -0
- data/lib/fluxbit/config/form/text_field_component.rb +76 -0
- data/lib/fluxbit/config/form/toggle_component.rb +79 -0
- data/lib/fluxbit/config/link_component.rb +24 -0
- data/lib/fluxbit/config/modal_component.rb +1 -1
- data/lib/fluxbit/config/pagination_component.rb +31 -0
- data/lib/fluxbit/config/popover_component.rb +1 -1
- data/lib/fluxbit/config/progress_component.rb +63 -0
- data/lib/fluxbit/config/skeleton_component.rb +82 -0
- data/lib/fluxbit/config/speed_dial_component.rb +50 -0
- data/lib/fluxbit/config/spinner_component.rb +30 -0
- data/lib/fluxbit/config/spinner_percent_component.rb +61 -0
- data/lib/fluxbit/config/stepper_component.rb +299 -0
- data/lib/fluxbit/config/tab_component.rb +6 -0
- data/lib/fluxbit/config/table_component.rb +75 -0
- data/lib/fluxbit/config/theme_button_component.rb +19 -0
- data/lib/fluxbit/config/timeline_component.rb +77 -0
- data/lib/fluxbit/view_components/engine.rb +11 -3
- data/lib/fluxbit/view_components/version.rb +1 -1
- data/lib/fluxbit/view_components.rb +27 -1
- data/lib/generators/fluxbit/devise_views_generator.rb +116 -0
- data/lib/generators/fluxbit/pagy_generator.rb +39 -0
- data/lib/generators/fluxbit/scaffold_generator.rb +165 -0
- data/lib/generators/fluxbit/templates/_alert.html.erb.tt +1 -0
- data/lib/generators/fluxbit/templates/_flash.html.erb.tt +15 -0
- data/lib/generators/fluxbit/templates/_form.html.erb.tt +38 -0
- data/lib/generators/fluxbit/templates/_metadata.html.erb.tt +44 -0
- data/lib/generators/fluxbit/templates/controller.rb.tt +406 -0
- data/lib/generators/fluxbit/templates/create.turbo_stream.erb.tt +7 -0
- data/lib/generators/fluxbit/templates/destroy.turbo_stream.erb.tt +3 -0
- data/lib/generators/fluxbit/templates/destroy_all.turbo_stream.erb.tt +9 -0
- data/lib/generators/fluxbit/templates/devise_views/confirmations/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/devise_views/layouts/devise.html.erb +64 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/confirmation_instructions.html.erb +5 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/email_changed.html.erb +7 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/password_changed.html.erb +3 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/reset_password_instructions.html.erb +8 -0
- data/lib/generators/fluxbit/templates/devise_views/mailer/unlock_instructions.html.erb +7 -0
- data/lib/generators/fluxbit/templates/devise_views/passwords/edit.html.erb +29 -0
- data/lib/generators/fluxbit/templates/devise_views/passwords/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/devise_views/registrations/edit.html.erb +43 -0
- data/lib/generators/fluxbit/templates/devise_views/registrations/new.html.erb +34 -0
- data/lib/generators/fluxbit/templates/devise_views/sessions/new.html.erb +15 -0
- data/lib/generators/fluxbit/templates/devise_views/shared/_error_messages.html.erb +14 -0
- data/lib/generators/fluxbit/templates/devise_views/shared/_links.html.erb +25 -0
- data/lib/generators/fluxbit/templates/devise_views/unlocks/new.html.erb +11 -0
- data/lib/generators/fluxbit/templates/edit.html.erb.tt +47 -0
- data/lib/generators/fluxbit/templates/fluxbit_pagy.css +27 -0
- data/lib/generators/fluxbit/templates/i18n.en.yml.tt +121 -0
- data/lib/generators/fluxbit/templates/i18n.pt-BR.yml.tt +121 -0
- data/lib/generators/fluxbit/templates/index.html.erb.tt +254 -0
- data/lib/generators/fluxbit/templates/index.json.jbuilder.tt +33 -0
- data/lib/generators/fluxbit/templates/new.html.erb.tt +47 -0
- data/lib/generators/fluxbit/templates/partial.html.erb.tt +61 -0
- data/lib/generators/fluxbit/templates/policy.rb.tt +36 -0
- data/lib/generators/fluxbit/templates/send_alert_via_drawer.erb.tt +10 -0
- data/lib/generators/fluxbit/templates/show.html.erb.tt +44 -0
- data/lib/generators/fluxbit/templates/show.json.jbuilder.tt +6 -0
- data/lib/generators/fluxbit/templates/update.turbo_stream.erb.tt +10 -0
- data/lib/generators/fluxbit/templates/update_all.turbo_stream.erb.tt +20 -0
- data/lib/install/install.rb +61 -3
- metadata +127 -35
- data/LICENSE.txt +0 -20
- data/app/components/fluxbit/form/checkbox_input_component.rb +0 -61
- data/app/components/fluxbit/form/datepicker_component.rb +0 -7
- data/app/components/fluxbit/form/radio_input_component.rb +0 -21
- data/app/components/fluxbit/form/range_input_component.rb +0 -51
- data/app/components/fluxbit/form/select_free_input_component.rb +0 -77
- data/app/components/fluxbit/form/select_input_component.rb +0 -21
- data/app/components/fluxbit/form/spacer_input_component.rb +0 -12
- data/app/components/fluxbit/form/text_input_component.rb +0 -225
- data/app/components/fluxbit/form/textarea_input_component.rb +0 -57
- data/app/components/fluxbit/form/toggle_input_component.rb +0 -166
- data/app/components/fluxbit/form/upload_image_input_component.html.erb +0 -48
- data/app/components/fluxbit/form/upload_image_input_component.rb +0 -61
- data/app/components/fluxbit/form/upload_input_component.html.erb +0 -12
- data/app/components/fluxbit/form/upload_input_component.rb +0 -47
- data/app/helpers/fluxbit/classes_helper.rb +0 -9
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::SkeletonComponent
|
|
4
|
+
mattr_accessor :variant, default: :default
|
|
5
|
+
mattr_accessor :animation, default: true
|
|
6
|
+
mattr_accessor :rows, default: 3
|
|
7
|
+
|
|
8
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
9
|
+
mattr_accessor :styles do
|
|
10
|
+
{
|
|
11
|
+
base: "animate-pulse",
|
|
12
|
+
container: "w-full",
|
|
13
|
+
screen_reader: "sr-only",
|
|
14
|
+
text: {
|
|
15
|
+
line: "h-2.5 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
16
|
+
small: "h-2 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
17
|
+
large: "h-3 bg-gray-200 rounded-full dark:bg-gray-700"
|
|
18
|
+
},
|
|
19
|
+
widths: {
|
|
20
|
+
first_line: "w-48",
|
|
21
|
+
last_line: "w-32",
|
|
22
|
+
full: "w-full",
|
|
23
|
+
card_header: "w-48",
|
|
24
|
+
widget_title: "w-48",
|
|
25
|
+
list_name: "w-24",
|
|
26
|
+
list_content: "w-32",
|
|
27
|
+
testimonial_last: "w-24",
|
|
28
|
+
testimonial_name: "w-32",
|
|
29
|
+
testimonial_title: "w-24"
|
|
30
|
+
},
|
|
31
|
+
avatar: {
|
|
32
|
+
small: "w-8 h-8 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
33
|
+
medium: "w-10 h-10 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
34
|
+
large: "w-14 h-14 bg-gray-200 rounded-full dark:bg-gray-700"
|
|
35
|
+
},
|
|
36
|
+
image: {
|
|
37
|
+
small: "h-32 bg-gray-300 rounded dark:bg-gray-700",
|
|
38
|
+
medium: "h-48 bg-gray-300 rounded dark:bg-gray-700",
|
|
39
|
+
large: "h-64 bg-gray-300 rounded dark:bg-gray-700",
|
|
40
|
+
container: "flex items-center justify-center w-full",
|
|
41
|
+
icon: "w-8 h-8 text-gray-200 dark:text-gray-600"
|
|
42
|
+
},
|
|
43
|
+
video: {
|
|
44
|
+
small: "h-32 bg-gray-300 rounded dark:bg-gray-700",
|
|
45
|
+
medium: "h-48 bg-gray-300 rounded dark:bg-gray-700",
|
|
46
|
+
large: "h-64 bg-gray-300 rounded dark:bg-gray-700",
|
|
47
|
+
container: "flex items-center justify-center w-full",
|
|
48
|
+
icon: "w-10 h-10 text-gray-200 dark:text-gray-600"
|
|
49
|
+
},
|
|
50
|
+
button: "h-8 bg-gray-200 rounded dark:bg-gray-700 w-20",
|
|
51
|
+
card: {
|
|
52
|
+
container: "p-4 border border-gray-200 rounded shadow dark:border-gray-700",
|
|
53
|
+
header: "h-4 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
54
|
+
body: "h-2 bg-gray-200 rounded-full dark:bg-gray-700"
|
|
55
|
+
},
|
|
56
|
+
widget: {
|
|
57
|
+
container: "p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700",
|
|
58
|
+
title: "h-4 bg-gray-200 rounded-full dark:bg-gray-700 mb-4",
|
|
59
|
+
content: "h-2 bg-gray-200 rounded-full dark:bg-gray-700"
|
|
60
|
+
},
|
|
61
|
+
list: {
|
|
62
|
+
container: "space-y-3",
|
|
63
|
+
item: "flex items-center space-x-4",
|
|
64
|
+
avatar: "w-10 h-10 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
65
|
+
content: "flex-1 space-y-2"
|
|
66
|
+
},
|
|
67
|
+
testimonial: {
|
|
68
|
+
container: "p-4",
|
|
69
|
+
quote: "h-2 bg-gray-200 rounded-full dark:bg-gray-700",
|
|
70
|
+
author: "flex items-center mt-4 space-x-3",
|
|
71
|
+
avatar: "w-8 h-8 bg-gray-200 rounded-full dark:bg-gray-700"
|
|
72
|
+
},
|
|
73
|
+
spacing: {
|
|
74
|
+
none: "",
|
|
75
|
+
small: "mb-2.5",
|
|
76
|
+
medium: "mb-4",
|
|
77
|
+
large: "mb-6"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
82
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::SpeedDialComponent
|
|
4
|
+
mattr_accessor :position, default: :bottom_right
|
|
5
|
+
mattr_accessor :square, default: false
|
|
6
|
+
mattr_accessor :text_outside, default: false
|
|
7
|
+
|
|
8
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
9
|
+
mattr_accessor :styles do
|
|
10
|
+
{
|
|
11
|
+
base: "fixed z-50 group",
|
|
12
|
+
positions: {
|
|
13
|
+
top_left: "top-6 start-6",
|
|
14
|
+
top_right: "top-6 end-6",
|
|
15
|
+
bottom_left: "bottom-6 start-6",
|
|
16
|
+
bottom_right: "bottom-6 end-6"
|
|
17
|
+
},
|
|
18
|
+
menu: {
|
|
19
|
+
base: "flex flex-col items-center space-y-2",
|
|
20
|
+
hidden: "hidden",
|
|
21
|
+
spacing: {
|
|
22
|
+
top: "mt-4",
|
|
23
|
+
bottom: "mb-4"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
trigger: {
|
|
27
|
+
base: "flex items-center justify-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 transition-all duration-200",
|
|
28
|
+
shapes: {
|
|
29
|
+
rounded: "rounded-full w-14 h-14",
|
|
30
|
+
square: "rounded-lg w-14 h-14"
|
|
31
|
+
},
|
|
32
|
+
icon: "w-5 h-5 transition-transform group-hover:rotate-45"
|
|
33
|
+
},
|
|
34
|
+
action: {
|
|
35
|
+
base: "flex justify-center items-center w-[52px] h-[52px] text-gray-500 hover:text-gray-900 bg-white border border-gray-200 dark:border-gray-600 shadow-sm dark:hover:text-white dark:text-gray-400 hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600 focus:ring-4 focus:ring-gray-300 focus:outline-none dark:focus:ring-gray-400 transition-all duration-200",
|
|
36
|
+
shapes: {
|
|
37
|
+
rounded: "rounded-full",
|
|
38
|
+
square: "rounded-lg"
|
|
39
|
+
},
|
|
40
|
+
icon: "w-5 h-5",
|
|
41
|
+
text: {
|
|
42
|
+
base: "relative",
|
|
43
|
+
outside: "block mb-px text-sm font-medium text-gray-900 dark:text-white"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
screen_reader: "sr-only"
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
50
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::SpinnerComponent
|
|
4
|
+
mattr_accessor :color, default: :default
|
|
5
|
+
mattr_accessor :size, default: 1
|
|
6
|
+
mattr_accessor :label, default: "Loading..."
|
|
7
|
+
|
|
8
|
+
mattr_accessor :styles do
|
|
9
|
+
{
|
|
10
|
+
base: "animate-spin",
|
|
11
|
+
sizes: [
|
|
12
|
+
"w-4 h-4", # 0 - xs
|
|
13
|
+
"w-6 h-6", # 1 - sm (default)
|
|
14
|
+
"w-8 h-8", # 2 - md
|
|
15
|
+
"w-10 h-10", # 3 - lg
|
|
16
|
+
"w-12 h-12" # 4 - xl
|
|
17
|
+
],
|
|
18
|
+
colors: {
|
|
19
|
+
default: "text-gray-200 fill-blue-600",
|
|
20
|
+
info: "text-gray-200 fill-cyan-600",
|
|
21
|
+
success: "text-gray-200 fill-green-500",
|
|
22
|
+
failure: "text-gray-200 fill-red-600",
|
|
23
|
+
warning: "text-gray-200 fill-yellow-400",
|
|
24
|
+
pink: "text-gray-200 fill-pink-600",
|
|
25
|
+
purple: "text-gray-200 fill-purple-600"
|
|
26
|
+
},
|
|
27
|
+
screen_reader: "sr-only"
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::SpinnerPercentComponent
|
|
4
|
+
mattr_accessor :color, default: :default
|
|
5
|
+
mattr_accessor :size, default: 2
|
|
6
|
+
mattr_accessor :percent, default: 10
|
|
7
|
+
mattr_accessor :label, default: "Loading..."
|
|
8
|
+
mattr_accessor :show_percent, default: true
|
|
9
|
+
mattr_accessor :text, default: nil
|
|
10
|
+
mattr_accessor :animate, default: false
|
|
11
|
+
mattr_accessor :speed, default: :normal
|
|
12
|
+
|
|
13
|
+
mattr_accessor :styles do
|
|
14
|
+
{
|
|
15
|
+
base: "relative",
|
|
16
|
+
sizes: [
|
|
17
|
+
"w-12 h-12", # 0 - xxs
|
|
18
|
+
"w-16 h-16", # 1 - xs
|
|
19
|
+
"w-20 h-20", # 2 - sm (default)
|
|
20
|
+
"w-24 h-24", # 3 - md
|
|
21
|
+
"w-32 h-32", # 4 - lg
|
|
22
|
+
"w-40 h-40" # 5 - xl
|
|
23
|
+
],
|
|
24
|
+
colors: {
|
|
25
|
+
default: "text-gray-200 stroke-blue-600",
|
|
26
|
+
info: "text-gray-200 stroke-cyan-600",
|
|
27
|
+
success: "text-gray-200 stroke-green-500",
|
|
28
|
+
failure: "text-gray-200 stroke-red-600",
|
|
29
|
+
warning: "text-gray-200 stroke-yellow-400",
|
|
30
|
+
pink: "text-gray-200 stroke-pink-600",
|
|
31
|
+
purple: "text-gray-200 stroke-purple-600"
|
|
32
|
+
},
|
|
33
|
+
screen_reader: "sr-only",
|
|
34
|
+
text_colors: {
|
|
35
|
+
default: "text-blue-600",
|
|
36
|
+
info: "text-cyan-600",
|
|
37
|
+
success: "text-green-500",
|
|
38
|
+
failure: "text-red-600",
|
|
39
|
+
warning: "text-yellow-400",
|
|
40
|
+
pink: "text-pink-600",
|
|
41
|
+
purple: "text-purple-600"
|
|
42
|
+
},
|
|
43
|
+
animation: "animate-spin",
|
|
44
|
+
speeds: {
|
|
45
|
+
slow: "animate-spin duration-[3s]", # 3 seconds per rotation
|
|
46
|
+
normal: "animate-spin duration-1000", # 1 second per rotation (default)
|
|
47
|
+
fast: "animate-spin duration-500", # 0.5 seconds per rotation
|
|
48
|
+
very_fast: "animate-spin duration-300" # 0.3 seconds per rotation
|
|
49
|
+
},
|
|
50
|
+
svg: {
|
|
51
|
+
transform: "transform -rotate-90"
|
|
52
|
+
},
|
|
53
|
+
percentage_text: {
|
|
54
|
+
position: "absolute inset-0 flex items-center justify-center text-sm font-semibold"
|
|
55
|
+
},
|
|
56
|
+
progress_circle: {
|
|
57
|
+
transition: "transition-all duration-300 ease-in-out"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::StepperComponent
|
|
4
|
+
mattr_accessor :orientation, default: :horizontal
|
|
5
|
+
mattr_accessor :variant, default: :default
|
|
6
|
+
mattr_accessor :color, default: :blue
|
|
7
|
+
|
|
8
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
9
|
+
mattr_accessor :styles do
|
|
10
|
+
{
|
|
11
|
+
base: {
|
|
12
|
+
horizontal: "flex items-center w-full",
|
|
13
|
+
vertical: "flex flex-col"
|
|
14
|
+
},
|
|
15
|
+
list: {
|
|
16
|
+
default: {
|
|
17
|
+
horizontal: "flex items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base",
|
|
18
|
+
vertical: "text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
19
|
+
},
|
|
20
|
+
progress: {
|
|
21
|
+
horizontal: "flex items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base",
|
|
22
|
+
vertical: "text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
23
|
+
},
|
|
24
|
+
detailed: {
|
|
25
|
+
horizontal: "flex items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base",
|
|
26
|
+
vertical: "space-y-4"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
item: {
|
|
30
|
+
default: {
|
|
31
|
+
horizontal: "flex md:w-full items-center",
|
|
32
|
+
vertical: "mb-4"
|
|
33
|
+
},
|
|
34
|
+
progress: {
|
|
35
|
+
horizontal: "flex md:w-full items-center",
|
|
36
|
+
vertical: "mb-4"
|
|
37
|
+
},
|
|
38
|
+
detailed: {
|
|
39
|
+
horizontal: "flex md:w-full items-center",
|
|
40
|
+
vertical: "flex items-start p-4 border border-gray-200 rounded-lg dark:border-gray-700 relative"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
step: {
|
|
44
|
+
default: {
|
|
45
|
+
base: "flex items-center justify-center w-10 h-10 bg-gray-100 rounded-full lg:h-12 lg:w-12 dark:bg-gray-700 shrink-0",
|
|
46
|
+
completed: "flex items-center justify-center w-10 h-10 rounded-full lg:h-12 lg:w-12 dark:bg-green-800 bg-green-100 shrink-0",
|
|
47
|
+
active: {
|
|
48
|
+
blue: "flex items-center justify-center w-10 h-10 bg-blue-100 rounded-full lg:h-12 lg:w-12 dark:bg-blue-800 shrink-0",
|
|
49
|
+
green: "flex items-center justify-center w-10 h-10 bg-green-100 rounded-full lg:h-12 lg:w-12 dark:bg-green-800 shrink-0",
|
|
50
|
+
red: "flex items-center justify-center w-10 h-10 bg-red-100 rounded-full lg:h-12 lg:w-12 dark:bg-red-800 shrink-0",
|
|
51
|
+
yellow: "flex items-center justify-center w-10 h-10 bg-yellow-100 rounded-full lg:h-12 lg:w-12 dark:bg-yellow-800 shrink-0",
|
|
52
|
+
indigo: "flex items-center justify-center w-10 h-10 bg-indigo-100 rounded-full lg:h-12 lg:w-12 dark:bg-indigo-800 shrink-0",
|
|
53
|
+
purple: "flex items-center justify-center w-10 h-10 bg-purple-100 rounded-full lg:h-12 lg:w-12 dark:bg-purple-800 shrink-0"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
progress: {
|
|
57
|
+
base: "flex items-center justify-center w-8 h-8 bg-gray-100 rounded-full dark:bg-gray-700 shrink-0",
|
|
58
|
+
completed: "flex items-center justify-center w-8 h-8 rounded-full dark:bg-green-600 bg-green-600 shrink-0",
|
|
59
|
+
active: {
|
|
60
|
+
blue: "flex items-center justify-center w-8 h-8 bg-blue-600 rounded-full dark:bg-blue-600 shrink-0",
|
|
61
|
+
green: "flex items-center justify-center w-8 h-8 bg-green-600 rounded-full dark:bg-green-600 shrink-0",
|
|
62
|
+
red: "flex items-center justify-center w-8 h-8 bg-red-600 rounded-full dark:bg-red-600 shrink-0",
|
|
63
|
+
yellow: "flex items-center justify-center w-8 h-8 bg-yellow-600 rounded-full dark:bg-yellow-600 shrink-0",
|
|
64
|
+
indigo: "flex items-center justify-center w-8 h-8 bg-indigo-600 rounded-full dark:bg-indigo-600 shrink-0",
|
|
65
|
+
purple: "flex items-center justify-center w-8 h-8 bg-purple-600 rounded-full dark:bg-purple-600 shrink-0"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
detailed: {
|
|
69
|
+
base: "flex items-center justify-center w-12 h-12 bg-white border-2 border-gray-300 rounded-full dark:bg-gray-800 dark:border-gray-600 shrink-0",
|
|
70
|
+
completed: "flex items-center justify-center w-12 h-12 bg-green-600 border-2 border-green-600 rounded-full dark:bg-green-600 dark:border-green-600 shrink-0",
|
|
71
|
+
active: {
|
|
72
|
+
blue: "flex items-center justify-center w-12 h-12 bg-blue-600 border-2 border-blue-600 rounded-full dark:bg-blue-600 dark:border-blue-600 shrink-0",
|
|
73
|
+
green: "flex items-center justify-center w-12 h-12 bg-green-600 border-2 border-green-600 rounded-full dark:bg-green-600 dark:border-green-600 shrink-0",
|
|
74
|
+
red: "flex items-center justify-center w-12 h-12 bg-red-600 border-2 border-red-600 rounded-full dark:bg-red-600 dark:border-red-600 shrink-0",
|
|
75
|
+
yellow: "flex items-center justify-center w-12 h-12 bg-yellow-600 border-2 border-yellow-600 rounded-full dark:bg-yellow-600 dark:border-yellow-600 shrink-0",
|
|
76
|
+
indigo: "flex items-center justify-center w-12 h-12 bg-indigo-600 border-2 border-indigo-600 rounded-full dark:bg-indigo-600 dark:border-indigo-600 shrink-0",
|
|
77
|
+
purple: "flex items-center justify-center w-12 h-12 bg-purple-600 border-2 border-purple-600 rounded-full dark:bg-purple-600 dark:border-purple-600 shrink-0"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
step_number: {
|
|
82
|
+
default: {
|
|
83
|
+
base: "text-gray-500 dark:text-gray-100",
|
|
84
|
+
completed: "text-green-600 dark:text-green-300",
|
|
85
|
+
active: {
|
|
86
|
+
blue: "text-blue-600 dark:text-blue-300",
|
|
87
|
+
green: "text-green-600 dark:text-green-300",
|
|
88
|
+
red: "text-red-600 dark:text-red-300",
|
|
89
|
+
yellow: "text-yellow-600 dark:text-yellow-300",
|
|
90
|
+
indigo: "text-indigo-600 dark:text-indigo-300",
|
|
91
|
+
purple: "text-purple-600 dark:text-purple-300"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
progress: {
|
|
95
|
+
base: "hidden",
|
|
96
|
+
completed: "text-white text-xs font-bold",
|
|
97
|
+
active: {
|
|
98
|
+
blue: "text-white text-xs font-bold",
|
|
99
|
+
green: "text-white text-xs font-bold",
|
|
100
|
+
red: "text-white text-xs font-bold",
|
|
101
|
+
yellow: "text-white text-xs font-bold",
|
|
102
|
+
indigo: "text-white text-xs font-bold",
|
|
103
|
+
purple: "text-white text-xs font-bold"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
detailed: {
|
|
107
|
+
base: "text-gray-600 dark:text-gray-300 font-semibold",
|
|
108
|
+
completed: "text-white font-semibold",
|
|
109
|
+
active: {
|
|
110
|
+
blue: "text-white font-semibold",
|
|
111
|
+
green: "text-white font-semibold",
|
|
112
|
+
red: "text-white font-semibold",
|
|
113
|
+
yellow: "text-white font-semibold",
|
|
114
|
+
indigo: "text-white font-semibold",
|
|
115
|
+
purple: "text-white font-semibold"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
step_icon: {
|
|
120
|
+
default: {
|
|
121
|
+
completed: "w-3.5 h-3.5 text-green-600 dark:text-green-300",
|
|
122
|
+
base: "w-4 h-4 text-gray-500 dark:text-gray-100"
|
|
123
|
+
},
|
|
124
|
+
progress: {
|
|
125
|
+
completed: "w-3 h-3 text-white",
|
|
126
|
+
base: "w-3 h-3 text-gray-500 dark:text-gray-100"
|
|
127
|
+
},
|
|
128
|
+
detailed: {
|
|
129
|
+
completed: "w-4 h-4 text-white",
|
|
130
|
+
base: "w-4 h-4 text-gray-600 dark:text-gray-300"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
content: {
|
|
134
|
+
default: {
|
|
135
|
+
horizontal: "sm:ml-4 ml-2 mt-0",
|
|
136
|
+
vertical: "ml-4 mt-0"
|
|
137
|
+
},
|
|
138
|
+
progress: {
|
|
139
|
+
horizontal: "sm:ml-4 ml-2 mt-0",
|
|
140
|
+
vertical: "ml-4 mt-0"
|
|
141
|
+
},
|
|
142
|
+
detailed: {
|
|
143
|
+
horizontal: "sm:ml-6 ml-4 mt-0",
|
|
144
|
+
vertical: "ml-6 mt-0"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
title: {
|
|
148
|
+
base: "text-gray-900 dark:text-white",
|
|
149
|
+
completed: "text-green-600 dark:text-green-300",
|
|
150
|
+
active: {
|
|
151
|
+
blue: "text-blue-600 dark:text-blue-300",
|
|
152
|
+
green: "text-green-600 dark:text-green-300",
|
|
153
|
+
red: "text-red-600 dark:text-red-300",
|
|
154
|
+
yellow: "text-yellow-600 dark:text-yellow-300",
|
|
155
|
+
indigo: "text-indigo-600 dark:text-indigo-300",
|
|
156
|
+
purple: "text-purple-600 dark:text-purple-300"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
description: "text-sm text-gray-500 dark:text-gray-400",
|
|
160
|
+
connector: {
|
|
161
|
+
default: {
|
|
162
|
+
horizontal: "hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700",
|
|
163
|
+
vertical: "w-0.5 h-6 bg-gray-200 dark:bg-gray-700 mx-auto"
|
|
164
|
+
},
|
|
165
|
+
progress: {
|
|
166
|
+
horizontal: "hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700",
|
|
167
|
+
vertical: "w-0.5 h-6 bg-gray-200 dark:bg-gray-700 mx-auto"
|
|
168
|
+
},
|
|
169
|
+
detailed: {
|
|
170
|
+
horizontal: "hidden sm:flex w-full bg-gray-200 h-0.5 dark:bg-gray-700",
|
|
171
|
+
vertical: "w-0.5 h-6 bg-gray-200 dark:bg-gray-700 mx-auto"
|
|
172
|
+
},
|
|
173
|
+
completed: {
|
|
174
|
+
default: {
|
|
175
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
176
|
+
vertical: "w-0.5 h-6 bg-green-200 dark:bg-green-700 mx-auto"
|
|
177
|
+
},
|
|
178
|
+
progress: {
|
|
179
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
180
|
+
vertical: "w-0.5 h-6 bg-green-200 dark:bg-green-700 mx-auto"
|
|
181
|
+
},
|
|
182
|
+
detailed: {
|
|
183
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
184
|
+
vertical: "w-0.5 h-6 bg-green-200 dark:bg-green-700 mx-auto"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
active: {
|
|
188
|
+
blue: {
|
|
189
|
+
default: {
|
|
190
|
+
horizontal: "hidden sm:flex w-full bg-blue-200 h-0.5 dark:bg-blue-700",
|
|
191
|
+
vertical: "w-0.5 h-6 bg-blue-200 dark:bg-blue-700 mx-auto"
|
|
192
|
+
},
|
|
193
|
+
progress: {
|
|
194
|
+
horizontal: "hidden sm:flex w-full bg-blue-200 h-0.5 dark:bg-blue-700",
|
|
195
|
+
vertical: "w-0.5 h-6 bg-blue-200 dark:bg-blue-700"
|
|
196
|
+
},
|
|
197
|
+
detailed: {
|
|
198
|
+
horizontal: "hidden sm:flex w-full bg-blue-200 h-0.5 dark:bg-blue-700",
|
|
199
|
+
vertical: "w-0.5 h-6 bg-blue-200 dark:bg-blue-700"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
green: {
|
|
203
|
+
default: {
|
|
204
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
205
|
+
vertical: "ml-5 w-0.5 h-6 bg-green-200 dark:bg-green-700"
|
|
206
|
+
},
|
|
207
|
+
progress: {
|
|
208
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
209
|
+
vertical: "w-0.5 h-6 bg-green-200 dark:bg-green-700 mx-auto"
|
|
210
|
+
},
|
|
211
|
+
detailed: {
|
|
212
|
+
horizontal: "hidden sm:flex w-full bg-green-200 h-0.5 dark:bg-green-700",
|
|
213
|
+
vertical: "w-0.5 h-6 bg-green-200 dark:bg-green-700 mx-auto"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
red: {
|
|
217
|
+
default: {
|
|
218
|
+
horizontal: "hidden sm:flex w-full bg-red-200 h-0.5 dark:bg-red-700",
|
|
219
|
+
vertical: "ml-5 w-0.5 h-6 bg-red-200 dark:bg-red-700"
|
|
220
|
+
},
|
|
221
|
+
progress: {
|
|
222
|
+
horizontal: "hidden sm:flex w-full bg-red-200 h-0.5 dark:bg-red-700",
|
|
223
|
+
vertical: "w-0.5 h-6 bg-red-200 dark:bg-red-700 mx-auto"
|
|
224
|
+
},
|
|
225
|
+
detailed: {
|
|
226
|
+
horizontal: "hidden sm:flex w-full bg-red-200 h-0.5 dark:bg-red-700",
|
|
227
|
+
vertical: "w-0.5 h-6 bg-red-200 dark:bg-red-700 mx-auto"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
yellow: {
|
|
231
|
+
default: {
|
|
232
|
+
horizontal: "hidden sm:flex w-full bg-yellow-200 h-0.5 dark:bg-yellow-700",
|
|
233
|
+
vertical: "ml-5 w-0.5 h-6 bg-yellow-200 dark:bg-yellow-700"
|
|
234
|
+
},
|
|
235
|
+
progress: {
|
|
236
|
+
horizontal: "hidden sm:flex w-full bg-yellow-200 h-0.5 dark:bg-yellow-700",
|
|
237
|
+
vertical: "w-0.5 h-6 bg-yellow-200 dark:bg-yellow-700 mx-auto"
|
|
238
|
+
},
|
|
239
|
+
detailed: {
|
|
240
|
+
horizontal: "hidden sm:flex w-full bg-yellow-200 h-0.5 dark:bg-yellow-700",
|
|
241
|
+
vertical: "w-0.5 h-6 bg-yellow-200 dark:bg-yellow-700 mx-auto"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
indigo: {
|
|
245
|
+
default: {
|
|
246
|
+
horizontal: "hidden sm:flex w-full bg-indigo-200 h-0.5 dark:bg-indigo-700",
|
|
247
|
+
vertical: "ml-5 w-0.5 h-6 bg-indigo-200 dark:bg-indigo-700"
|
|
248
|
+
},
|
|
249
|
+
progress: {
|
|
250
|
+
horizontal: "hidden sm:flex w-full bg-indigo-200 h-0.5 dark:bg-indigo-700",
|
|
251
|
+
vertical: "w-0.5 h-6 bg-indigo-200 dark:bg-indigo-700 mx-auto"
|
|
252
|
+
},
|
|
253
|
+
detailed: {
|
|
254
|
+
horizontal: "hidden sm:flex w-full bg-indigo-200 h-0.5 dark:bg-indigo-700",
|
|
255
|
+
vertical: "w-0.5 h-6 bg-indigo-200 dark:bg-indigo-700 mx-auto"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
purple: {
|
|
259
|
+
default: {
|
|
260
|
+
horizontal: "hidden sm:flex w-full bg-purple-200 h-0.5 dark:bg-purple-700",
|
|
261
|
+
vertical: "ml-5 w-0.5 h-6 bg-purple-200 dark:bg-purple-700"
|
|
262
|
+
},
|
|
263
|
+
progress: {
|
|
264
|
+
horizontal: "hidden sm:flex w-full bg-purple-200 h-0.5 dark:bg-purple-700",
|
|
265
|
+
vertical: "w-0.5 h-6 bg-purple-200 dark:bg-purple-700 mx-auto"
|
|
266
|
+
},
|
|
267
|
+
detailed: {
|
|
268
|
+
horizontal: "hidden sm:flex w-full bg-purple-200 h-0.5 dark:bg-purple-700",
|
|
269
|
+
vertical: "w-0.5 h-6 bg-purple-200 dark:bg-purple-700 mx-auto"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
layout: {
|
|
275
|
+
wrapper: "relative",
|
|
276
|
+
flex_center: "flex items-center"
|
|
277
|
+
},
|
|
278
|
+
vertical_connector: {
|
|
279
|
+
base: "absolute top-full w-0.5 h-6",
|
|
280
|
+
positions: {
|
|
281
|
+
progress: "left-4", # w-8 circles
|
|
282
|
+
detailed: "left-6", # w-12 circles
|
|
283
|
+
default: "left-5" # w-10 circles
|
|
284
|
+
},
|
|
285
|
+
colors: {
|
|
286
|
+
completed: "bg-green-200 dark:bg-green-700",
|
|
287
|
+
default: "bg-gray-200 dark:bg-gray-700",
|
|
288
|
+
blue: "bg-blue-200 dark:bg-blue-700",
|
|
289
|
+
green: "bg-green-200 dark:bg-green-700",
|
|
290
|
+
red: "bg-red-200 dark:bg-red-700",
|
|
291
|
+
yellow: "bg-yellow-200 dark:bg-yellow-700",
|
|
292
|
+
indigo: "bg-indigo-200 dark:bg-indigo-700",
|
|
293
|
+
purple: "bg-purple-200 dark:bg-purple-700"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
end
|
|
298
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
299
|
+
end
|
|
@@ -5,6 +5,7 @@ module Fluxbit::Config::TabComponent
|
|
|
5
5
|
mattr_accessor :color, default: :blue
|
|
6
6
|
mattr_accessor :vertical, default: false
|
|
7
7
|
mattr_accessor :tab_panel, default: :default
|
|
8
|
+
mattr_accessor :align, default: :left
|
|
8
9
|
|
|
9
10
|
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
10
11
|
mattr_accessor :styles do
|
|
@@ -18,6 +19,11 @@ module Fluxbit::Config::TabComponent
|
|
|
18
19
|
horizontal: "flex text-center",
|
|
19
20
|
vertical: "flex-column space-y space-y-4 text-sm font-medium text-gray-500 dark:text-gray-400 md:me-4 mb-4 md:mb-0"
|
|
20
21
|
},
|
|
22
|
+
align: {
|
|
23
|
+
left: "justify-start",
|
|
24
|
+
center: "justify-center",
|
|
25
|
+
right: "justify-end"
|
|
26
|
+
},
|
|
21
27
|
li: "",
|
|
22
28
|
variant: {
|
|
23
29
|
default: "flex-wrap text-sm font-medium text-gray-500 border-b border-gray-200 dark:border-gray-700 dark:text-gray-400",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::TableComponent
|
|
4
|
+
mattr_accessor :striped, default: false
|
|
5
|
+
mattr_accessor :bordered, default: false
|
|
6
|
+
mattr_accessor :hover, default: false
|
|
7
|
+
mattr_accessor :shadow, default: false
|
|
8
|
+
|
|
9
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
10
|
+
mattr_accessor :styles do
|
|
11
|
+
{
|
|
12
|
+
root: {
|
|
13
|
+
base: "w-full text-left text-sm rtl:text-right text-gray-500 dark:text-gray-400",
|
|
14
|
+
shadow: "absolute left-0 top-0 -z-10 h-full w-full rounded-lg bg-white drop-shadow-md dark:bg-black"
|
|
15
|
+
},
|
|
16
|
+
wrapper: {
|
|
17
|
+
base: "overflow-x-auto relative",
|
|
18
|
+
shadow: "shadow-md sm:rounded-lg"
|
|
19
|
+
},
|
|
20
|
+
head: {
|
|
21
|
+
base: "text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400",
|
|
22
|
+
cell: "px-6 py-3"
|
|
23
|
+
},
|
|
24
|
+
footer: {
|
|
25
|
+
base: "text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400",
|
|
26
|
+
cell: "px-6 py-3"
|
|
27
|
+
},
|
|
28
|
+
body: {
|
|
29
|
+
base: "bg-white border-b dark:bg-gray-800 dark:border-gray-700 border-gray-200"
|
|
30
|
+
},
|
|
31
|
+
row: {
|
|
32
|
+
base: "",
|
|
33
|
+
bordered: "border-b dark:border-gray-700 border-gray-200",
|
|
34
|
+
hovered: {
|
|
35
|
+
default: "hover:bg-gray-200 dark:hover:bg-gray-600",
|
|
36
|
+
primary: "hover:bg-blue-200 dark:hover:bg-blue-700",
|
|
37
|
+
secondary: "hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
38
|
+
success: "hover:bg-green-200 dark:hover:bg-green-700",
|
|
39
|
+
danger: "hover:bg-red-200 dark:hover:bg-red-700",
|
|
40
|
+
warning: "hover:bg-yellow-200 dark:hover:bg-yellow-700",
|
|
41
|
+
info: "hover:bg-cyan-200 dark:hover:bg-cyan-700",
|
|
42
|
+
light: "hover:bg-gray-300 dark:hover:bg-gray-700",
|
|
43
|
+
dark: "hover:bg-gray-700 dark:hover:bg-gray-200"
|
|
44
|
+
},
|
|
45
|
+
striped: {
|
|
46
|
+
default: "odd:bg-white even:bg-gray-50 odd:dark:bg-gray-900 even:dark:bg-gray-800",
|
|
47
|
+
primary: "odd:bg-blue-50 even:bg-blue-100 odd:dark:bg-blue-900 even:dark:bg-blue-800",
|
|
48
|
+
secondary: "odd:bg-gray-50 even:bg-gray-100 odd:dark:bg-gray-900 even:dark:bg-gray-800",
|
|
49
|
+
success: "odd:bg-green-50 even:bg-green-100 odd:dark:bg-green-900 even:dark:bg-green-800",
|
|
50
|
+
danger: "odd:bg-red-50 even:bg-red-100 odd:dark:bg-red-900 even:dark:bg-red-800",
|
|
51
|
+
warning: "odd:bg-yellow-50 even:bg-yellow-100 odd:dark:bg-yellow-900 even:dark:bg-yellow-800",
|
|
52
|
+
info: "odd:bg-cyan-50 even:bg-cyan-100 odd:dark:bg-cyan-900 even:dark:bg-cyan-800",
|
|
53
|
+
light: "odd:bg-gray-100 even:bg-gray-200 odd:dark:bg-gray-700 even:dark:bg-gray-600",
|
|
54
|
+
dark: "odd:bg-gray-800 even:bg-gray-900 odd:dark:bg-gray-200 even:dark:bg-gray-100"
|
|
55
|
+
},
|
|
56
|
+
colors: {
|
|
57
|
+
default: "",
|
|
58
|
+
primary: "bg-blue-50 dark:bg-blue-900",
|
|
59
|
+
secondary: "bg-gray-50 dark:bg-gray-800",
|
|
60
|
+
success: "bg-green-50 dark:bg-green-900",
|
|
61
|
+
danger: "bg-red-50 dark:bg-red-900",
|
|
62
|
+
warning: "bg-yellow-50 dark:bg-yellow-900",
|
|
63
|
+
info: "bg-cyan-50 dark:bg-cyan-900",
|
|
64
|
+
light: "bg-gray-100 dark:bg-gray-700",
|
|
65
|
+
dark: "bg-gray-800 dark:bg-gray-200"
|
|
66
|
+
},
|
|
67
|
+
cell: {
|
|
68
|
+
base: "px-6 py-2",
|
|
69
|
+
selected: "font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
75
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::ThemeButtonComponent
|
|
4
|
+
# Theme button specific defaults
|
|
5
|
+
mattr_accessor :color, default: :transparent
|
|
6
|
+
mattr_accessor :pill, default: true
|
|
7
|
+
mattr_accessor :size, default: 2
|
|
8
|
+
mattr_accessor :as, default: :button
|
|
9
|
+
|
|
10
|
+
# Delegate styles to ButtonComponent (class method)
|
|
11
|
+
def self.styles
|
|
12
|
+
Fluxbit::Config::ButtonComponent.styles
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Delegate styles to ButtonComponent (instance method for tests)
|
|
16
|
+
def styles
|
|
17
|
+
Fluxbit::Config::ButtonComponent.styles
|
|
18
|
+
end
|
|
19
|
+
end
|