fluxbit_view_components 0.3.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/component.rb +15 -8
- data/app/components/fluxbit/form/dropzone_component.rb +3 -3
- data/app/components/fluxbit/form/field_component.rb +4 -2
- data/app/components/fluxbit/form/help_text_component.rb +1 -1
- data/app/components/fluxbit/form/label_component.rb +10 -3
- 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/select_component.rb +108 -11
- data/app/components/fluxbit/form/text_field_component.rb +40 -23
- data/app/components/fluxbit/form/toggle_component.rb +2 -2
- data/app/components/fluxbit/form/upload_image_component.html.erb +3 -3
- data/app/components/fluxbit/form/upload_image_component.rb +12 -1
- 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 +74 -4
- data/app/helpers/fluxbit/form_builder.rb +64 -15
- 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 +1 -1
- data/lib/fluxbit/config/form/dropzone_component.rb +1 -1
- data/lib/fluxbit/config/form/help_text_component.rb +1 -1
- data/lib/fluxbit/config/form/label_component.rb +3 -2
- 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/text_field_component.rb +11 -11
- data/lib/fluxbit/config/form/toggle_component.rb +5 -5
- 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 +20 -0
- 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 +58 -0
- metadata +107 -18
- data/app/helpers/fluxbit/classes_helper.rb +0 -9
|
@@ -12,12 +12,15 @@ module Fluxbit::Config::BadgeComponent
|
|
|
12
12
|
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
13
13
|
mattr_accessor :styles do
|
|
14
14
|
{
|
|
15
|
-
base: "inline-flex items-center gap-1 font-medium me-2
|
|
16
|
-
pill:
|
|
15
|
+
base: "inline-flex items-center gap-1 font-medium me-2",
|
|
16
|
+
pill: {
|
|
17
|
+
off: "rounded-sm",
|
|
18
|
+
on: "rounded-full"
|
|
19
|
+
},
|
|
17
20
|
colors: {
|
|
18
21
|
info: "bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300",
|
|
19
22
|
dark: "bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",
|
|
20
|
-
|
|
23
|
+
danger: "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300",
|
|
21
24
|
success: "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300",
|
|
22
25
|
warning: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300",
|
|
23
26
|
indigo: "bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300",
|
|
@@ -28,7 +31,7 @@ module Fluxbit::Config::BadgeComponent
|
|
|
28
31
|
teal: "bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-400",
|
|
29
32
|
solid_info: "text-white bg-blue-500 border-1 border-white dark:border-gray-900",
|
|
30
33
|
solid_dark: "text-white bg-gray-500 border-1 border-white dark:border-gray-900",
|
|
31
|
-
|
|
34
|
+
solid_danger: "text-white bg-red-500 border-1 border-white dark:border-gray-900",
|
|
32
35
|
solid_success: "text-white bg-green-500 border-1 border-white dark:border-gray-900",
|
|
33
36
|
solid_warning: "text-white bg-yellow-500 border-1 border-white dark:border-gray-900",
|
|
34
37
|
solid_indigo: "text-white bg-indigo-500 border-1 border-white dark:border-gray-900",
|
|
@@ -40,7 +43,7 @@ module Fluxbit::Config::BadgeComponent
|
|
|
40
43
|
|
|
41
44
|
info_bordered: "bg-blue-100 text-blue-800 dark:bg-gray-700 dark:text-blue-400 border border-blue-400",
|
|
42
45
|
dark_bordered: "bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-400 border border-gray-500",
|
|
43
|
-
|
|
46
|
+
danger_bordered: "bg-red-100 text-red-800 dark:bg-gray-700 dark:text-red-400 border border-red-400",
|
|
44
47
|
success_bordered: "bg-green-100 text-green-800 dark:bg-gray-700 dark:text-green-400 border border-green-400",
|
|
45
48
|
warning_bordered: "bg-yellow-100 text-yellow-800 dark:bg-gray-700 dark:text-yellow-300 border border-yellow-300",
|
|
46
49
|
indigo_bordered: "bg-indigo-100 text-indigo-800 dark:bg-gray-700 dark:text-indigo-400 border border-indigo-400",
|
|
@@ -55,12 +58,12 @@ module Fluxbit::Config::BadgeComponent
|
|
|
55
58
|
],
|
|
56
59
|
perfect_rounded: [
|
|
57
60
|
"h-fit px-2.5 py-0.5",
|
|
58
|
-
"justify-center
|
|
59
|
-
"justify-center
|
|
60
|
-
"justify-center
|
|
61
|
-
"justify-center
|
|
62
|
-
"justify-center
|
|
63
|
-
|
|
61
|
+
"justify-center size-4",
|
|
62
|
+
"justify-center size-6",
|
|
63
|
+
"justify-center size-8",
|
|
64
|
+
"justify-center size-10",
|
|
65
|
+
"justify-center size-12"
|
|
66
|
+
],
|
|
64
67
|
notification: {
|
|
65
68
|
default: "absolute",
|
|
66
69
|
positions: {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::BannerComponent
|
|
4
|
+
mattr_accessor :position, default: :top
|
|
5
|
+
mattr_accessor :color, default: :info
|
|
6
|
+
mattr_accessor :icon, default: :default
|
|
7
|
+
mattr_accessor :dismissible, default: true
|
|
8
|
+
mattr_accessor :full_width, default: true
|
|
9
|
+
|
|
10
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
11
|
+
mattr_accessor :styles do
|
|
12
|
+
{
|
|
13
|
+
base: "border border-b",
|
|
14
|
+
positions: {
|
|
15
|
+
top: "relative",
|
|
16
|
+
bottom: "relative",
|
|
17
|
+
sticky_top: "fixed top-0 start-0 z-50 w-full",
|
|
18
|
+
sticky_bottom: "fixed bottom-0 start-0 z-50 w-full"
|
|
19
|
+
},
|
|
20
|
+
colors: {
|
|
21
|
+
info: "bg-blue-50 text-blue-800 border-blue-200 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-600",
|
|
22
|
+
success: "bg-green-50 text-green-800 border-green-200 dark:bg-gray-800 dark:text-green-400 dark:border-green-600",
|
|
23
|
+
warning: "bg-yellow-50 text-yellow-800 border-yellow-200 dark:bg-gray-800 dark:text-yellow-300 dark:border-yellow-600",
|
|
24
|
+
danger: "bg-red-50 text-red-800 border-red-200 dark:bg-gray-800 dark:text-red-400 dark:border-red-600",
|
|
25
|
+
dark: "bg-gray-50 text-gray-800 border-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600",
|
|
26
|
+
light: "bg-white text-gray-800 border-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600",
|
|
27
|
+
primary: "bg-primary-50 text-primary-800 border-primary-200 dark:bg-gray-800 dark:text-primary-400 dark:border-primary-600",
|
|
28
|
+
secondary: "bg-gray-50 text-gray-800 border-gray-200 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600"
|
|
29
|
+
},
|
|
30
|
+
default_icons: {
|
|
31
|
+
info: "information-circle",
|
|
32
|
+
success: "check-circle",
|
|
33
|
+
warning: "exclamation-triangle",
|
|
34
|
+
danger: "exclamation-circle",
|
|
35
|
+
dark: "information-circle",
|
|
36
|
+
light: "information-circle",
|
|
37
|
+
primary: "information-circle",
|
|
38
|
+
secondary: "information-circle"
|
|
39
|
+
},
|
|
40
|
+
content_wrapper: {
|
|
41
|
+
full_width: "flex items-center justify-between w-full p-4",
|
|
42
|
+
constrained: "flex items-center justify-between max-w-screen-xl mx-auto p-4"
|
|
43
|
+
},
|
|
44
|
+
left_content: "flex items-center",
|
|
45
|
+
right_content: "flex items-center",
|
|
46
|
+
text: {
|
|
47
|
+
with_icon_or_logo: "ml-3 text-sm font-normal",
|
|
48
|
+
without_icon_or_logo: "text-sm font-normal"
|
|
49
|
+
},
|
|
50
|
+
dismiss_button: {
|
|
51
|
+
base: "flex-shrink-0 inline-flex justify-center w-7 h-7 items-center text-gray-400 hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 dark:hover:bg-gray-600 dark:hover:text-white",
|
|
52
|
+
with_cta: "ml-3"
|
|
53
|
+
},
|
|
54
|
+
screen_reader: "sr-only",
|
|
55
|
+
icon_default: "size-5 text-current flex-shrink-0",
|
|
56
|
+
close_icon: "w-3 h-3"
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
60
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::BottomNavigationComponent
|
|
4
|
+
mattr_accessor :variant, default: :default
|
|
5
|
+
mattr_accessor :border, default: true
|
|
6
|
+
|
|
7
|
+
# rubocop:disable Layout/LineLength
|
|
8
|
+
mattr_accessor :styles do
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
default: {
|
|
12
|
+
base: "fixed bottom-0 left-0 z-50 w-full h-16 bg-white dark:bg-gray-700",
|
|
13
|
+
base_with_button_group: "fixed bottom-0 left-0 z-50 w-full h-auto bg-white dark:bg-gray-700",
|
|
14
|
+
border: "border-t border-gray-200 dark:border-gray-600"
|
|
15
|
+
},
|
|
16
|
+
app_bar: {
|
|
17
|
+
base: "fixed z-50 w-full h-16 max-w-lg -translate-x-1/2 bg-white border border-gray-200 rounded-full bottom-4 left-1/2 dark:bg-gray-700 dark:border-gray-600",
|
|
18
|
+
base_with_button_group: "fixed z-50 w-full h-auto max-w-lg -translate-x-1/2 bg-white border border-gray-200 rounded-full bottom-4 left-1/2 dark:bg-gray-700 dark:border-gray-600",
|
|
19
|
+
border: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
container: {
|
|
23
|
+
base: "grid h-full max-w-lg mx-auto font-medium",
|
|
24
|
+
base_with_button_group: "grid h-16 max-w-lg mx-auto font-medium",
|
|
25
|
+
columns: [
|
|
26
|
+
"grid-cols-2", # 2 columns (index 0)
|
|
27
|
+
"grid-cols-3", # 3 columns (index 1)
|
|
28
|
+
"grid-cols-4", # 4 columns (index 2)
|
|
29
|
+
"grid-cols-5", # 5 columns (index 3)
|
|
30
|
+
"grid-cols-6" # 6 columns (index 4)
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
item: {
|
|
34
|
+
base: "inline-flex flex-col items-center justify-center px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",
|
|
35
|
+
active: "text-blue-600 dark:text-blue-500",
|
|
36
|
+
inactive: "text-gray-500 dark:text-gray-400",
|
|
37
|
+
icon_wrapper: "w-5 h-5 mb-2",
|
|
38
|
+
icon: "w-5 h-5",
|
|
39
|
+
text: "text-sm group-hover:text-blue-600 dark:group-hover:text-blue-500",
|
|
40
|
+
sr_only: "sr-only"
|
|
41
|
+
},
|
|
42
|
+
cta_wrapper: "flex items-center justify-center",
|
|
43
|
+
cta: {
|
|
44
|
+
button: "inline-flex items-center justify-center w-10 h-10 font-medium bg-blue-600 rounded-full hover:bg-blue-700 group focus:ring-4 focus:ring-blue-300 focus:outline-none dark:focus:ring-blue-800",
|
|
45
|
+
icon: "w-4 h-4 text-white dark:text-white"
|
|
46
|
+
},
|
|
47
|
+
tooltip: {
|
|
48
|
+
base: "absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700",
|
|
49
|
+
arrow: "tooltip-arrow"
|
|
50
|
+
},
|
|
51
|
+
pagination: {
|
|
52
|
+
container: "inline-flex items-center justify-center col-span-2",
|
|
53
|
+
button: "inline-flex items-center justify-center h-full px-5 hover:bg-gray-50 dark:hover:bg-gray-800 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
54
|
+
icon: "w-3 h-3 text-gray-500 dark:text-gray-400",
|
|
55
|
+
info: "flex items-center text-sm text-gray-500 dark:text-gray-400",
|
|
56
|
+
sr_only: "sr-only"
|
|
57
|
+
},
|
|
58
|
+
button_group: {
|
|
59
|
+
container: "grid max-w-xs p-1 mx-auto my-2 bg-gray-100 rounded-lg dark:bg-gray-600",
|
|
60
|
+
grid: "grid gap-1",
|
|
61
|
+
button: "px-5 py-1.5 text-xs font-medium hover:bg-white dark:hover:bg-gray-700 rounded-lg",
|
|
62
|
+
button_active: "text-gray-900 bg-white dark:text-white dark:bg-gray-700",
|
|
63
|
+
button_inactive: "text-gray-500 dark:text-gray-400",
|
|
64
|
+
columns: [
|
|
65
|
+
"grid-cols-2", # 2 columns (index 0)
|
|
66
|
+
"grid-cols-3", # 3 columns (index 1)
|
|
67
|
+
"grid-cols-4", # 4 columns (index 2)
|
|
68
|
+
"grid-cols-5" # 5 columns (index 3)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
# rubocop:enable Layout/LineLength
|
|
74
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::BreadcrumbComponent
|
|
4
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
5
|
+
mattr_accessor :styles do
|
|
6
|
+
{
|
|
7
|
+
root: {
|
|
8
|
+
base: "",
|
|
9
|
+
list: "inline-flex items-center"
|
|
10
|
+
},
|
|
11
|
+
item: {
|
|
12
|
+
base: "group flex items-center",
|
|
13
|
+
chevron: "mx-1 h-4 w-4 text-gray-400 group-first:hidden md:mx-2",
|
|
14
|
+
icon: "mr-2 h-4 w-4",
|
|
15
|
+
click_cursor: "cursor-pointer",
|
|
16
|
+
href: {
|
|
17
|
+
on: "flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white",
|
|
18
|
+
off: "flex items-center text-sm font-medium text-gray-500 dark:text-gray-400"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
24
|
+
end
|
|
@@ -5,18 +5,19 @@ module Fluxbit::Config::ButtonComponent
|
|
|
5
5
|
mattr_accessor :pill, default: false
|
|
6
6
|
mattr_accessor :size, default: 1
|
|
7
7
|
mattr_accessor :as, default: :button
|
|
8
|
+
mattr_accessor :selected, default: false
|
|
8
9
|
|
|
9
10
|
# TODO: Gradient and Gradient Duotone need their outline version.
|
|
10
11
|
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
11
12
|
mattr_accessor :styles do
|
|
12
13
|
{
|
|
13
|
-
base: "group flex items-center justify-center
|
|
14
|
+
base: "group flex items-center justify-center text-center font-medium relative focus:z-10 focus:outline-hidden",
|
|
14
15
|
full_sized: "w-full",
|
|
15
16
|
colors: {
|
|
16
17
|
transparent: "text-slate-500 hover:text-slate-900 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-700 dark:hover:text-white",
|
|
17
18
|
default: "text-white bg-blue-700 border border-transparent enabled:hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",
|
|
18
19
|
success: "text-white bg-green-700 border border-transparent enabled:hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:enabled:hover:bg-green-700 dark:focus:ring-green-800",
|
|
19
|
-
|
|
20
|
+
danger: "text-white bg-red-700 border border-transparent enabled:hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:enabled:hover:bg-red-700 dark:focus:ring-red-900",
|
|
20
21
|
info: "text-white bg-cyan-700 border border-transparent enabled:hover:bg-cyan-800 focus:ring-4 focus:ring-cyan-300 dark:bg-cyan-600 dark:enabled:hover:bg-cyan-700 dark:focus:ring-cyan-800",
|
|
21
22
|
warning: "text-white bg-yellow-400 border border-transparent enabled:hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 dark:focus:ring-yellow-900",
|
|
22
23
|
dark: "text-white bg-gray-800 border border-transparent enabled:hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 dark:bg-gray-800 dark:enabled:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700",
|
|
@@ -25,7 +26,7 @@ module Fluxbit::Config::ButtonComponent
|
|
|
25
26
|
|
|
26
27
|
default_outline: "text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-500 dark:focus:ring-blue-800",
|
|
27
28
|
success_outline: "text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:outline-hidden focus:ring-green-300 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800",
|
|
28
|
-
|
|
29
|
+
danger_outline: "text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-4 focus:outline-hidden focus:ring-red-300 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900",
|
|
29
30
|
info_outline: "text-cyan-400 hover:text-white border border-cyan-400 hover:bg-cyan-500 focus:ring-4 focus:outline-hidden focus:ring-cyan-300 dark:border-cyan-300 dark:text-cyan-300 dark:hover:text-white dark:hover:bg-cyan-400 dark:focus:ring-cyan-900",
|
|
30
31
|
warning_outline: "text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:outline-hidden focus:ring-yellow-300 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900",
|
|
31
32
|
dark_outline: "text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-4 focus:outline-hidden focus:ring-gray-300 dark:border-gray-600 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800",
|
|
@@ -33,7 +34,7 @@ module Fluxbit::Config::ButtonComponent
|
|
|
33
34
|
purple_outline: "text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 focus:ring-4 focus:outline-hidden focus:ring-purple-300 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500 dark:focus:ring-purple-900",
|
|
34
35
|
|
|
35
36
|
info_gradient: "text-white bg-gradient-to-r from-cyan-500 via-cyan-600 to-cyan-700 enabled:hover:bg-gradient-to-br focus:ring-4 focus:ring-cyan-300 dark:focus:ring-cyan-800 ",
|
|
36
|
-
|
|
37
|
+
danger_gradient: "text-white bg-gradient-to-r from-red-400 via-red-500 to-red-600 enabled:hover:bg-gradient-to-br focus:ring-4 focus:ring-red-300 dark:focus:ring-red-800",
|
|
37
38
|
success_gradient: "text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 enabled:hover:bg-gradient-to-br focus:ring-4 focus:ring-green-300 dark:focus:ring-green-800",
|
|
38
39
|
cyan_gradient: "text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 enabled:hover:bg-gradient-to-br focus:ring-4 focus:ring-cyan-300 dark:focus:ring-cyan-800",
|
|
39
40
|
lime_gradient: "text-gray-900 bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 enabled:hover:bg-gradient-to-br focus:ring-4 focus:ring-lime-300 dark:focus:ring-lime-800",
|
|
@@ -50,6 +51,7 @@ module Fluxbit::Config::ButtonComponent
|
|
|
50
51
|
teal_to_lime_gradient: "text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 enabled:hover:bg-gradient-to-l enabled:hover:from-teal-200 enabled:hover:to-lime-200 enabled:hover:text-gray-900 focus:ring-4 focus:ring-lime-200 dark:focus:ring-teal-700"
|
|
51
52
|
},
|
|
52
53
|
disabled: "cursor-not-allowed opacity-50",
|
|
54
|
+
selected: "brightness-90 dark:brightness-75",
|
|
53
55
|
inner: {
|
|
54
56
|
base: "flex items-stretch items-center transition-all duration-200",
|
|
55
57
|
position: {
|
|
@@ -12,19 +12,30 @@ module Fluxbit::Config::CardComponent
|
|
|
12
12
|
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
13
13
|
mattr_accessor :styles do
|
|
14
14
|
{
|
|
15
|
-
base:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
base: "",
|
|
16
|
+
base_image_left: "flex flex-row",
|
|
17
|
+
border: "border border-gray-200 dark:border-gray-700",
|
|
18
|
+
shadow: "shadow-sm",
|
|
19
|
+
rounded: "rounded-lg",
|
|
20
|
+
hoverable: "transition-shadow hover:shadow-lg",
|
|
21
|
+
clickable: {
|
|
22
|
+
default: "cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700",
|
|
23
|
+
primary: "cursor-pointer hover:bg-blue-100 dark:hover:bg-blue-800",
|
|
24
|
+
success: "cursor-pointer hover:bg-green-100 dark:hover:bg-green-800",
|
|
25
|
+
danger: "cursor-pointer hover:bg-red-100 dark:hover:bg-red-800"
|
|
20
26
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
# "flex flex-col items-center bg-white border border-gray-200 rounded-lg shadow-sm md:flex-row md:max-w-xl dark:border-gray-700"
|
|
28
|
+
header: "px-4 py-2 font-semibold text-gray-900 dark:text-gray-100",
|
|
29
|
+
body: "px-4 py-2 space-y-4",
|
|
30
|
+
footer: "px-4 py-2 text-sm text-gray-500 dark:text-gray-400",
|
|
31
|
+
image_top: "w-full",
|
|
32
|
+
image_left: "object-cover w-full rounded-t-lg h-96 md:h-auto md:w-48 md:rounded-none md:rounded-s-lg",
|
|
33
|
+
content_left: "px-4 py-2",
|
|
34
|
+
colors: {
|
|
35
|
+
default: "bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100",
|
|
36
|
+
primary: "bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-900 dark:text-white dark:border-blue-800",
|
|
37
|
+
success: "bg-green-50 text-green-900 border-green-200 dark:bg-green-900 dark:text-white dark:border-green-800",
|
|
38
|
+
danger: "bg-red-50 text-red-900 border-red-200 dark:bg-red-900 dark:text-white dark:border-red-800"
|
|
28
39
|
}
|
|
29
40
|
}
|
|
30
41
|
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::CarouselComponent
|
|
4
|
+
mattr_accessor :slide, default: true
|
|
5
|
+
mattr_accessor :slide_interval, default: 3000
|
|
6
|
+
mattr_accessor :indicators, default: true
|
|
7
|
+
mattr_accessor :controls, default: true
|
|
8
|
+
|
|
9
|
+
# rubocop:disable Layout/LineLength
|
|
10
|
+
mattr_accessor :styles do
|
|
11
|
+
{
|
|
12
|
+
base: "relative w-full",
|
|
13
|
+
slides_container: "relative h-56 overflow-hidden rounded-lg md:h-96",
|
|
14
|
+
slide: {
|
|
15
|
+
base: "duration-700 ease-in-out",
|
|
16
|
+
inactive: "hidden"
|
|
17
|
+
},
|
|
18
|
+
indicators: {
|
|
19
|
+
container: "absolute z-30 flex -translate-x-1/2 bottom-5 left-1/2 space-x-3 rtl:space-x-reverse",
|
|
20
|
+
button: "w-3 h-3 rounded-full bg-white/50 hover:bg-white dark:bg-gray-800/50 dark:hover:bg-gray-800"
|
|
21
|
+
},
|
|
22
|
+
controls: {
|
|
23
|
+
button: "absolute top-0 z-30 flex items-center justify-center h-full px-4 cursor-pointer group focus:outline-none",
|
|
24
|
+
previous: "start-0",
|
|
25
|
+
next: "end-0",
|
|
26
|
+
icon_wrapper: "inline-flex items-center justify-center w-10 h-10 rounded-full bg-white/30 dark:bg-gray-800/30 group-hover:bg-white/50 dark:group-hover:bg-gray-800/60 group-focus:ring-4 group-focus:ring-white dark:group-focus:ring-gray-800/70 group-focus:outline-none",
|
|
27
|
+
icon: "w-4 h-4 text-white dark:text-gray-800 rtl:rotate-180",
|
|
28
|
+
sr_only: "sr-only"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
# rubocop:enable Layout/LineLength
|
|
33
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::DrawerComponent
|
|
4
|
+
mattr_accessor :placement, default: :left
|
|
5
|
+
mattr_accessor :sizing, default: :sm
|
|
6
|
+
mattr_accessor :show_close_button, default: true
|
|
7
|
+
mattr_accessor :swipeable, default: false
|
|
8
|
+
mattr_accessor :shadow, default: true
|
|
9
|
+
mattr_accessor :backdrop, default: true
|
|
10
|
+
mattr_accessor :auto_show, default: false
|
|
11
|
+
mattr_accessor :body_scrolling, default: false
|
|
12
|
+
|
|
13
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
14
|
+
mattr_accessor :styles do
|
|
15
|
+
{
|
|
16
|
+
root: "fixed z-40 p-4",
|
|
17
|
+
color: "bg-white dark:bg-gray-800",
|
|
18
|
+
shadow: "shadow-lg dark:shadow-gray-900/50",
|
|
19
|
+
placements: {
|
|
20
|
+
left: "top-0 left-0 h-screen overflow-y-auto transition-transform -translate-x-full",
|
|
21
|
+
right: "top-0 right-0 h-screen overflow-y-auto transition-transform translate-x-full",
|
|
22
|
+
top: "top-0 left-0 right-0 w-full transition-transform -translate-y-full",
|
|
23
|
+
bottom: "bottom-0 left-0 right-0 w-full overflow-y-auto transition-transform transform-none"
|
|
24
|
+
},
|
|
25
|
+
sizes: {
|
|
26
|
+
horizontal: {
|
|
27
|
+
sm: "w-64",
|
|
28
|
+
md: "w-80",
|
|
29
|
+
lg: "w-96",
|
|
30
|
+
xl: "w-128",
|
|
31
|
+
full: "w-full"
|
|
32
|
+
},
|
|
33
|
+
vertical: {
|
|
34
|
+
sm: "h-64",
|
|
35
|
+
md: "h-80",
|
|
36
|
+
lg: "h-96",
|
|
37
|
+
xl: "h-128",
|
|
38
|
+
full: "h-full"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
swipeable: {
|
|
42
|
+
default: "border-t border-gray-200 rounded-t-lg dark:border-gray-700 translate-y-full bottom-[-60px]",
|
|
43
|
+
swipe: "bottom-[60px]"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
48
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::DropdownComponent
|
|
4
|
+
# mattr_accessor :placement, default: :left
|
|
5
|
+
mattr_accessor :sizing, default: 0
|
|
6
|
+
mattr_accessor :auto_divider, default: true
|
|
7
|
+
mattr_accessor :height, default: 0
|
|
8
|
+
|
|
9
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
10
|
+
mattr_accessor :styles do
|
|
11
|
+
{
|
|
12
|
+
base: "z-10 hidden bg-white rounded-lg shadow-sm dark:bg-gray-700",
|
|
13
|
+
ul: "py-1 text-sm text-gray-700 dark:text-gray-200",
|
|
14
|
+
auto_divider: "divide-y divide-gray-200 dark:divide-gray-600",
|
|
15
|
+
divider: "border-t border-gray-200 dark:border-gray-600",
|
|
16
|
+
icon: "mr-2 h-4 w-4",
|
|
17
|
+
sizes: [ "w-44", "w-60", "w-72", "w-80" ],
|
|
18
|
+
items: {
|
|
19
|
+
types: {
|
|
20
|
+
div: "py-2 overflow-y-auto text-gray-700 dark:text-gray-200",
|
|
21
|
+
button: "flex items-center justify-between w-full px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
|
|
22
|
+
li: "text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600"
|
|
23
|
+
},
|
|
24
|
+
heights: [ "", "h-48", "h-60", "h-72", "h-80" ]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
29
|
+
end
|
|
@@ -5,7 +5,7 @@ module Fluxbit::Config::Form::CheckBoxComponent
|
|
|
5
5
|
mattr_accessor :styles do
|
|
6
6
|
{
|
|
7
7
|
checkbox: "rounded-sm",
|
|
8
|
-
base: "
|
|
8
|
+
base: "size-4 text-blue-600 bg-slate-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-slate-700 dark:border-slate-600",
|
|
9
9
|
label: {
|
|
10
10
|
with_helper: "font-medium text-slate-900 dark:text-slate-300",
|
|
11
11
|
base: "ml-2 text-sm font-medium text-slate-900 dark:text-slate-300"
|
|
@@ -12,7 +12,7 @@ module Fluxbit::Config::Form::DropzoneComponent
|
|
|
12
12
|
inner_div: "flex flex-col items-center justify-center pt-5 pb-6",
|
|
13
13
|
title: "mb-2 text-sm text-slate-500 dark:text-slate-400",
|
|
14
14
|
subtitle: "text-xs text-slate-500 dark:text-slate-400",
|
|
15
|
-
icon: "
|
|
15
|
+
icon: "size-10 mb-4 text-slate-500 dark:text-slate-400",
|
|
16
16
|
height: [ "", "h-32", "h-64", "h-96" ]
|
|
17
17
|
}
|
|
18
18
|
end
|
|
@@ -10,7 +10,7 @@ module Fluxbit::Config::Form::HelpTextComponent
|
|
|
10
10
|
colors: {
|
|
11
11
|
default: "text-gray-500 dark:text-gray-400",
|
|
12
12
|
success: "text-green-600 dark:text-green-500",
|
|
13
|
-
|
|
13
|
+
danger: "text-red-600 dark:text-red-500",
|
|
14
14
|
info: "text-cyan-600 dark:text-cyan-500",
|
|
15
15
|
warning: "text-yellow-600 dark:text-yellow-500"
|
|
16
16
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Fluxbit::Config::Form::LabelComponent
|
|
4
4
|
mattr_accessor :color, default: :default
|
|
5
5
|
mattr_accessor :helper_popover_icon, default: "heroicons_solid:question-mark-circle"
|
|
6
|
-
mattr_accessor :helper_popover_icon_class, default: "
|
|
6
|
+
mattr_accessor :helper_popover_icon_class, default: "size-4"
|
|
7
7
|
mattr_accessor :sizing, default: 1
|
|
8
8
|
mattr_accessor :helper_popover_placement, default: "right"
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ module Fluxbit::Config::Form::LabelComponent
|
|
|
14
14
|
colors: {
|
|
15
15
|
default: "text-gray-900 dark:text-white",
|
|
16
16
|
success: "text-green-700 dark:text-green-500",
|
|
17
|
-
|
|
17
|
+
danger: "text-red-700 dark:text-red-500",
|
|
18
18
|
info: "text-cyan-500 dark:text-cyan-600",
|
|
19
19
|
warning: "text-yellow-500 dark:text-yellow-600"
|
|
20
20
|
},
|
|
@@ -23,6 +23,7 @@ module Fluxbit::Config::Form::LabelComponent
|
|
|
23
23
|
"text-md",
|
|
24
24
|
"text-lg"
|
|
25
25
|
],
|
|
26
|
+
required: "text-red-500 px-1 required",
|
|
26
27
|
helper_popover: "px-2 text-slate-400"
|
|
27
28
|
}
|
|
28
29
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::Form::PasswordComponent
|
|
4
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
5
|
+
mattr_accessor :styles do
|
|
6
|
+
{
|
|
7
|
+
strength_wrapper: "mt-2 space-y-2",
|
|
8
|
+
strength_bar_wrapper: "space-y-1",
|
|
9
|
+
strength_bar_label: "text-sm font-medium text-slate-700 dark:text-slate-300",
|
|
10
|
+
strength_bar_container: "w-full bg-slate-200 rounded-full h-2 dark:bg-slate-700",
|
|
11
|
+
strength_bar: "h-2 rounded-full transition-all duration-300 bg-slate-300 dark:bg-slate-600",
|
|
12
|
+
checks_list: "space-y-1",
|
|
13
|
+
check_item: "flex items-center gap-2 text-sm text-slate-600 dark:text-slate-400",
|
|
14
|
+
check_icon: "flex-shrink-0 text-red-500 dark:text-red-400",
|
|
15
|
+
check_label: ""
|
|
16
|
+
}
|
|
17
|
+
end
|
|
18
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
19
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Fluxbit::Config::Form::RadioGroupButtonComponent
|
|
4
|
+
mattr_accessor :color, default: :default
|
|
5
|
+
mattr_accessor :size, default: 1
|
|
6
|
+
|
|
7
|
+
# rubocop: disable Layout/LineLength, Metrics/BlockLength
|
|
8
|
+
mattr_accessor :styles do
|
|
9
|
+
{
|
|
10
|
+
group: "inline-flex rounded-md shadow-xs",
|
|
11
|
+
input: "sr-only peer",
|
|
12
|
+
label: {
|
|
13
|
+
base: "group flex items-center justify-center text-center font-medium relative focus:z-10 focus:outline-hidden cursor-pointer",
|
|
14
|
+
selected: "brightness-90 dark:brightness-75",
|
|
15
|
+
position: {
|
|
16
|
+
start: "rounded-r-none",
|
|
17
|
+
middle: "rounded-none",
|
|
18
|
+
end: "rounded-l-none"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
# rubocop: enable Layout/LineLength, Metrics/BlockLength
|
|
24
|
+
end
|
|
@@ -11,35 +11,35 @@ module Fluxbit::Config::Form::TextFieldComponent
|
|
|
11
11
|
text: {
|
|
12
12
|
default: "text-slate-900 dark:text-white",
|
|
13
13
|
success: "text-green-900",
|
|
14
|
-
|
|
14
|
+
danger: "text-red-900",
|
|
15
15
|
info: "text-cyan-900",
|
|
16
16
|
warning: "text-yellow-900"
|
|
17
17
|
},
|
|
18
18
|
ring: {
|
|
19
19
|
default: "focus:ring-blue-500 dark:focus:ring-blue-500",
|
|
20
20
|
success: "focus:ring-green-500",
|
|
21
|
-
|
|
21
|
+
danger: "focus:ring-red-500",
|
|
22
22
|
info: "focus:ring-cyan-500",
|
|
23
23
|
warning: "focus:ring-yellow-500"
|
|
24
24
|
},
|
|
25
25
|
bg: {
|
|
26
26
|
default: "bg-slate-50 dark:bg-slate-700",
|
|
27
27
|
success: "bg-green-50 dark:bg-green-100",
|
|
28
|
-
|
|
28
|
+
danger: "bg-red-50 dark:bg-red-100",
|
|
29
29
|
info: "bg-cyan-50 dark:bg-cyan-100",
|
|
30
30
|
warning: "bg-yellow-50 dark:bg-yellow-100"
|
|
31
31
|
},
|
|
32
32
|
placeholder: {
|
|
33
33
|
default: "dark:placeholder-slate-400",
|
|
34
34
|
success: "placeholder-green-700",
|
|
35
|
-
|
|
35
|
+
danger: "placeholder-red-700",
|
|
36
36
|
info: "placeholder-cyan-700",
|
|
37
37
|
warning: "placeholder-yellow-700"
|
|
38
38
|
},
|
|
39
39
|
border: {
|
|
40
40
|
default: "border-slate-300 focus:border-blue-500 dark:border-slate-600 dark:focus:border-blue-500",
|
|
41
41
|
success: "border-green-500 focus:border-green-500 dark:border-green-400",
|
|
42
|
-
|
|
42
|
+
danger: "border-red-500 focus:border-red-500 dark:border-red-400",
|
|
43
43
|
info: "border-cyan-500 focus:border-cyan-500 dark:border-cyan-400",
|
|
44
44
|
warning: "border-yellow-500 focus:border-yellow-500 dark:border-yellow-400"
|
|
45
45
|
},
|
|
@@ -54,18 +54,18 @@ module Fluxbit::Config::Form::TextFieldComponent
|
|
|
54
54
|
],
|
|
55
55
|
additional_icons: {
|
|
56
56
|
class: {
|
|
57
|
-
default: "mt-1
|
|
58
|
-
success: "mt-1
|
|
59
|
-
|
|
60
|
-
info: "mt-1
|
|
61
|
-
warning: "mt-1
|
|
57
|
+
default: "mt-1 size-4 text-slate-500 dark:text-slate-400",
|
|
58
|
+
success: "mt-1 size-4 text-green-500 dark:text-green-400",
|
|
59
|
+
danger: "mt-1 size-4 text-red-500 dark:text-red-400",
|
|
60
|
+
info: "mt-1 size-4 text-cyan-500 dark:text-cyan-400",
|
|
61
|
+
warning: "mt-1 size-4 text-yellow-500 dark:text-yellow-400"
|
|
62
62
|
},
|
|
63
63
|
icon: "absolute inset-y-0 left-0 flex items-center pl-3",
|
|
64
64
|
right_icon: "absolute inset-y-0 right-0 flex items-center pr-3",
|
|
65
65
|
addon: {
|
|
66
66
|
default: "mt-1 inline-flex items-center px-3 text-sm text-slate-900 bg-slate-200 border border-r-0 border-slate-300 rounded-l-md dark:bg-slate-600 dark:text-slate-400 dark:border-slate-600",
|
|
67
67
|
success: "mt-1 inline-flex items-center px-3 text-sm text-green-900 bg-green-200 border border-r-0 border-green-300 rounded-l-md dark:bg-green-600 dark:text-green-400 dark:border-green-600",
|
|
68
|
-
|
|
68
|
+
danger: "mt-1 inline-flex items-center px-3 text-sm text-red-900 bg-red-200 border border-r-0 border-red-300 rounded-l-md dark:bg-red-600 dark:text-red-400 dark:border-red-600",
|
|
69
69
|
info: "mt-1 inline-flex items-center px-3 text-sm text-cyan-900 bg-cyan-200 border border-r-0 border-cyan-300 rounded-l-md dark:bg-cyan-600 dark:text-cyan-400 dark:border-cyan-600",
|
|
70
70
|
warning: "mt-1 inline-flex items-center px-3 text-sm text-yellow-900 bg-yellow-200 border border-r-0 border-yellow-300 rounded-l-md dark:bg-yellow-600 dark:text-yellow-400 dark:border-yellow-600"
|
|
71
71
|
}
|
|
@@ -11,13 +11,13 @@ module Fluxbit::Config::Form::ToggleComponent
|
|
|
11
11
|
mattr_accessor :styles do
|
|
12
12
|
{
|
|
13
13
|
label: "text-sm rtl:text-right font-medium text-gray-700 dark:text-gray-200 flex items-center",
|
|
14
|
-
input: "
|
|
14
|
+
input: "size-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 rounded-sm dark:bg-gray-700 dark:border-gray-600 sr-only peer",
|
|
15
15
|
toggle: {
|
|
16
16
|
base: "me-3 shrink-0 rounded-full peer-focus:ring-4 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:border after:rounded-full after:transition-all relative",
|
|
17
17
|
checked: {
|
|
18
18
|
default: "peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 peer-checked:bg-blue-600",
|
|
19
19
|
success: "peer-focus:ring-green-300 dark:peer-focus:ring-green-800 peer-checked:bg-green-600",
|
|
20
|
-
|
|
20
|
+
danger: "peer-focus:ring-red-300 dark:peer-focus:ring-red-800 peer-checked:bg-red-600",
|
|
21
21
|
info: "peer-focus:ring-cyan-300 dark:peer-focus:ring-cyan-800 peer-checked:bg-cyan-600",
|
|
22
22
|
warning: "peer-focus:ring-yellow-300 dark:peer-focus:ring-yellow-800 peer-checked:bg-yellow-600",
|
|
23
23
|
dark: "peer-focus:ring-gray-300 dark:peer-focus:ring-gray-800 peer-checked:bg-gray-600",
|
|
@@ -33,7 +33,7 @@ module Fluxbit::Config::Form::ToggleComponent
|
|
|
33
33
|
default: "bg-slate-200 dark:bg-slate-700 dark:border-slate-600 after:border-slate-300",
|
|
34
34
|
blue: "bg-blue-600 dark:bg-blue-500 dark:border-blue-500 after:border-blue-600",
|
|
35
35
|
success: "bg-green-600 dark:bg-green-500 dark:border-green-500 after:border-green-600",
|
|
36
|
-
|
|
36
|
+
danger: "bg-red-600 dark:bg-red-500 dark:border-red-500 after:border-red-600",
|
|
37
37
|
info: "bg-cyan-600 dark:bg-cyan-500 dark:border-cyan-500 after:border-cyan-600",
|
|
38
38
|
warning: "bg-yellow-600 dark:bg-yellow-500 dark:border-yellow-500 after:border-yellow-600",
|
|
39
39
|
teal: "bg-teal-600 dark:bg-teal-500 dark:border-teal-500 after:border-teal-600",
|
|
@@ -45,7 +45,7 @@ module Fluxbit::Config::Form::ToggleComponent
|
|
|
45
45
|
dark: "bg-gray-600 dark:bg-gray-800 dark:border-gray-600 after:border-gray-300",
|
|
46
46
|
light: "bg-gray-50 dark:bg-gray-300 dark:border-gray-200 after:border-gray-50",
|
|
47
47
|
light_success: "bg-green-200 dark:bg-green-700 dark:border-green-600 after:border-green-300",
|
|
48
|
-
|
|
48
|
+
light_danger: "bg-red-200 dark:bg-red-700 dark:border-red-600 after:border-red-300",
|
|
49
49
|
light_info: "bg-cyan-200 dark:bg-cyan-700 dark:border-cyan-600 after:border-cyan-300",
|
|
50
50
|
light_warning: "bg-yellow-200 dark:bg-yellow-700 dark:border-yellow-600 after:border-yellow-300",
|
|
51
51
|
light_teal: "bg-teal-200 dark:bg-teal-700 dark:border-teal-600 after:border-teal-300",
|
|
@@ -58,7 +58,7 @@ module Fluxbit::Config::Form::ToggleComponent
|
|
|
58
58
|
button: {
|
|
59
59
|
default: "after:bg-white",
|
|
60
60
|
success: "after:bg-green-500",
|
|
61
|
-
|
|
61
|
+
danger: "after:bg-red-500",
|
|
62
62
|
info: "after:bg-cyan-500"
|
|
63
63
|
|
|
64
64
|
},
|