matestack-ui-bootstrap 1.4.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +17 -5
- data/README.md +53 -19
- data/lib/matestack/ui/bootstrap.rb +97 -17
- data/{app/concepts → lib}/matestack/ui/bootstrap/apps/admin_template.rb +14 -7
- data/lib/matestack/ui/bootstrap/base_component.rb +13 -0
- data/lib/matestack/ui/bootstrap/base_vue_js_component.rb +13 -0
- data/lib/matestack/ui/bootstrap/components/accordion.rb +58 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/alert.js +12 -9
- data/lib/matestack/ui/bootstrap/components/alert.rb +43 -0
- data/lib/matestack/ui/bootstrap/components/avatar.rb +27 -0
- data/lib/matestack/ui/bootstrap/components/badge.rb +32 -0
- data/lib/matestack/ui/bootstrap/components/breadcrumb.rb +50 -0
- data/lib/matestack/ui/bootstrap/components/button.rb +71 -0
- data/lib/matestack/ui/bootstrap/components/button_group.rb +36 -0
- data/lib/matestack/ui/bootstrap/components/card.rb +105 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/carousel.js +21 -18
- data/lib/matestack/ui/bootstrap/components/carousel.rb +103 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/close.rb +10 -9
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/collapse.js +20 -17
- data/lib/matestack/ui/bootstrap/components/collapse.rb +54 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/dropdown.js +5 -2
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/dropdown.rb +31 -26
- data/lib/matestack/ui/bootstrap/components/icon.rb +21 -0
- data/lib/matestack/ui/bootstrap/components/list_group.rb +148 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/modal.js +24 -21
- data/lib/matestack/ui/bootstrap/components/modal.rb +121 -0
- data/lib/matestack/ui/bootstrap/components/navbar.rb +163 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/page_heading.rb +7 -5
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/pagination.rb +15 -13
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/popover.js +4 -1
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/popover.rb +26 -22
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/progress.rb +24 -24
- data/lib/matestack/ui/bootstrap/components/scrollspy.rb +50 -0
- data/lib/matestack/ui/bootstrap/components/section_card.rb +33 -0
- data/lib/matestack/ui/bootstrap/components/spinner.rb +35 -0
- data/lib/matestack/ui/bootstrap/components/tab_nav.rb +79 -0
- data/lib/matestack/ui/bootstrap/components/tab_nav_content.rb +35 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/toast.js +27 -18
- data/lib/matestack/ui/bootstrap/components/toast.rb +113 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/components/tooltip.js +4 -1
- data/lib/matestack/ui/bootstrap/components/tooltip.rb +66 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/content/figure.rb +4 -2
- data/lib/matestack/ui/bootstrap/content/smart_collection/collection.rb +120 -0
- data/{app/concepts/matestack/ui/bootstrap/content/collection → lib/matestack/ui/bootstrap/content/smart_collection}/collection.scss +0 -0
- data/lib/matestack/ui/bootstrap/content/smart_collection/content.rb +118 -0
- data/{app/concepts/matestack/ui/bootstrap/content/collection → lib/matestack/ui/bootstrap/content/smart_collection}/filter.rb +7 -3
- data/{app/concepts/matestack/ui/bootstrap/content/collection → lib/matestack/ui/bootstrap/content/smart_collection}/paginate.rb +19 -14
- data/lib/matestack/ui/bootstrap/form/checkbox.rb +90 -0
- data/lib/matestack/ui/bootstrap/form/input.rb +118 -0
- data/lib/matestack/ui/bootstrap/form/radio.rb +57 -0
- data/lib/matestack/ui/bootstrap/form/select.rb +63 -0
- data/lib/matestack/ui/bootstrap/form/submit.rb +20 -0
- data/lib/matestack/ui/bootstrap/form/switch.rb +32 -0
- data/lib/matestack/ui/bootstrap/form/textarea.rb +49 -0
- data/lib/matestack/ui/bootstrap/index.js +24 -0
- data/lib/matestack/ui/bootstrap/layout/column.rb +49 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/layout/container.rb +12 -9
- data/lib/matestack/ui/bootstrap/layout/row.rb +25 -0
- data/{app/concepts → lib}/matestack/ui/bootstrap/layout/sidebar.js +5 -2
- data/{app/concepts → lib}/matestack/ui/bootstrap/layout/sidebar.rb +10 -10
- data/{app/concepts → lib}/matestack/ui/bootstrap/layout/sidebar.scss +0 -0
- data/lib/matestack/ui/bootstrap/registry.rb +173 -0
- data/{app/javascript/matestack-ui-bootstrap → lib/matestack/ui/bootstrap}/stylesheets/matestack-ui-bootstrap.scss +0 -0
- data/lib/matestack/ui/bootstrap/version.rb +1 -1
- data/lib/tasks/matestack/ui/bootstrap_tasks.rake +25 -25
- metadata +68 -76
- data/app/assets/images/avatar-placeholder.png +0 -0
- data/app/assets/images/icons/bootstrap-icons.svg +0 -1
- data/app/concepts/matestack/ui/bootstrap/components/accordion.rb +0 -53
- data/app/concepts/matestack/ui/bootstrap/components/alert.rb +0 -34
- data/app/concepts/matestack/ui/bootstrap/components/avatar.rb +0 -27
- data/app/concepts/matestack/ui/bootstrap/components/badge.rb +0 -30
- data/app/concepts/matestack/ui/bootstrap/components/breadcrumb.rb +0 -46
- data/app/concepts/matestack/ui/bootstrap/components/button.rb +0 -54
- data/app/concepts/matestack/ui/bootstrap/components/button_group.rb +0 -36
- data/app/concepts/matestack/ui/bootstrap/components/card.rb +0 -100
- data/app/concepts/matestack/ui/bootstrap/components/carousel.rb +0 -85
- data/app/concepts/matestack/ui/bootstrap/components/chart.js +0 -232
- data/app/concepts/matestack/ui/bootstrap/components/chart.rb +0 -71
- data/app/concepts/matestack/ui/bootstrap/components/collapse.rb +0 -43
- data/app/concepts/matestack/ui/bootstrap/components/icon.rb +0 -19
- data/app/concepts/matestack/ui/bootstrap/components/list_group.rb +0 -83
- data/app/concepts/matestack/ui/bootstrap/components/modal.rb +0 -106
- data/app/concepts/matestack/ui/bootstrap/components/navbar.rb +0 -120
- data/app/concepts/matestack/ui/bootstrap/components/scrollspy.rb +0 -33
- data/app/concepts/matestack/ui/bootstrap/components/section_card.rb +0 -31
- data/app/concepts/matestack/ui/bootstrap/components/spinner.rb +0 -31
- data/app/concepts/matestack/ui/bootstrap/components/tab_nav.rb +0 -81
- data/app/concepts/matestack/ui/bootstrap/components/tab_nav_content.rb +0 -32
- data/app/concepts/matestack/ui/bootstrap/components/toast.rb +0 -99
- data/app/concepts/matestack/ui/bootstrap/components/tooltip.rb +0 -82
- data/app/concepts/matestack/ui/bootstrap/content/collection/collection.rb +0 -112
- data/app/concepts/matestack/ui/bootstrap/content/collection/content.rb +0 -101
- data/app/concepts/matestack/ui/bootstrap/form/checkbox.rb +0 -90
- data/app/concepts/matestack/ui/bootstrap/form/date.js +0 -38
- data/app/concepts/matestack/ui/bootstrap/form/date.rb +0 -98
- data/app/concepts/matestack/ui/bootstrap/form/input.rb +0 -123
- data/app/concepts/matestack/ui/bootstrap/form/radio.rb +0 -65
- data/app/concepts/matestack/ui/bootstrap/form/select.haml +0 -11
- data/app/concepts/matestack/ui/bootstrap/form/select.rb +0 -74
- data/app/concepts/matestack/ui/bootstrap/form/submit.rb +0 -20
- data/app/concepts/matestack/ui/bootstrap/form/switch.rb +0 -90
- data/app/concepts/matestack/ui/bootstrap/layout/column.rb +0 -47
- data/app/concepts/matestack/ui/bootstrap/layout/row.rb +0 -15
- data/app/concepts/matestack/ui/bootstrap/pages/devise/sign_in.rb +0 -40
- data/app/concepts/matestack/ui/bootstrap/registry.rb +0 -63
- data/app/helpers/matestack/ui/bootstrap/application_helper.rb +0 -13
- data/app/javascript/matestack-ui-bootstrap/index.js +0 -26
- data/app/javascript/packs/matestack-ui-bootstrap.js +0 -2
- data/config/routes.rb +0 -2
- data/lib/matestack/ui/bootstrap/engine.rb +0 -26
@@ -1,65 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Form::Radio < Matestack::Ui::Core::Form::Radio::Radio
|
2
|
-
|
3
|
-
optional :form_text
|
4
|
-
optional :disabled
|
5
|
-
optional :variant
|
6
|
-
|
7
|
-
def response
|
8
|
-
label class: "form-label", text: input_label if input_label
|
9
|
-
|
10
|
-
radio_options.to_a.each_with_index do |item, index|
|
11
|
-
div class: "form-check #{'form-check-inline' if variant == :inline}" do
|
12
|
-
input html_attributes.merge(
|
13
|
-
attributes: vue_attributes,
|
14
|
-
type: :radio,
|
15
|
-
id: "#{id_for_item(item_value(item))}",
|
16
|
-
name: item_name(item),
|
17
|
-
value: item_value(item),
|
18
|
-
class: radio_class,
|
19
|
-
disabled: disabled
|
20
|
-
)
|
21
|
-
label class: "form-check-label", text: item_label(item), for: id_for_item(item_value(item))
|
22
|
-
if index == radio_options.to_a.size - 1
|
23
|
-
render_errors
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
render_form_text if form_text
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
def radio_class
|
32
|
-
(options[:class] || "") << (" form-check-input")
|
33
|
-
end
|
34
|
-
|
35
|
-
def vue_attributes
|
36
|
-
(options[:attributes] || {}).merge({
|
37
|
-
"@change": change_event,
|
38
|
-
ref: "select.#{attr_key}",
|
39
|
-
'init-value': init_value,
|
40
|
-
'v-bind:class': "{ '#{input_error_class}': #{error_key} }",
|
41
|
-
'value-type': value_type,
|
42
|
-
"#{v_model_type}": input_key,
|
43
|
-
})
|
44
|
-
end
|
45
|
-
|
46
|
-
def render_form_text
|
47
|
-
div id: "form_text_for_#{attr_key}", class: "form-text" do
|
48
|
-
plain form_text
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def render_errors
|
53
|
-
unless @included_config[:errors] == false && (errors == false || errors.nil?) || errors == false
|
54
|
-
div class: 'invalid-feedback', attributes: { 'v-for': "error in #{error_key}" } do
|
55
|
-
plain '{{ error }}'
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def input_error_class
|
61
|
-
'is-invalid'
|
62
|
-
end
|
63
|
-
|
64
|
-
|
65
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
- if input_label
|
2
|
-
%label{ for: attr_key, class: "form-label" }= input_label
|
3
|
-
|
4
|
-
%select{ html_attributes.merge(vue_attributes) }
|
5
|
-
- if placeholder
|
6
|
-
%option{value: placeholder_value, disabled: true, selected: init_value.nil?}= placeholder
|
7
|
-
- select_options.to_a.each do |item|
|
8
|
-
%option{value: item_value(item), disabled: item_disabled(item)}= item_label(item)
|
9
|
-
= render_errors
|
10
|
-
- if form_text
|
11
|
-
= render_form_text
|
@@ -1,74 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Form::Select < Matestack::Ui::Core::Form::Select::Select
|
2
|
-
|
3
|
-
optional :variant
|
4
|
-
optional :size
|
5
|
-
optional :form_text
|
6
|
-
|
7
|
-
def vue_attributes
|
8
|
-
(options[:attributes] || {}).merge({
|
9
|
-
"@change": change_event,
|
10
|
-
ref: vue_ref,
|
11
|
-
'init-value': determine_init_value,
|
12
|
-
'v-bind:class': "{ '#{input_error_class}': #{error_key} }",
|
13
|
-
'value-type': value_type,
|
14
|
-
'class': form_select_class,
|
15
|
-
'size': size_class,
|
16
|
-
'id': attr_key,
|
17
|
-
"#{v_model_type}": input_key,
|
18
|
-
})
|
19
|
-
end
|
20
|
-
|
21
|
-
def form_select_class
|
22
|
-
case variant
|
23
|
-
when :lg
|
24
|
-
(options[:class] || "") << (" form-select form-select-lg")
|
25
|
-
when :sm
|
26
|
-
(options[:class] || "") << (" form-select form-select-sm")
|
27
|
-
else
|
28
|
-
(options[:class] || "") << (" form-select")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def size_class
|
33
|
-
size
|
34
|
-
end
|
35
|
-
|
36
|
-
def determine_init_value
|
37
|
-
if init_value
|
38
|
-
init_value
|
39
|
-
else
|
40
|
-
if multiple
|
41
|
-
[]
|
42
|
-
else
|
43
|
-
nil
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def placeholder_value
|
49
|
-
if multiple
|
50
|
-
'[]'
|
51
|
-
else
|
52
|
-
'null'
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def render_errors
|
57
|
-
unless @included_config[:errors] == false && (errors == false || errors.nil?) || errors == false
|
58
|
-
div class: 'invalid-feedback', attributes: { 'v-for': "error in #{error_key}" } do
|
59
|
-
plain '{{ error }}'
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def input_error_class
|
65
|
-
'is-invalid'
|
66
|
-
end
|
67
|
-
|
68
|
-
def render_form_text
|
69
|
-
div id: "form_text_for_#{attr_key}", class: "form-text" do
|
70
|
-
plain form_text
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Form::Submit < Matestack::Ui::Component
|
2
|
-
|
3
|
-
optional :button_variant
|
4
|
-
optional :spinner_variant
|
5
|
-
optional :text
|
6
|
-
optional :loading_text
|
7
|
-
|
8
|
-
def response
|
9
|
-
form_submit do
|
10
|
-
bs_btn type: "submit", variant: button_variant || :primary, attributes: { "v-if": "!loading()" } do
|
11
|
-
plain text || "Submit"
|
12
|
-
end
|
13
|
-
bs_btn type: "submit", variant: button_variant || :primary, attributes: { disabled: true, "v-if": "loading()" } do
|
14
|
-
bs_spinner variant: spinner_variant || :light, size: :sm
|
15
|
-
plain loading_text || "Loading..."
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
@@ -1,90 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Form::Switch < Matestack::Ui::Core::Form::Checkbox::Checkbox
|
2
|
-
|
3
|
-
optional :form_text
|
4
|
-
optional :disabled
|
5
|
-
optional :variant
|
6
|
-
|
7
|
-
def response
|
8
|
-
if !checkbox_options.empty?
|
9
|
-
label for: attr_key, class: "form-label", text: input_label if input_label
|
10
|
-
end
|
11
|
-
if !checkbox_options.empty?
|
12
|
-
multiple_switches
|
13
|
-
else
|
14
|
-
true_false_switch
|
15
|
-
end
|
16
|
-
render_form_text
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def checkbox_wrapper(options = {}, &block)
|
22
|
-
div class: "form-check form-switch #{'form-check-inline' if variant == :inline}", attributes: options[:attributes] do
|
23
|
-
yield
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
def bs_label(text:, for_input:)
|
28
|
-
label text: text, for: for_input, class: 'form-check-label'
|
29
|
-
end
|
30
|
-
|
31
|
-
def true_false_switch
|
32
|
-
checkbox_wrapper do
|
33
|
-
form_input type: :hidden, key: key, value: (false_value || 0), errors: false
|
34
|
-
input html_attributes.merge(
|
35
|
-
type: :checkbox,
|
36
|
-
id: "#{id_for_item(value)}",
|
37
|
-
name: item_name(key),
|
38
|
-
value: checked_value,
|
39
|
-
class: 'form-check-input',
|
40
|
-
disabled: disabled,
|
41
|
-
attributes: vue_attributes.merge(
|
42
|
-
ref: "input.#{attr_key}",
|
43
|
-
)
|
44
|
-
)
|
45
|
-
bs_label text: input_label, for_input: id_for_item(value)
|
46
|
-
render_errors
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def multiple_switches
|
51
|
-
checkbox_options.to_a.each do |item|
|
52
|
-
checkbox_wrapper do
|
53
|
-
input html_attributes.merge(
|
54
|
-
type: :checkbox,
|
55
|
-
id: "#{id_for_item(item_value(item))}",
|
56
|
-
name: item_name(item),
|
57
|
-
value: item_value(item),
|
58
|
-
class: 'form-check-input',
|
59
|
-
disabled: disabled,
|
60
|
-
attributes: vue_attributes
|
61
|
-
)
|
62
|
-
bs_label text: item_name(item), for_input: id_for_item(item_value(item))
|
63
|
-
render_errors if checkbox_options.to_a.last == item
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def render_errors
|
69
|
-
unless @included_config[:errors] == false && (errors == false || errors.nil?) || errors == false
|
70
|
-
div class: 'invalid-feedback', attributes: { 'v-for': "error in #{error_key}" } do
|
71
|
-
plain '{{ error }}'
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
def input_error_class
|
77
|
-
'is-invalid'
|
78
|
-
end
|
79
|
-
|
80
|
-
def checkbox_options
|
81
|
-
super || {}
|
82
|
-
end
|
83
|
-
|
84
|
-
def render_form_text
|
85
|
-
div id: "form_text_for_#{attr_key}", class: "form-text" do
|
86
|
-
plain form_text
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Layout::Column < Matestack::Ui::Component
|
2
|
-
|
3
|
-
COL_ATTRIBUTES = %i[default sm md lg xl xxl]
|
4
|
-
optional *COL_ATTRIBUTES
|
5
|
-
|
6
|
-
ORDER_ATTRIBUTES = %i[order order_sm order_md order_lg order_xl order_xxl]
|
7
|
-
optional *ORDER_ATTRIBUTES
|
8
|
-
|
9
|
-
OFFSET_ATTRIBUTES = %i[offset offset_sm offset_md offset_lg offset_xl offset_xxl]
|
10
|
-
optional *OFFSET_ATTRIBUTES
|
11
|
-
|
12
|
-
optional class: { as: :bs_class }
|
13
|
-
optional :align_self
|
14
|
-
|
15
|
-
def response
|
16
|
-
div col_attributes do
|
17
|
-
yield_components
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
protected
|
22
|
-
|
23
|
-
def col_attributes
|
24
|
-
html_attributes.merge(
|
25
|
-
class: col_classes,
|
26
|
-
attributes: options[:attributes]
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
|
-
def col_classes
|
31
|
-
classes = []
|
32
|
-
COL_ATTRIBUTES.each do |attrs|
|
33
|
-
classes << "col-#{ self.send(:"#{attrs}") }" if attrs == :default and self.send(:"#{attrs}")
|
34
|
-
classes << "col-#{attrs}-#{ self.send(:"#{attrs}") }" if attrs != :default and self.send(:"#{attrs}")
|
35
|
-
end
|
36
|
-
ORDER_ATTRIBUTES.each do |attrs|
|
37
|
-
classes << "#{attrs}-#{ self.send(:"#{attrs}") }".gsub('_', '-') if self.send(:"#{attrs}")
|
38
|
-
end
|
39
|
-
OFFSET_ATTRIBUTES.each do |attrs|
|
40
|
-
classes << "#{attrs}-#{ self.send(:"#{attrs}") }".gsub('_', '-') if self.send(:"#{attrs}")
|
41
|
-
end
|
42
|
-
classes << "align-self-#{align_self}" if align_self.present?
|
43
|
-
classes << "col" if classes.blank?
|
44
|
-
classes << bs_class
|
45
|
-
classes.join(' ').strip
|
46
|
-
end
|
47
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Layout::Row < Matestack::Ui::Component
|
2
|
-
def prepare
|
3
|
-
@row_classes = []
|
4
|
-
|
5
|
-
@row_classes << "align-items-#{options[:vertical]}" if options[:vertical].present?
|
6
|
-
@row_classes << "justify-content-#{options[:horizontal]}" if options[:horizontal].present?
|
7
|
-
@row_classes << "#{options[:class]}" if options[:class].present?
|
8
|
-
end
|
9
|
-
|
10
|
-
def response
|
11
|
-
div id: "#{options[:id]}", class: "row #{@row_classes.join(' ')}" do
|
12
|
-
yield_components
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
class Matestack::Ui::Bootstrap::Pages::Devise::SignIn < Matestack::Ui::Page
|
2
|
-
|
3
|
-
def response
|
4
|
-
bs_container class: "mt-5" do
|
5
|
-
bs_row class: "mt-5", vertical: :center, horizontal: :center do
|
6
|
-
bs_col md:4 do
|
7
|
-
login_form_partial
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
private
|
14
|
-
|
15
|
-
def login_form_partial
|
16
|
-
section class: "mt-5 rounded shadow-sm p-4 mb-4" do
|
17
|
-
heading size: 2, text: 'Sign in'
|
18
|
-
form form_config do
|
19
|
-
div class: "mb-3 mt-4" do
|
20
|
-
bs_form_input label: 'Email', key: :email, type: :email
|
21
|
-
end
|
22
|
-
div class: "mb-3" do
|
23
|
-
bs_form_input label: 'Password', key: :password, type: :password
|
24
|
-
end
|
25
|
-
div class: "mb-3" do
|
26
|
-
bs_form_submit text: "Sign in"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
toggle show_on: 'sign_in_failure' do
|
30
|
-
plain 'Your email or password is not valid.'
|
31
|
-
end
|
32
|
-
br
|
33
|
-
small text: "Dummy user: admin@matestack.io"
|
34
|
-
br
|
35
|
-
small text: "Dummy password: password"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
module Matestack::Ui::Bootstrap::Registry
|
2
|
-
|
3
|
-
COMPONENTS = {
|
4
|
-
bs_accordion: Matestack::Ui::Bootstrap::Components::Accordion,
|
5
|
-
bs_alert: Matestack::Ui::Bootstrap::Components::Alert,
|
6
|
-
bs_avatar: Matestack::Ui::Bootstrap::Components::Avatar,
|
7
|
-
bs_badge: Matestack::Ui::Bootstrap::Components::Badge,
|
8
|
-
bs_breadcrumb: Matestack::Ui::Bootstrap::Components::Breadcrumb,
|
9
|
-
bs_btn: Matestack::Ui::Bootstrap::Components::Button,
|
10
|
-
bs_btn_group: Matestack::Ui::Bootstrap::Components::ButtonGroup,
|
11
|
-
bs_card: Matestack::Ui::Bootstrap::Components::Card,
|
12
|
-
bs_carousel: Matestack::Ui::Bootstrap::Components::Carousel,
|
13
|
-
bs_chart: Matestack::Ui::Bootstrap::Components::Chart,
|
14
|
-
bs_close: Matestack::Ui::Bootstrap::Components::Close,
|
15
|
-
bs_collapse: Matestack::Ui::Bootstrap::Components::Collapse,
|
16
|
-
bs_dropdown: Matestack::Ui::Bootstrap::Components::Dropdown,
|
17
|
-
bs_icon: Matestack::Ui::Bootstrap::Components::Icon,
|
18
|
-
bs_list_group: Matestack::Ui::Bootstrap::Components::ListGroup,
|
19
|
-
bs_modal: Matestack::Ui::Bootstrap::Components::Modal,
|
20
|
-
bs_navbar: Matestack::Ui::Bootstrap::Components::Navbar,
|
21
|
-
bs_pagination: Matestack::Ui::Bootstrap::Components::Pagination,
|
22
|
-
bs_page_heading: Matestack::Ui::Bootstrap::Components::PageHeading,
|
23
|
-
bs_popover: Matestack::Ui::Bootstrap::Components::Popover,
|
24
|
-
bs_progress: Matestack::Ui::Bootstrap::Components::Progress,
|
25
|
-
bs_scrollspy: Matestack::Ui::Bootstrap::Components::Scrollspy,
|
26
|
-
bs_section_card: Matestack::Ui::Bootstrap::Components::SectionCard,
|
27
|
-
bs_spinner: Matestack::Ui::Bootstrap::Components::Spinner,
|
28
|
-
bs_tab_nav: Matestack::Ui::Bootstrap::Components::TabNav,
|
29
|
-
bs_tab_nav_content: Matestack::Ui::Bootstrap::Components::TabNavContent,
|
30
|
-
bs_toast: Matestack::Ui::Bootstrap::Components::Toast,
|
31
|
-
bs_tooltip: Matestack::Ui::Bootstrap::Components::Tooltip,
|
32
|
-
}
|
33
|
-
|
34
|
-
FORMS = {
|
35
|
-
bs_form_input: Matestack::Ui::Bootstrap::Form::Input,
|
36
|
-
bs_form_select: Matestack::Ui::Bootstrap::Form::Select,
|
37
|
-
bs_form_checkbox: Matestack::Ui::Bootstrap::Form::Checkbox,
|
38
|
-
bs_form_radio: Matestack::Ui::Bootstrap::Form::Radio,
|
39
|
-
bs_form_switch: Matestack::Ui::Bootstrap::Form::Switch,
|
40
|
-
bs_form_submit: Matestack::Ui::Bootstrap::Form::Submit,
|
41
|
-
bs_form_date: Matestack::Ui::Bootstrap::Form::Date,
|
42
|
-
}
|
43
|
-
|
44
|
-
CONTENT = {
|
45
|
-
bs_figure: Matestack::Ui::Bootstrap::Content::Figure,
|
46
|
-
bs_smart_collection: Matestack::Ui::Bootstrap::Content::Collection::Collection,
|
47
|
-
}
|
48
|
-
|
49
|
-
LAYOUTS = {
|
50
|
-
bs_col: Matestack::Ui::Bootstrap::Layout::Column,
|
51
|
-
bs_container: Matestack::Ui::Bootstrap::Layout::Container,
|
52
|
-
bs_row: Matestack::Ui::Bootstrap::Layout::Row,
|
53
|
-
bs_sidebar: Matestack::Ui::Bootstrap::Layout::Sidebar
|
54
|
-
}
|
55
|
-
|
56
|
-
Matestack::Ui::Core::Component::Registry.register_components(
|
57
|
-
**COMPONENTS,
|
58
|
-
**FORMS,
|
59
|
-
**CONTENT,
|
60
|
-
**LAYOUTS
|
61
|
-
)
|
62
|
-
|
63
|
-
end
|