uchi 0.1.5 → 0.1.6
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/app/assets/javascripts/uchi/application.js +2655 -24
- data/app/assets/javascripts/uchi.js +11 -0
- data/app/assets/stylesheets/uchi/application.css +982 -1311
- data/app/assets/tailwind/uchi.css +4 -4
- data/app/components/uchi/field/belongs_to/edit.html.erb +1 -1
- data/app/components/uchi/field/belongs_to/index.html.erb +1 -1
- data/app/components/uchi/field/belongs_to/show.html.erb +3 -5
- data/app/components/uchi/field/belongs_to.rb +30 -7
- data/app/components/uchi/field/boolean/edit.html.erb +1 -1
- data/app/components/uchi/field/date/edit.html.erb +1 -1
- data/app/components/uchi/field/date_time/edit.html.erb +1 -1
- data/app/components/uchi/field/file/edit.html.erb +1 -1
- data/app/components/uchi/field/file/index.html.erb +2 -1
- data/app/components/uchi/field/file/show.html.erb +3 -2
- data/app/components/uchi/field/has_and_belongs_to_many/show.html.erb +5 -3
- data/app/components/uchi/field/has_many/show.html.erb +5 -3
- data/app/components/uchi/field/id/index.html.erb +1 -1
- data/app/components/uchi/field/id/show.html.erb +1 -1
- data/app/components/uchi/field/image/edit.html.erb +1 -1
- data/app/components/uchi/field/image/index.html.erb +2 -1
- data/app/components/uchi/field/image/show.html.erb +2 -1
- data/app/components/uchi/field/number/edit.html.erb +1 -1
- data/app/components/uchi/field/string/edit.html.erb +1 -1
- data/app/components/uchi/field/text/edit.html.erb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb.rb +5 -5
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb_home.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb_item/current.rb +3 -3
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb_item/first.rb +4 -4
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb_item.rb +4 -4
- data/app/components/{flowbite → uchi/flowbite}/breadcrumb_separator.rb +7 -5
- data/app/components/uchi/flowbite/button/outline.rb +37 -0
- data/app/components/uchi/flowbite/button/pill.rb +40 -0
- data/app/components/uchi/flowbite/button.rb +93 -0
- data/app/components/uchi/flowbite/card/card.html.erb +7 -0
- data/app/components/uchi/flowbite/card/title.rb +37 -0
- data/app/components/uchi/flowbite/card.rb +84 -0
- data/app/components/{flowbite → uchi/flowbite}/input/checkbox.rb +7 -7
- data/app/components/{flowbite → uchi/flowbite}/input/date.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/date_time.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/email.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/field.rb +11 -10
- data/app/components/uchi/flowbite/input/file.rb +30 -0
- data/app/components/{flowbite → uchi/flowbite}/input/hint.rb +6 -5
- data/app/components/{flowbite → uchi/flowbite}/input/label.rb +8 -7
- data/app/components/{flowbite → uchi/flowbite}/input/number.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/password.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/phone.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input/radio_button.rb +7 -7
- data/app/components/{flowbite → uchi/flowbite}/input/select.rb +16 -7
- data/app/components/uchi/flowbite/input/textarea.rb +42 -0
- data/app/components/{flowbite → uchi/flowbite}/input/url.rb +1 -1
- data/app/components/uchi/flowbite/input/validation_error.rb +39 -0
- data/app/components/uchi/flowbite/input_field/checkbox.html.erb +9 -0
- data/app/components/{flowbite → uchi/flowbite}/input_field/checkbox.rb +10 -6
- data/app/components/{flowbite → uchi/flowbite}/input_field/date.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/date_time.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/email.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/file.rb +2 -2
- data/app/components/uchi/flowbite/input_field/input_field.html.erb +9 -0
- data/app/components/{flowbite → uchi/flowbite}/input_field/number.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/password.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/phone.rb +2 -2
- data/app/components/uchi/flowbite/input_field/radio_button.html.erb +9 -0
- data/app/components/{flowbite → uchi/flowbite}/input_field/radio_button.rb +13 -9
- data/app/components/{flowbite → uchi/flowbite}/input_field/select.rb +7 -3
- data/app/components/{flowbite → uchi/flowbite}/input_field/text.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/input_field/textarea.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field/url.rb +2 -2
- data/app/components/{flowbite → uchi/flowbite}/input_field.rb +19 -5
- data/app/components/uchi/flowbite/link.rb +41 -0
- data/app/components/{flowbite → uchi/flowbite}/style.rb +1 -1
- data/app/components/{flowbite → uchi/flowbite}/toast/icon.rb +1 -1
- data/app/components/uchi/flowbite/toast/toast.html.erb +40 -0
- data/app/components/{flowbite → uchi/flowbite}/toast.rb +2 -2
- data/app/components/uchi/ui/actions/dropdown/dropdown.html.erb +59 -0
- data/app/components/uchi/ui/actions/dropdown.rb +32 -0
- data/app/components/uchi/ui/breadcrumb/breadcrumb.html.erb +4 -4
- data/app/components/uchi/ui/form/input/collection_checkboxes.html.erb +2 -1
- data/app/components/uchi/ui/form/input/collection_checkboxes.rb +12 -17
- data/app/components/uchi/ui/frame/frame.html.erb +6 -1
- data/app/components/uchi/ui/index/records_table/records_table.html.erb +109 -18
- data/app/components/uchi/ui/index/records_table/search_form/search_form.html.erb +21 -5
- data/app/components/uchi/ui/navigation/navigation.html.erb +9 -0
- data/app/components/uchi/ui/navigation.rb +37 -0
- data/app/components/uchi/ui/no_value/no_value.html.erb +1 -0
- data/app/components/uchi/ui/no_value.rb +8 -0
- data/app/components/uchi/ui/page_header/page_header.html.erb +7 -2
- data/app/components/uchi/ui/pagination/current_link.html.erb +1 -1
- data/app/components/uchi/ui/pagination/gap.html.erb +7 -1
- data/app/components/uchi/ui/pagination/link.html.erb +1 -1
- data/app/components/uchi/ui/pagination/next_link.html.erb +18 -3
- data/app/components/uchi/ui/pagination/pagination.html.erb +3 -1
- data/app/components/uchi/ui/pagination/previous_link.html.erb +18 -3
- data/app/components/uchi/ui/pagination.rb +1 -1
- data/app/components/uchi/ui/show/attribute_fields/attribute_fields.html.erb +4 -3
- data/app/components/uchi/ui/spinner/spinner.html.erb +17 -3
- data/app/controllers/uchi/actions/executions_controller.rb +107 -0
- data/app/controllers/uchi/repository_controller.rb +21 -1
- data/app/views/layouts/uchi/_flash_messages.html.erb +1 -1
- data/app/views/layouts/uchi/application.html.erb +10 -16
- data/app/views/uchi/navigation/_main.html.erb +9 -0
- data/app/views/uchi/repository/edit.html.erb +2 -2
- data/app/views/uchi/repository/index.html.erb +12 -3
- data/app/views/uchi/repository/new.html.erb +2 -2
- data/app/views/uchi/repository/show.html.erb +13 -2
- data/lib/generators/uchi/controller/templates/controller.rb.tt +0 -5
- data/lib/generators/uchi/scaffold/scaffold_generator.rb +15 -0
- data/lib/uchi/action.rb +84 -0
- data/lib/uchi/action_response.rb +108 -0
- data/lib/uchi/repository/translate.rb +14 -0
- data/lib/uchi/repository.rb +25 -0
- data/lib/uchi/version.rb +1 -1
- data/lib/uchi.rb +2 -0
- metadata +63 -50
- data/app/components/flowbite/button/outline.rb +0 -22
- data/app/components/flowbite/button/pill.rb +0 -40
- data/app/components/flowbite/button.rb +0 -92
- data/app/components/flowbite/card.rb +0 -45
- data/app/components/flowbite/input/file.rb +0 -30
- data/app/components/flowbite/input/textarea.rb +0 -42
- data/app/components/flowbite/input/validation_error.rb +0 -11
- data/app/components/flowbite/input_field/checkbox.html.erb +0 -14
- data/app/components/flowbite/input_field/input_field.html.erb +0 -8
- data/app/components/flowbite/input_field/radio_button.html.erb +0 -14
- data/app/components/flowbite/link.rb +0 -21
- data/app/components/flowbite/toast/toast.html.erb +0 -11
- /data/app/components/{flowbite → uchi/flowbite}/toast/icon.html.erb +0 -0
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Flowbite
|
|
4
|
-
# Renders a HTML button element.
|
|
5
|
-
#
|
|
6
|
-
# See https://flowbite.com/docs/components/buttons/
|
|
7
|
-
#
|
|
8
|
-
# @param label [String] The text to display on the button.
|
|
9
|
-
#
|
|
10
|
-
# All other parameters are optional and are passed directly to the button tag
|
|
11
|
-
# as HTML attributes.
|
|
12
|
-
class Button < ViewComponent::Base
|
|
13
|
-
SIZES = {
|
|
14
|
-
xs: ["text-xs", "px-3", "py-2"],
|
|
15
|
-
sm: ["text-sm", "px-3", "py-2"],
|
|
16
|
-
default: ["text-sm", "px-5", "py-2.5"],
|
|
17
|
-
lg: ["text-base", "px-5", "py-3"],
|
|
18
|
-
xl: ["text-base", "px-6", "py-3.5"]
|
|
19
|
-
}.freeze
|
|
20
|
-
|
|
21
|
-
class << self
|
|
22
|
-
def classes(size: :default, state: :default, style: :default)
|
|
23
|
-
style = styles.fetch(style)
|
|
24
|
-
classes = style.fetch(state)
|
|
25
|
-
classes + sizes.fetch(size)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def sizes
|
|
29
|
-
SIZES
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# rubocop:disable Layout/LineLength
|
|
33
|
-
def styles
|
|
34
|
-
{
|
|
35
|
-
alternative: Flowbite::Style.new(
|
|
36
|
-
default: ["font-medium", "text-gray-900", "focus:outline-none", "bg-white", "rounded-lg", "border", "border-gray-200", "hover:bg-gray-100", "hover:text-blue-700", "focus:z-10", "focus:ring-4", "focus:ring-gray-100", "dark:focus:ring-gray-700", "dark:bg-gray-800", "dark:text-gray-400", "dark:border-gray-600", "dark:hover:text-white", "dark:hover:bg-gray-700"]
|
|
37
|
-
),
|
|
38
|
-
dark: Flowbite::Style.new(
|
|
39
|
-
default: ["text-white", "bg-gray-800", "hover:bg-gray-900", "focus:ring-4", "focus:ring-gray-300", "font-medium", "rounded-lg", "dark:bg-gray-800", "dark:hover:bg-gray-700", "dark:focus:ring-gray-700", "dark:border-gray-700"]
|
|
40
|
-
),
|
|
41
|
-
default: Flowbite::Style.new(
|
|
42
|
-
default: ["text-white", "bg-blue-700", "hover:bg-blue-800", "focus:ring-4", "focus:ring-blue-300", "font-medium", "rounded-lg", "dark:bg-blue-600", "dark:hover:bg-blue-700", "focus:outline-none", "dark:focus:ring-blue-800"]
|
|
43
|
-
),
|
|
44
|
-
green: Flowbite::Style.new(
|
|
45
|
-
default: ["focus:outline-none", "text-white", "bg-green-700", "hover:bg-green-800", "focus:ring-4", "focus:ring-green-300", "font-medium", "rounded-lg", "dark:bg-green-600", "dark:hover:bg-green-700", "dark:focus:ring-green-800"]
|
|
46
|
-
),
|
|
47
|
-
light: Flowbite::Style.new(
|
|
48
|
-
default: ["text-gray-900", "bg-white", "border", "border-gray-300", "hover:bg-gray-100", "focus:ring-4", "focus:ring-gray-100", "font-medium", "rounded-lg", "dark:bg-gray-800", "dark:text-white", "dark:border-gray-600", "dark:hover:bg-gray-700", "dark:hover:border-gray-600", "dark:focus:ring-gray-700"]
|
|
49
|
-
),
|
|
50
|
-
purple: Flowbite::Style.new(
|
|
51
|
-
default: ["focus:outline-none", "text-white", "bg-purple-700", "hover:bg-purple-800", "focus:ring-4", "focus:ring-purple-300", "font-medium", "rounded-lg", "dark:bg-purple-600", "dark:hover:bg-purple-700", "dark:focus:ring-purple-900"]
|
|
52
|
-
),
|
|
53
|
-
red: Flowbite::Style.new(
|
|
54
|
-
default: ["focus:outline-none", "text-white", "bg-red-700", "hover:bg-red-800", "focus:ring-4", "focus:ring-red-300", "font-medium", "rounded-lg", "dark:bg-red-600", "dark:hover:bg-red-700", "dark:focus:ring-red-900"]
|
|
55
|
-
),
|
|
56
|
-
yellow: Flowbite::Style.new(
|
|
57
|
-
default: ["focus:outline-none", "text-white", "bg-yellow-400", "hover:bg-yellow-500", "focus:ring-4", "focus:ring-yellow-300", "font-medium", "rounded-lg", "dark:focus:ring-yellow-900"]
|
|
58
|
-
)
|
|
59
|
-
}.freeze
|
|
60
|
-
end
|
|
61
|
-
# rubocop:enable Layout/LineLength
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
attr_reader :button_attributes, :size, :style
|
|
65
|
-
|
|
66
|
-
def initialize(size: :default, style: :default, **button_attributes)
|
|
67
|
-
@size = size
|
|
68
|
-
@style = style
|
|
69
|
-
@button_attributes = button_attributes
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def call
|
|
73
|
-
content_tag(
|
|
74
|
-
:button,
|
|
75
|
-
content,
|
|
76
|
-
**options
|
|
77
|
-
)
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
private
|
|
81
|
-
|
|
82
|
-
def classes
|
|
83
|
-
self.class.classes(size: size, state: :default, style: style)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
def options
|
|
87
|
-
{
|
|
88
|
-
class: classes
|
|
89
|
-
}.merge(button_attributes)
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
end
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Flowbite
|
|
4
|
-
# Renders a card element.
|
|
5
|
-
#
|
|
6
|
-
# See https://flowbite.com/docs/components/cards/
|
|
7
|
-
class Card < ViewComponent::Base
|
|
8
|
-
class << self
|
|
9
|
-
def classes(state: :default, style: :default)
|
|
10
|
-
style = styles.fetch(style)
|
|
11
|
-
style.fetch(state)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# rubocop:disable Layout/LineLength
|
|
15
|
-
def styles
|
|
16
|
-
{
|
|
17
|
-
default: Flowbite::Style.new(
|
|
18
|
-
default: ["p-6", "bg-white", "border", "border-gray-200", "rounded-lg", "shadow-sm", "dark:bg-gray-800", "dark:border-gray-700"]
|
|
19
|
-
)
|
|
20
|
-
}.freeze
|
|
21
|
-
end
|
|
22
|
-
# rubocop:enable Layout/LineLength
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def call
|
|
26
|
-
card_options = {}
|
|
27
|
-
card_options[:class] = self.class.classes + @class
|
|
28
|
-
|
|
29
|
-
content_tag(:div, card_options.merge(@options)) do
|
|
30
|
-
concat(content_tag(:div, content, class: "font-normal text-gray-700 dark:text-gray-400"))
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# @param class [Array<String>] Additional CSS classes for the card
|
|
35
|
-
# container.
|
|
36
|
-
#
|
|
37
|
-
# @param options [Hash] Additional HTML options for the card container
|
|
38
|
-
# (e.g., custom classes, data attributes). These options are merged into
|
|
39
|
-
# the card's root element.
|
|
40
|
-
def initialize(class: [], options: {})
|
|
41
|
-
@class = Array(binding.local_variable_get(:class)) || []
|
|
42
|
-
@options = options || {}
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Flowbite
|
|
4
|
-
module Input
|
|
5
|
-
class File < Field
|
|
6
|
-
SIZES = {
|
|
7
|
-
sm: ["text-xs"],
|
|
8
|
-
default: ["text-sm"],
|
|
9
|
-
lg: ["text-lg"]
|
|
10
|
-
}.freeze
|
|
11
|
-
|
|
12
|
-
# Returns the name of the method used to generate HTML for the input field
|
|
13
|
-
def input_field_type
|
|
14
|
-
:file_field
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# rubocop:disable Layout/LineLength
|
|
18
|
-
def self.styles
|
|
19
|
-
{
|
|
20
|
-
default: Flowbite::Style.new(
|
|
21
|
-
default: ["block", "w-full", "text-gray-900", "border", "border-gray-300", "rounded-lg", "cursor-pointer", "bg-gray-50", "focus:outline-none", "dark:text-gray-400", "dark:bg-gray-700", "dark:border-gray-600"],
|
|
22
|
-
disabled: ["block", "w-full", "text-gray-400", "border", "border-gray-300", "rounded-lg", "cursor-not-allowed", "bg-gray-100", "dark:text-gray-500", "dark:bg-gray-600", "dark:border-gray-500"],
|
|
23
|
-
error: ["block", "w-full", "text-red-900", "border", "border-red-500", "rounded-lg", "cursor-pointer", "bg-red-50", "focus:outline-none", "dark:text-red-400", "dark:bg-gray-700", "dark:border-red-500"]
|
|
24
|
-
)
|
|
25
|
-
}.freeze
|
|
26
|
-
end
|
|
27
|
-
# rubocop:enable Layout/LineLength
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Flowbite
|
|
4
|
-
module Input
|
|
5
|
-
class Textarea < Field
|
|
6
|
-
class << self
|
|
7
|
-
# rubocop:disable Layout/LineLength
|
|
8
|
-
def styles
|
|
9
|
-
{
|
|
10
|
-
default: Flowbite::Style.new(
|
|
11
|
-
default: ["block", "w-full", "text-gray-900", "bg-gray-50", "rounded-lg", "border", "border-gray-300", "focus:ring-blue-500", "focus:border-blue-500", "dark:bg-gray-700", "dark:border-gray-600", "dark:placeholder-gray-400", "dark:text-white", "dark:focus:ring-blue-500", "dark:focus:border-blue-500"],
|
|
12
|
-
disabled: ["block", "w-full", "bg-gray-100", "rounded-lg", "border", "border-gray-300", "text-gray-900", "cursor-not-allowed"],
|
|
13
|
-
error: ["block", "w-full", "bg-red-50", "border", "border-red-500", "text-red-900", "placeholder-red-700", "rounded-lg", "focus:ring-red-500", "focus:border-red-500", "dark:bg-gray-700", "dark:text-red-500", "dark:placeholder-red-500", "dark:border-red-500"]
|
|
14
|
-
)
|
|
15
|
-
}.freeze
|
|
16
|
-
end
|
|
17
|
-
# rubocop:enable Layout/LineLength
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# Returns the HTML to use for the actual input field element.
|
|
21
|
-
def call
|
|
22
|
-
@form.send(
|
|
23
|
-
input_field_type,
|
|
24
|
-
@attribute,
|
|
25
|
-
**input_options
|
|
26
|
-
)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
protected
|
|
30
|
-
|
|
31
|
-
# Returns the CSS classes to apply to the input field
|
|
32
|
-
def classes
|
|
33
|
-
self.class.classes(size: size, state: state)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Returns the name of the method used to generate HTML for the input field
|
|
37
|
-
def input_field_type
|
|
38
|
-
:text_area
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="flex">
|
|
2
|
-
<div class="flex items-center h-5">
|
|
3
|
-
<%= input %>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
<div class="ms-2 text-sm">
|
|
7
|
-
<%= label %>
|
|
8
|
-
<%= hint %>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<% errors.each do |error| %>
|
|
12
|
-
<%= render(Flowbite::Input::ValidationError.new) { error.upcase_first } %>
|
|
13
|
-
<% end %>
|
|
14
|
-
</div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<div class="flex">
|
|
2
|
-
<div class="flex items-center h-5">
|
|
3
|
-
<%= input %>
|
|
4
|
-
</div>
|
|
5
|
-
|
|
6
|
-
<div class="ms-2 text-sm">
|
|
7
|
-
<%= label %>
|
|
8
|
-
<%= hint %>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<% errors.each do |error| %>
|
|
12
|
-
<%= render(Flowbite::Input::ValidationError.new) { error.upcase_first } %>
|
|
13
|
-
<% end %>
|
|
14
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
module Flowbite
|
|
2
|
-
class Link < ViewComponent::Base
|
|
3
|
-
attr_reader :href, :text, :options
|
|
4
|
-
|
|
5
|
-
class << self
|
|
6
|
-
def classes
|
|
7
|
-
["font-medium", "text-blue-600", "dark:text-blue-500", "hover:underline"].join(" ")
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def initialize(href:, **options)
|
|
12
|
-
super()
|
|
13
|
-
@href = href
|
|
14
|
-
@options = options
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def call
|
|
18
|
-
link_to(content, href, {class: self.class.classes}.merge(options))
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<div class="<%= container_classes.join(" ") %>" role="alert" <%= options.map { |k, v| "#{k}=\"#{v}\"" }.join(" ").html_safe %>>
|
|
2
|
-
<%= render Flowbite::Toast::Icon.new(style: style) %>
|
|
3
|
-
<div class="ms-3 text-sm font-normal"><%= message %></div>
|
|
4
|
-
<% if dismissible %>
|
|
5
|
-
<button type="button" class="ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700" aria-label="Close">
|
|
6
|
-
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
7
|
-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/>
|
|
8
|
-
</svg>
|
|
9
|
-
</button>
|
|
10
|
-
<% end %>
|
|
11
|
-
</div>
|
|
File without changes
|