irelia 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -10
- data/Rakefile +18 -4
- data/app/assets/config/irelia_manifest.js +2 -2
- data/app/assets/dist/javascripts/irelia.js +1 -0
- data/app/assets/dist/stylesheets/irelia.css +1 -0
- data/app/assets/src/main.js +2 -0
- data/app/assets/src/main.pcss +245 -0
- data/app/components/index.js +7 -0
- data/app/components/index.pcss +38 -0
- data/app/components/irelia/app_shell/component.html.erb +18 -0
- data/app/components/irelia/app_shell/component.rb +14 -0
- data/app/components/irelia/app_shell/index.pcss +20 -0
- data/app/{frontend/components/page/header → components/irelia/app_shell}/preview.rb +1 -1
- data/app/components/irelia/app_shell/previews/default.html.erb +21 -0
- data/app/components/irelia/avatar/component.html.erb +3 -0
- data/app/components/irelia/avatar/component.rb +16 -0
- data/app/components/irelia/avatar/index.pcss +8 -0
- data/{lib/generators/view_component/templates/preview.rb.tt → app/components/irelia/avatar/preview.rb} +1 -1
- data/app/components/irelia/breadcrumbs/component.html.erb +12 -0
- data/app/components/irelia/breadcrumbs/component.rb +18 -0
- data/app/components/irelia/breadcrumbs/index.pcss +16 -0
- data/app/{frontend/components/page/container → components/irelia/breadcrumbs}/preview.rb +1 -1
- data/app/components/irelia/button/component.html.erb +27 -0
- data/app/components/irelia/button/component.rb +40 -0
- data/app/components/irelia/button/index.pcss +57 -0
- data/app/components/irelia/button/preview.rb +79 -0
- data/app/components/irelia/card/component.html.erb +5 -0
- data/app/components/irelia/card/component.rb +15 -0
- data/app/components/irelia/card/index.pcss +9 -0
- data/app/components/irelia/card/preview.rb +18 -0
- data/app/components/irelia/component.rb +55 -0
- data/app/components/irelia/component_preview.rb +7 -0
- data/app/components/irelia/container/component.rb +30 -0
- data/app/components/irelia/container/index.pcss +45 -0
- data/app/components/irelia/container/preview.rb +18 -0
- data/app/components/irelia/div/component.html.erb +3 -0
- data/app/components/irelia/div/component.rb +15 -0
- data/app/components/irelia/div/index.pcss +7 -0
- data/app/components/irelia/divider/component.html.erb +7 -0
- data/app/components/irelia/divider/component.rb +10 -0
- data/app/components/irelia/divider/index.pcss +15 -0
- data/app/components/irelia/dropdown/component.html.erb +17 -0
- data/app/components/irelia/dropdown/component.rb +52 -0
- data/app/components/irelia/dropdown/controller.js +14 -0
- data/app/components/irelia/dropdown/index.pcss +37 -0
- data/app/components/irelia/dropdown/preview.rb +42 -0
- data/app/components/irelia/dropdown/previews/direction_up.html.erb +10 -0
- data/app/components/irelia/empty_collection/component.html.erb +19 -0
- data/app/components/irelia/empty_collection/component.rb +15 -0
- data/app/components/irelia/empty_collection/index.pcss +23 -0
- data/app/components/irelia/empty_collection/preview.rb +9 -0
- data/app/components/irelia/flex/component.html.erb +3 -0
- data/app/components/irelia/flex/component.rb +21 -0
- data/app/components/irelia/flex/index.pcss +37 -0
- data/app/components/irelia/form/base/component.rb +51 -0
- data/app/components/irelia/form/base/index.pcss +7 -0
- data/app/components/irelia/form/email_field/component.html.erb +3 -0
- data/app/components/irelia/form/email_field/component.rb +10 -0
- data/app/components/irelia/form/email_field/index.pcss +7 -0
- data/app/{frontend/components/page/breadcrumbs → components/irelia/form/email_field}/preview.rb +1 -1
- data/app/components/irelia/form/email_field/previews/default.html.erb +3 -0
- data/app/components/irelia/form/group/component.html.erb +19 -0
- data/app/components/irelia/form/group/component.rb +26 -0
- data/app/components/irelia/form/group/index.pcss +32 -0
- data/app/components/irelia/form/password_field/component.html.erb +3 -0
- data/app/components/irelia/form/password_field/component.rb +10 -0
- data/app/components/irelia/form/password_field/index.pcss +7 -0
- data/app/components/irelia/form/password_field/preview.rb +9 -0
- data/app/components/irelia/form/password_field/previews/default.html.erb +3 -0
- data/app/components/irelia/form/select/component.html.erb +3 -0
- data/app/components/irelia/form/select/component.rb +18 -0
- data/app/components/irelia/form/select/index.pcss +7 -0
- data/app/components/irelia/form/select/preview.rb +9 -0
- data/app/components/irelia/form/select/previews/default.html.erb +3 -0
- data/app/components/irelia/form/text_field/component.html.erb +3 -0
- data/app/components/irelia/form/text_field/component.rb +10 -0
- data/app/components/irelia/form/text_field/index.pcss +7 -0
- data/app/components/irelia/form/text_field/preview.rb +9 -0
- data/app/components/irelia/form/text_field/previews/default.html.erb +3 -0
- data/app/components/irelia/html/component.html.erb +3 -0
- data/app/components/irelia/html/component.rb +10 -0
- data/app/components/irelia/html/index.pcss +16 -0
- data/app/components/irelia/html/preview.rb +9 -0
- data/app/components/irelia/icon/component.rb +18 -0
- data/app/components/irelia/icon/index.pcss +7 -0
- data/app/components/irelia/icon/preview.rb +10 -0
- data/app/components/irelia/icon/previews/font_awesome.html.erb +23 -0
- data/app/components/irelia/modal/component.html.erb +28 -0
- data/app/components/irelia/modal/component.rb +29 -0
- data/app/components/irelia/modal/controller.js +50 -0
- data/app/components/irelia/modal/index.pcss +41 -0
- data/app/{frontend/components/navbar/select_account → components/irelia/modal}/preview.rb +5 -2
- data/app/components/irelia/modal/previews/remote_content.html.erb +6 -0
- data/app/components/irelia/modal/previews/static_content.html.erb +4 -0
- data/app/components/irelia/navbar/brand/component.rb +25 -0
- data/app/components/irelia/navbar/brand/index.pcss +9 -0
- data/app/components/irelia/navbar/brand/preview.rb +10 -0
- data/app/components/irelia/navbar/component.html.erb +10 -0
- data/app/components/irelia/navbar/component.rb +20 -0
- data/app/components/irelia/navbar/index.pcss +13 -0
- data/app/components/irelia/navbar/navigation/component.html.erb +5 -0
- data/app/components/irelia/navbar/navigation/component.rb +15 -0
- data/app/components/irelia/navbar/navigation/index.pcss +9 -0
- data/app/components/irelia/navbar/navigation/link/component.html.erb +5 -0
- data/app/components/irelia/navbar/navigation/link/component.rb +18 -0
- data/app/components/irelia/navbar/navigation/link/index.pcss +13 -0
- data/app/components/irelia/navbar/navigation/link/preview.rb +10 -0
- data/app/components/irelia/navbar/navigation/preview.rb +15 -0
- data/app/components/irelia/navbar/preview.rb +17 -0
- data/app/components/irelia/navbar/previews/default.html.erb +19 -0
- data/app/components/irelia/navbar/previews/full_width.html.erb +19 -0
- data/app/components/irelia/navbar/previews/navigation_right.html.erb +19 -0
- data/app/components/irelia/navbar/section/component.html.erb +3 -0
- data/app/components/irelia/navbar/section/component.rb +13 -0
- data/app/components/irelia/navbar/section/index.pcss +8 -0
- data/app/components/irelia/navbar/separator/component.rb +14 -0
- data/app/components/irelia/navbar/separator/index.pcss +8 -0
- data/app/components/irelia/navigation/component.html.erb +7 -0
- data/app/components/irelia/navigation/component.rb +23 -0
- data/app/components/irelia/navigation/index.pcss +7 -0
- data/app/components/irelia/navigation/preview.rb +14 -0
- data/app/components/irelia/notification/component.html.erb +9 -0
- data/app/components/irelia/notification/component.rb +27 -0
- data/app/components/irelia/notification/index.pcss +41 -0
- data/app/components/irelia/notification/preview.rb +22 -0
- data/app/components/irelia/page_header/component.html.erb +15 -0
- data/app/components/irelia/page_header/component.rb +17 -0
- data/app/components/irelia/page_header/index.pcss +36 -0
- data/app/components/irelia/page_header/preview.rb +13 -0
- data/app/components/irelia/sidebar/brand/component.html.erb +6 -0
- data/app/components/irelia/sidebar/brand/component.rb +19 -0
- data/app/components/irelia/sidebar/brand/index.pcss +13 -0
- data/app/components/irelia/sidebar/brand/preview.rb +10 -0
- data/app/components/irelia/sidebar/component.html.erb +8 -0
- data/app/components/irelia/sidebar/component.rb +16 -0
- data/app/components/irelia/sidebar/index.pcss +12 -0
- data/app/components/irelia/sidebar/navigation/component.html.erb +5 -0
- data/app/components/irelia/sidebar/navigation/component.rb +12 -0
- data/app/components/irelia/sidebar/navigation/index.pcss +8 -0
- data/app/components/irelia/sidebar/navigation/link/component.html.erb +10 -0
- data/app/components/irelia/sidebar/navigation/link/component.rb +26 -0
- data/app/components/irelia/sidebar/navigation/link/index.pcss +20 -0
- data/app/components/irelia/sidebar/navigation/link/preview.rb +14 -0
- data/app/components/irelia/sidebar/navigation/preview.rb +16 -0
- data/app/components/irelia/sidebar/preview.rb +9 -0
- data/app/components/irelia/sidebar/previews/default.html.erb +12 -0
- data/app/components/irelia/sidebar/section/component.html.erb +3 -0
- data/app/components/irelia/sidebar/section/component.rb +16 -0
- data/app/components/irelia/sidebar/section/index.pcss +11 -0
- data/app/components/irelia/split_screen/component.html.erb +8 -0
- data/app/components/irelia/split_screen/component.rb +18 -0
- data/app/components/irelia/split_screen/index.pcss +35 -0
- data/app/components/irelia/split_screen/preview.rb +12 -0
- data/app/components/irelia/stack/component.html.erb +3 -0
- data/app/components/irelia/stack/component.rb +21 -0
- data/app/components/irelia/stack/index.pcss +25 -0
- data/app/components/irelia/stack/preview.rb +47 -0
- data/app/components/irelia/stack/previews/default.html.erb +5 -0
- data/app/components/irelia/stack/previews/horizontal.html.erb +5 -0
- data/app/components/irelia/stack/previews/vertical.html.erb +5 -0
- data/app/components/irelia/table/component.html.erb +23 -0
- data/app/components/irelia/table/component.rb +31 -0
- data/app/components/irelia/table/index.pcss +32 -0
- data/app/components/irelia/table/preview.rb +9 -0
- data/app/components/irelia/table/previews/default.html.erb +19 -0
- data/app/components/irelia/table/row/component.html.erb +5 -0
- data/app/components/irelia/table/row/component.rb +34 -0
- data/app/components/irelia/table/row/index.pcss +7 -0
- data/app/helpers/irelia/components_helper.rb +62 -0
- data/app/helpers/irelia/form_helper.rb +9 -0
- data/app/helpers/irelia/head_helper.rb +7 -0
- data/app/views/irelia/_head.html.erb +25 -0
- data/lib/irelia/config.rb +18 -0
- data/lib/irelia/engine.rb +13 -11
- data/lib/irelia/form_builder.rb +48 -0
- data/lib/irelia/options/fixed.rb +26 -0
- data/lib/irelia/options/flex/direction.rb +22 -0
- data/lib/irelia/options/flex/gap.rb +25 -0
- data/lib/irelia/options/flex/grow.rb +21 -0
- data/lib/irelia/options/flex/items.rb +25 -0
- data/lib/irelia/options/flex/justify.rb +27 -0
- data/lib/irelia/options/padding.rb +46 -0
- data/lib/irelia/options/text_formatting.rb +30 -0
- data/lib/irelia/options/width.rb +19 -0
- data/lib/irelia/version.rb +1 -1
- data/lib/irelia.rb +20 -24
- metadata +199 -168
- data/app/frontend/components/application_view_component.rb +0 -5
- data/app/frontend/components/application_view_component_preview.rb +0 -5
- data/app/frontend/components/navbar/button/component.html.erb +0 -8
- data/app/frontend/components/navbar/button/component.rb +0 -13
- data/app/frontend/components/navbar/button/preview.rb +0 -12
- data/app/frontend/components/navbar/container/component.html.erb +0 -5
- data/app/frontend/components/navbar/container/component.rb +0 -8
- data/app/frontend/components/navbar/container/preview.rb +0 -12
- data/app/frontend/components/navbar/dark_mode_switcher/component.html.erb +0 -4
- data/app/frontend/components/navbar/dark_mode_switcher/component.rb +0 -8
- data/app/frontend/components/navbar/dark_mode_switcher/preview.rb +0 -12
- data/app/frontend/components/navbar/menu_items/component.html.erb +0 -3
- data/app/frontend/components/navbar/menu_items/component.rb +0 -8
- data/app/frontend/components/navbar/menu_items/preview.rb +0 -12
- data/app/frontend/components/navbar/navlink/component.html.erb +0 -8
- data/app/frontend/components/navbar/navlink/component.rb +0 -13
- data/app/frontend/components/navbar/navlink/preview.rb +0 -12
- data/app/frontend/components/navbar/right_section/component.html.erb +0 -3
- data/app/frontend/components/navbar/right_section/component.rb +0 -8
- data/app/frontend/components/navbar/right_section/preview.rb +0 -12
- data/app/frontend/components/navbar/select_account/component.html.erb +0 -36
- data/app/frontend/components/navbar/select_account/component.rb +0 -6
- data/app/frontend/components/navbar/separator/component.html.erb +0 -1
- data/app/frontend/components/navbar/separator/component.rb +0 -7
- data/app/frontend/components/navbar/separator/preview.rb +0 -12
- data/app/frontend/components/page/breadcrumbs/component.html.erb +0 -16
- data/app/frontend/components/page/breadcrumbs/component.rb +0 -6
- data/app/frontend/components/page/container/component.html.erb +0 -3
- data/app/frontend/components/page/container/component.rb +0 -4
- data/app/frontend/components/page/header/component.html.erb +0 -12
- data/app/frontend/components/page/header/component.rb +0 -6
- data/app/helpers/navbar_helper.rb +0 -35
- data/app/helpers/page_helper.rb +0 -15
- data/app/javascript/controllers/dark_mode_switcher_controller.js +0 -20
- data/app/javascript/controllers/dropdown_controller.js +0 -3
- data/app/views/devise/registrations/new.html.erb +0 -21
- data/app/views/devise/sessions/new.html.erb +0 -18
- data/app/views/layouts/application.html.erb +0 -11
- data/app/views/layouts/devise.html.erb +0 -23
- data/app/views/layouts/mailer.html.erb +0 -13
- data/app/views/layouts/mailer.text.erb +0 -1
- data/app/views/layouts/teamable.html.erb +0 -31
- data/app/views/shared/_head.html.erb +0 -26
- data/app/views/shared/_navbar.html.erb +0 -30
- data/app/views/shared/_navbar_logo.html.erb +0 -3
- data/app/views/teamable/accounts/new.html.erb +0 -10
- data/app/views/teamable/setup/new.html.erb +0 -8
- data/app/views/teamable/shared/_form.html.erb +0 -4
- data/config/importmap.rb +0 -7
- data/config/initializers/devise.rb +0 -313
- data/config/initializers/simple_form.rb +0 -148
- data/config/initializers/view_component.rb +0 -18
- data/lib/generators/irelia/install_generator.rb +0 -19
- data/lib/generators/templates/irelia.rb +0 -14
- data/lib/generators/view_component/USAGE +0 -15
- data/lib/generators/view_component/templates/component.html.erb.tt +0 -1
- data/lib/generators/view_component/templates/component.rb.tt +0 -8
- data/lib/generators/view_component/templates/component_system_test.rb.tt +0 -13
- data/lib/generators/view_component/templates/component_test.rb.tt +0 -19
- data/lib/generators/view_component/view_component_generator.rb +0 -53
@@ -1,313 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Assuming you have not yet modified this file, each configuration option below
|
4
|
-
# is set to its default value. Note that some are commented out while others
|
5
|
-
# are not: uncommented lines are intended to protect your configuration from
|
6
|
-
# breaking changes in upgrades (i.e., in the event that future versions of
|
7
|
-
# Devise change the default values for those options).
|
8
|
-
#
|
9
|
-
# Use this hook to configure devise mailer, warden hooks and so forth.
|
10
|
-
# Many of these configuration options can be set straight in your model.
|
11
|
-
Devise.setup do |config|
|
12
|
-
# The secret key used by Devise. Devise uses this key to generate
|
13
|
-
# random tokens. Changing this key will render invalid all existing
|
14
|
-
# confirmation, reset password and unlock tokens in the database.
|
15
|
-
# Devise will use the `secret_key_base` as its `secret_key`
|
16
|
-
# by default. You can change it below and use your own secret key.
|
17
|
-
config.secret_key = Rails.application.secret_key_base
|
18
|
-
|
19
|
-
# ==> Controller configuration
|
20
|
-
# Configure the parent class to the devise controllers.
|
21
|
-
# config.parent_controller = 'DeviseController'
|
22
|
-
|
23
|
-
# ==> Mailer Configuration
|
24
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
25
|
-
# note that it will be overwritten if you use your own mailer class
|
26
|
-
# with default "from" parameter.
|
27
|
-
config.mailer_sender = Irelia.config.default_from_email
|
28
|
-
|
29
|
-
# Configure the class responsible to send e-mails.
|
30
|
-
# config.mailer = 'Devise::Mailer'
|
31
|
-
|
32
|
-
# Configure the parent class responsible to send e-mails.
|
33
|
-
# config.parent_mailer = 'ActionMailer::Base'
|
34
|
-
|
35
|
-
# ==> ORM configuration
|
36
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
37
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
38
|
-
# available as additional gems.
|
39
|
-
require "devise/orm/active_record"
|
40
|
-
|
41
|
-
# ==> Configuration for any authentication mechanism
|
42
|
-
# Configure which keys are used when authenticating a user. The default is
|
43
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
44
|
-
# authenticating a user, both parameters are required. Remember that those
|
45
|
-
# parameters are used only when authenticating and not when retrieving from
|
46
|
-
# session. If you need permissions, you should implement that in a before filter.
|
47
|
-
# You can also supply a hash where the value is a boolean determining whether
|
48
|
-
# or not authentication should be aborted when the value is not present.
|
49
|
-
# config.authentication_keys = [:email]
|
50
|
-
|
51
|
-
# Configure parameters from the request object used for authentication. Each entry
|
52
|
-
# given should be a request method and it will automatically be passed to the
|
53
|
-
# find_for_authentication method and considered in your model lookup. For instance,
|
54
|
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
55
|
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
56
|
-
# config.request_keys = []
|
57
|
-
|
58
|
-
# Configure which authentication keys should be case-insensitive.
|
59
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
60
|
-
# to authenticate or find a user. Default is :email.
|
61
|
-
config.case_insensitive_keys = [:email]
|
62
|
-
|
63
|
-
# Configure which authentication keys should have whitespace stripped.
|
64
|
-
# These keys will have whitespace before and after removed upon creating or
|
65
|
-
# modifying a user and when used to authenticate or find a user. Default is :email.
|
66
|
-
config.strip_whitespace_keys = [:email]
|
67
|
-
|
68
|
-
# Tell if authentication through request.params is enabled. True by default.
|
69
|
-
# It can be set to an array that will enable params authentication only for the
|
70
|
-
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
71
|
-
# enable it only for database (email + password) authentication.
|
72
|
-
# config.params_authenticatable = true
|
73
|
-
|
74
|
-
# Tell if authentication through HTTP Auth is enabled. False by default.
|
75
|
-
# It can be set to an array that will enable http authentication only for the
|
76
|
-
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
77
|
-
# enable it only for database authentication.
|
78
|
-
# For API-only applications to support authentication "out-of-the-box", you will likely want to
|
79
|
-
# enable this with :database unless you are using a custom strategy.
|
80
|
-
# The supported strategies are:
|
81
|
-
# :database = Support basic authentication with authentication key + password
|
82
|
-
# config.http_authenticatable = false
|
83
|
-
|
84
|
-
# If 401 status code should be returned for AJAX requests. True by default.
|
85
|
-
# config.http_authenticatable_on_xhr = true
|
86
|
-
|
87
|
-
# The realm used in Http Basic Authentication. 'Application' by default.
|
88
|
-
# config.http_authentication_realm = 'Application'
|
89
|
-
|
90
|
-
# It will change confirmation, password recovery and other workflows
|
91
|
-
# to behave the same regardless if the e-mail provided was right or wrong.
|
92
|
-
# Does not affect registerable.
|
93
|
-
# config.paranoid = true
|
94
|
-
|
95
|
-
# By default Devise will store the user in session. You can skip storage for
|
96
|
-
# particular strategies by setting this option.
|
97
|
-
# Notice that if you are skipping storage for all authentication paths, you
|
98
|
-
# may want to disable generating routes to Devise's sessions controller by
|
99
|
-
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
100
|
-
config.skip_session_storage = [:http_auth]
|
101
|
-
|
102
|
-
# By default, Devise cleans up the CSRF token on authentication to
|
103
|
-
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
104
|
-
# requests for sign in and sign up, you need to get a new CSRF token
|
105
|
-
# from the server. You can disable this option at your own risk.
|
106
|
-
# config.clean_up_csrf_token_on_authentication = true
|
107
|
-
|
108
|
-
# When false, Devise will not attempt to reload routes on eager load.
|
109
|
-
# This can reduce the time taken to boot the app but if your application
|
110
|
-
# requires the Devise mappings to be loaded during boot time the application
|
111
|
-
# won't boot properly.
|
112
|
-
# config.reload_routes = true
|
113
|
-
|
114
|
-
# ==> Configuration for :database_authenticatable
|
115
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 12. If
|
116
|
-
# using other algorithms, it sets how many times you want the password to be hashed.
|
117
|
-
# The number of stretches used for generating the hashed password are stored
|
118
|
-
# with the hashed password. This allows you to change the stretches without
|
119
|
-
# invalidating existing passwords.
|
120
|
-
#
|
121
|
-
# Limiting the stretches to just one in testing will increase the performance of
|
122
|
-
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
123
|
-
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
124
|
-
# algorithm), the cost increases exponentially with the number of stretches (e.g.
|
125
|
-
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
126
|
-
config.stretches = Rails.env.test? ? 1 : 12
|
127
|
-
|
128
|
-
# Set up a pepper to generate the hashed password.
|
129
|
-
# config.pepper = '328765a1e0da6be1e4f05e854d74c6d0de351547ba784b828e99d855b7c7b6c0ffd8946d8a7eca764672a4475d1f412353d1462c0078f2b23b38d61248f3bbf3'
|
130
|
-
|
131
|
-
# Send a notification to the original email when the user's email is changed.
|
132
|
-
# config.send_email_changed_notification = false
|
133
|
-
|
134
|
-
# Send a notification email when the user's password is changed.
|
135
|
-
# config.send_password_change_notification = false
|
136
|
-
|
137
|
-
# ==> Configuration for :confirmable
|
138
|
-
# A period that the user is allowed to access the website even without
|
139
|
-
# confirming their account. For instance, if set to 2.days, the user will be
|
140
|
-
# able to access the website for two days without confirming their account,
|
141
|
-
# access will be blocked just in the third day.
|
142
|
-
# You can also set it to nil, which will allow the user to access the website
|
143
|
-
# without confirming their account.
|
144
|
-
# Default is 0.days, meaning the user cannot access the website without
|
145
|
-
# confirming their account.
|
146
|
-
# config.allow_unconfirmed_access_for = 2.days
|
147
|
-
|
148
|
-
# A period that the user is allowed to confirm their account before their
|
149
|
-
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
150
|
-
# their account within 3 days after the mail was sent, but on the fourth day
|
151
|
-
# their account can't be confirmed with the token any more.
|
152
|
-
# Default is nil, meaning there is no restriction on how long a user can take
|
153
|
-
# before confirming their account.
|
154
|
-
# config.confirm_within = 3.days
|
155
|
-
|
156
|
-
# If true, requires any email changes to be confirmed (exactly the same way as
|
157
|
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
158
|
-
# db field (see migrations). Until confirmed, new email is stored in
|
159
|
-
# unconfirmed_email column, and copied to email column on successful confirmation.
|
160
|
-
config.reconfirmable = true
|
161
|
-
|
162
|
-
# Defines which key will be used when confirming an account
|
163
|
-
# config.confirmation_keys = [:email]
|
164
|
-
|
165
|
-
# ==> Configuration for :rememberable
|
166
|
-
# The time the user will be remembered without asking for credentials again.
|
167
|
-
# config.remember_for = 2.weeks
|
168
|
-
|
169
|
-
# Invalidates all the remember me tokens when the user signs out.
|
170
|
-
config.expire_all_remember_me_on_sign_out = true
|
171
|
-
|
172
|
-
# If true, extends the user's remember period when remembered via cookie.
|
173
|
-
# config.extend_remember_period = false
|
174
|
-
|
175
|
-
# Options to be passed to the created cookie. For instance, you can set
|
176
|
-
# secure: true in order to force SSL only cookies.
|
177
|
-
# config.rememberable_options = {}
|
178
|
-
|
179
|
-
# ==> Configuration for :validatable
|
180
|
-
# Range for password length.
|
181
|
-
config.password_length = 6..128
|
182
|
-
|
183
|
-
# Email regex used to validate email formats. It simply asserts that
|
184
|
-
# one (and only one) @ exists in the given string. This is mainly
|
185
|
-
# to give user feedback and not to assert the e-mail validity.
|
186
|
-
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
187
|
-
|
188
|
-
# ==> Configuration for :timeoutable
|
189
|
-
# The time you want to timeout the user session without activity. After this
|
190
|
-
# time the user will be asked for credentials again. Default is 30 minutes.
|
191
|
-
# config.timeout_in = 30.minutes
|
192
|
-
|
193
|
-
# ==> Configuration for :lockable
|
194
|
-
# Defines which strategy will be used to lock an account.
|
195
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
196
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
197
|
-
# config.lock_strategy = :failed_attempts
|
198
|
-
|
199
|
-
# Defines which key will be used when locking and unlocking an account
|
200
|
-
# config.unlock_keys = [:email]
|
201
|
-
|
202
|
-
# Defines which strategy will be used to unlock an account.
|
203
|
-
# :email = Sends an unlock link to the user email
|
204
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
205
|
-
# :both = Enables both strategies
|
206
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
207
|
-
# config.unlock_strategy = :both
|
208
|
-
|
209
|
-
# Number of authentication tries before locking an account if lock_strategy
|
210
|
-
# is failed attempts.
|
211
|
-
# config.maximum_attempts = 20
|
212
|
-
|
213
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
214
|
-
# config.unlock_in = 1.hour
|
215
|
-
|
216
|
-
# Warn on the last attempt before the account is locked.
|
217
|
-
# config.last_attempt_warning = true
|
218
|
-
|
219
|
-
# ==> Configuration for :recoverable
|
220
|
-
#
|
221
|
-
# Defines which key will be used when recovering the password for an account
|
222
|
-
# config.reset_password_keys = [:email]
|
223
|
-
|
224
|
-
# Time interval you can reset your password with a reset password key.
|
225
|
-
# Don't put a too small interval or your users won't have the time to
|
226
|
-
# change their passwords.
|
227
|
-
config.reset_password_within = 6.hours
|
228
|
-
|
229
|
-
# When set to false, does not sign a user in automatically after their password is
|
230
|
-
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
231
|
-
# config.sign_in_after_reset_password = true
|
232
|
-
|
233
|
-
# ==> Configuration for :encryptable
|
234
|
-
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
235
|
-
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
236
|
-
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
237
|
-
# for default behavior) and :restful_authentication_sha1 (then you should set
|
238
|
-
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
239
|
-
#
|
240
|
-
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
241
|
-
# config.encryptor = :sha512
|
242
|
-
|
243
|
-
# ==> Scopes configuration
|
244
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
245
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
246
|
-
# are using only default views.
|
247
|
-
# config.scoped_views = false
|
248
|
-
|
249
|
-
# Configure the default scope given to Warden. By default it's the first
|
250
|
-
# devise role declared in your routes (usually :user).
|
251
|
-
# config.default_scope = :user
|
252
|
-
|
253
|
-
# Set this configuration to false if you want /users/sign_out to sign out
|
254
|
-
# only the current scope. By default, Devise signs out all scopes.
|
255
|
-
# config.sign_out_all_scopes = true
|
256
|
-
|
257
|
-
# ==> Navigation configuration
|
258
|
-
# Lists the formats that should be treated as navigational. Formats like
|
259
|
-
# :html should redirect to the sign in page when the user does not have
|
260
|
-
# access, but formats like :xml or :json, should return 401.
|
261
|
-
#
|
262
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
263
|
-
# should add them to the navigational formats lists.
|
264
|
-
#
|
265
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
266
|
-
# config.navigational_formats = ['*/*', :html, :turbo_stream]
|
267
|
-
|
268
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
269
|
-
config.sign_out_via = :delete
|
270
|
-
|
271
|
-
# ==> OmniAuth
|
272
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
273
|
-
# up on your models and hooks.
|
274
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
275
|
-
|
276
|
-
# ==> Warden configuration
|
277
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
278
|
-
# change the failure app, you can configure them inside the config.warden block.
|
279
|
-
#
|
280
|
-
# config.warden do |manager|
|
281
|
-
# manager.intercept_401 = false
|
282
|
-
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
283
|
-
# end
|
284
|
-
|
285
|
-
# ==> Mountable engine configurations
|
286
|
-
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
287
|
-
# is mountable, there are some extra configurations to be taken into account.
|
288
|
-
# The following options are available, assuming the engine is mounted as:
|
289
|
-
#
|
290
|
-
# mount MyEngine, at: '/my_engine'
|
291
|
-
#
|
292
|
-
# The router that invoked `devise_for`, in the example above, would be:
|
293
|
-
# config.router_name = :my_engine
|
294
|
-
#
|
295
|
-
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
296
|
-
# so you need to do it manually. For the users scope, it would be:
|
297
|
-
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
298
|
-
|
299
|
-
# ==> Hotwire/Turbo configuration
|
300
|
-
# When using Devise with Hotwire/Turbo, the http status for error responses
|
301
|
-
# and some redirects must match the following. The default in Devise for existing
|
302
|
-
# apps is `200 OK` and `302 Found` respectively, but new apps are generated with
|
303
|
-
# these new defaults that match Hotwire/Turbo behavior.
|
304
|
-
# Note: These might become the new default in future versions of Devise.
|
305
|
-
config.responder.error_status = :unprocessable_entity
|
306
|
-
config.responder.redirect_status = :see_other
|
307
|
-
|
308
|
-
# ==> Configuration for :registerable
|
309
|
-
|
310
|
-
# When set to false, does not sign a user in automatically after their password is
|
311
|
-
# changed. Defaults to true, so a user is signed in automatically after changing a password.
|
312
|
-
# config.sign_in_after_change_password = true
|
313
|
-
end
|
@@ -1,148 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
#
|
4
|
-
# Uncomment this and change the path if necessary to include your own
|
5
|
-
# components.
|
6
|
-
# See https://github.com/heartcombo/simple_form#custom-components to know
|
7
|
-
# more about custom components.
|
8
|
-
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
|
9
|
-
#
|
10
|
-
# Use this setup block to configure all options available in SimpleForm.
|
11
|
-
SimpleForm.setup do |config|
|
12
|
-
config.wrappers :input, tag: "div", class: "w-full", error_class: "invalid", valid_class: "valid" do |w|
|
13
|
-
w.wrapper :input, tag: "div", class: "input-box bg-white p-5 rounded shadow text-sm flex flex-col gap-y-1.5 w-full relative" do |b|
|
14
|
-
b.use :html5
|
15
|
-
b.use :placeholder
|
16
|
-
|
17
|
-
b.optional :maxlength
|
18
|
-
b.optional :minlength
|
19
|
-
b.optional :pattern
|
20
|
-
b.optional :min_max
|
21
|
-
b.optional :readonly
|
22
|
-
|
23
|
-
b.use :hint, wrap_with: { tag: "span", class: "text-xs absolute mx-left absolute right-0 mr-4 text-neutral-400 italic" }
|
24
|
-
b.use :label, class: "text-neutral-700 font-bold text-sm uppercase whitespace-nowrap"
|
25
|
-
b.use :input, class: "appearance-none p-0 m-0 w-full border-0 focus:ring-0 focus:outline-none bg-white text-neutral-600 focus:text-primary-600 placeholder-neutral-400", error_class: "is-invalid"
|
26
|
-
end
|
27
|
-
|
28
|
-
w.use :error, wrap_with: { tag: "div", class: "text-xs text-rose-500 italic pt-1.5" }
|
29
|
-
end
|
30
|
-
|
31
|
-
config.wrappers :inline_checkbox, tag: "div", class: "flex items-center gap-x-4 w-full", error_class: "error" do |b|
|
32
|
-
b.use :html5
|
33
|
-
b.use :input, class: "appearance-none focus:ring-0 focus:outline-none w-5 h-5 accent-neutral-700 rounded border-neutral-200 shadow"
|
34
|
-
b.use :label, class: "py-2 w-full text-sm cursor-pointer"
|
35
|
-
|
36
|
-
b.use :error
|
37
|
-
end
|
38
|
-
|
39
|
-
# The default wrapper to be used by the FormBuilder.
|
40
|
-
config.default_wrapper = :input
|
41
|
-
|
42
|
-
# Define the way to render check boxes / radio buttons with labels.
|
43
|
-
# Defaults to :nested for bootstrap config.
|
44
|
-
# inline: input + label
|
45
|
-
# nested: label > input
|
46
|
-
config.boolean_style = :inline
|
47
|
-
|
48
|
-
# Default class for buttons
|
49
|
-
config.button_class = "bg-primary-700 hover:bg-primary-700 cursor-pointer text-white rounded shadow appearence-none font-bold px-8 py-3"
|
50
|
-
|
51
|
-
# Method used to tidy up errors. Specify any Rails Array method.
|
52
|
-
# :first lists the first message for each field.
|
53
|
-
# Use :to_sentence to list all errors for each field.
|
54
|
-
# config.error_method = :first
|
55
|
-
|
56
|
-
# Default tag used for error notification helper.
|
57
|
-
config.error_notification_tag = :div
|
58
|
-
|
59
|
-
# CSS class to add for error notification helper.
|
60
|
-
config.error_notification_class = "error_notification"
|
61
|
-
|
62
|
-
# Series of attempts to detect a default label method for collection.
|
63
|
-
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
64
|
-
|
65
|
-
# Series of attempts to detect a default value method for collection.
|
66
|
-
# config.collection_value_methods = [ :id, :to_s ]
|
67
|
-
|
68
|
-
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
69
|
-
# config.collection_wrapper_tag = nil
|
70
|
-
|
71
|
-
# You can define the class to use on all collection wrappers. Defaulting to none.
|
72
|
-
# config.collection_wrapper_class = nil
|
73
|
-
|
74
|
-
# You can wrap each item in a collection of radio/check boxes with a tag,
|
75
|
-
# defaulting to :span.
|
76
|
-
# config.item_wrapper_tag = :span
|
77
|
-
|
78
|
-
# You can define a class to use in all item wrappers. Defaulting to none.
|
79
|
-
# config.item_wrapper_class = nil
|
80
|
-
|
81
|
-
# How the label text should be generated altogether with the required text.
|
82
|
-
config.label_text = lambda { |label, required, explicit_label| "#{label}" }
|
83
|
-
|
84
|
-
# You can define the class to use on all labels. Default is nil.
|
85
|
-
# config.label_class = nil
|
86
|
-
|
87
|
-
# You can define the default class to be used on forms. Can be overridden
|
88
|
-
# with `html: { :class }`. Defaulting to none.
|
89
|
-
config.default_form_class = "p-0 m-0 flex flex-col gap-y-4"
|
90
|
-
|
91
|
-
# You can define which elements should obtain additional classes
|
92
|
-
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
93
|
-
|
94
|
-
# Whether attributes are required by default (or not). Default is true.
|
95
|
-
# config.required_by_default = true
|
96
|
-
|
97
|
-
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
98
|
-
# These validations are enabled in SimpleForm's internal config but disabled by default
|
99
|
-
# in this configuration, which is recommended due to some quirks from different browsers.
|
100
|
-
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
101
|
-
# change this configuration to true.
|
102
|
-
config.browser_validations = true
|
103
|
-
|
104
|
-
# Custom mappings for input types. This should be a hash containing a regexp
|
105
|
-
# to match as key, and the input type that will be used when the field name
|
106
|
-
# matches the regexp as value.
|
107
|
-
# config.input_mappings = { /count/ => :integer }
|
108
|
-
|
109
|
-
# Custom wrappers for input types. This should be a hash containing an input
|
110
|
-
# type as key and the wrapper that will be used for all inputs with specified type.
|
111
|
-
# config.wrapper_mappings = { string: :prepend }
|
112
|
-
|
113
|
-
# Namespaces where SimpleForm should look for custom input classes that
|
114
|
-
# override default inputs.
|
115
|
-
# config.custom_inputs_namespaces << "CustomInputs"
|
116
|
-
|
117
|
-
# Default priority for time_zone inputs.
|
118
|
-
# config.time_zone_priority = nil
|
119
|
-
|
120
|
-
# Default priority for country inputs.
|
121
|
-
# config.country_priority = nil
|
122
|
-
|
123
|
-
# When false, do not use translations for labels.
|
124
|
-
# config.translate_labels = true
|
125
|
-
|
126
|
-
# Automatically discover new inputs in Rails' autoload path.
|
127
|
-
# config.inputs_discovery = true
|
128
|
-
|
129
|
-
# Cache SimpleForm inputs discovery
|
130
|
-
# config.cache_discovery = !Rails.env.development?
|
131
|
-
|
132
|
-
# Default class for inputs
|
133
|
-
# config.input_class = nil
|
134
|
-
|
135
|
-
# Define the default class of the input wrapper of the boolean input.
|
136
|
-
config.boolean_label_class = "checkbox"
|
137
|
-
|
138
|
-
# Defines if the default input wrapper class should be included in radio
|
139
|
-
# collection wrappers.
|
140
|
-
config.include_default_input_wrapper_class = false
|
141
|
-
|
142
|
-
# Defines which i18n scope will be used in Simple Form.
|
143
|
-
# config.i18n_scope = 'simple_form'
|
144
|
-
|
145
|
-
# Defines validation classes to the input_field. By default it's nil.
|
146
|
-
config.input_field_valid_class = "valid"
|
147
|
-
config.input_field_error_class = "invalid"
|
148
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
ActiveSupport.on_load(:view_component) do
|
4
|
-
# Extend your preview controller to support authentication and other
|
5
|
-
# application-specific stuff
|
6
|
-
#
|
7
|
-
# Rails.application.config.to_prepare do
|
8
|
-
# ViewComponentsController.class_eval do
|
9
|
-
# include Authenticated
|
10
|
-
# end
|
11
|
-
# end
|
12
|
-
#
|
13
|
-
# Make it possible to store previews in sidecar folders
|
14
|
-
# See https://github.com/palkan/view_component-contrib#organizing-components-or-sidecar-pattern-extended
|
15
|
-
ViewComponent::Preview.extend ViewComponentContrib::Preview::Sidecarable
|
16
|
-
# Enable `self.abstract_class = true` to exclude previews from the list
|
17
|
-
ViewComponent::Preview.extend ViewComponentContrib::Preview::Abstract
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/generators/base"
|
4
|
-
require "rails/generators/active_model"
|
5
|
-
require "rails/generators/active_record/migration"
|
6
|
-
|
7
|
-
module Irelia
|
8
|
-
class InstallGenerator < Rails::Generators::Base
|
9
|
-
include Rails::Generators::Migration
|
10
|
-
|
11
|
-
source_root File.expand_path("../../templates", __FILE__)
|
12
|
-
|
13
|
-
desc "Creates the Irelia initializer."
|
14
|
-
|
15
|
-
def copy_initializers
|
16
|
-
template "irelia.rb", "config/initializers/irelia.rb"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Irelia.configure do |config|
|
4
|
-
# ==> Application configuration
|
5
|
-
# The name of the application. This will be displayed in the meta title
|
6
|
-
# and on various places in the application.
|
7
|
-
config.application_name = "Irelia"
|
8
|
-
|
9
|
-
# ==> Mailer configuration
|
10
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
|
-
# note that it will be overwritten if you use your own mailer class
|
12
|
-
# with default "from" parameter.
|
13
|
-
config.default_from_email = "please-change-me-at-config-initializers-irelia@example.com"
|
14
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
Description:
|
2
|
-
============
|
3
|
-
Creates a new view component, test and preview files.
|
4
|
-
Pass the component name, either CamelCased or under_scored, and an optional list of attributes as arguments.
|
5
|
-
|
6
|
-
Example:
|
7
|
-
========
|
8
|
-
bin/rails generate view_component Profile name age
|
9
|
-
|
10
|
-
creates a Profile component and test:
|
11
|
-
Component: app/frontend/components/profile/component.rb
|
12
|
-
Template: app/frontend/components/profile/component.html.erb
|
13
|
-
Test: test/frontend/components/profile_component_test.rb
|
14
|
-
System Test: test/system/frontend/components/profile_component_test.rb
|
15
|
-
Preview: app/frontend/components/profile/component_preview.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
<div>Add <%= class_name %> template here</div>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "application_system_test_case"
|
4
|
-
|
5
|
-
class <%= class_name %>::ComponentSystemTest < ApplicationSystemTestCase
|
6
|
-
def test_default_preview
|
7
|
-
visit("/rails/view_components<%= File.join(class_path, file_name) %>/default")
|
8
|
-
|
9
|
-
# assert_text "Hello!"
|
10
|
-
# click_on("Click me!")
|
11
|
-
# assert_text "Good-bye!"
|
12
|
-
end
|
13
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "test_helper"
|
4
|
-
|
5
|
-
class <%= class_name %>::ComponentTest < ViewComponent::TestCase
|
6
|
-
def test_renders
|
7
|
-
component = build_component
|
8
|
-
|
9
|
-
render_inline(component)
|
10
|
-
|
11
|
-
assert_selector "div"
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def build_component(**options)
|
17
|
-
<%= class_name %>::Component.new(**options)
|
18
|
-
end
|
19
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Based on https://github.com/github/view_component/blob/master/lib/rails/generators/component/component_generator.rb
|
4
|
-
class ViewComponentGenerator < Rails::Generators::NamedBase
|
5
|
-
source_root File.expand_path("templates", __dir__)
|
6
|
-
|
7
|
-
class_option :skip_test, type: :boolean, default: false
|
8
|
-
class_option :skip_system_test, type: :boolean, default: false
|
9
|
-
class_option :skip_preview, type: :boolean, default: false
|
10
|
-
|
11
|
-
argument :attributes, type: :array, default: [], banner: "attribute"
|
12
|
-
|
13
|
-
def create_component_file
|
14
|
-
template "component.rb", File.join("app/frontend/components", class_path, file_name, "component.rb")
|
15
|
-
end
|
16
|
-
|
17
|
-
def create_template_file
|
18
|
-
template "component.html.erb", File.join("app/frontend/components", class_path, file_name, "component.html.erb")
|
19
|
-
end
|
20
|
-
|
21
|
-
def create_test_file
|
22
|
-
return if options[:skip_test]
|
23
|
-
|
24
|
-
template "component_test.rb", File.join("test/frontend/components", class_path, "#{file_name}_test.rb")
|
25
|
-
end
|
26
|
-
|
27
|
-
def create_system_test_file
|
28
|
-
return if options[:skip_system_test]
|
29
|
-
|
30
|
-
template "component_system_test.rb", File.join("test/system/frontend/components", class_path, "#{file_name}_test.rb")
|
31
|
-
end
|
32
|
-
|
33
|
-
def create_preview_file
|
34
|
-
return if options[:skip_preview]
|
35
|
-
|
36
|
-
template "preview.rb", File.join("app/frontend/components", class_path, file_name, "preview.rb")
|
37
|
-
end
|
38
|
-
|
39
|
-
private
|
40
|
-
def parent_class
|
41
|
-
"ApplicationViewComponent"
|
42
|
-
end
|
43
|
-
|
44
|
-
def preview_parent_class
|
45
|
-
"ApplicationViewComponentPreview"
|
46
|
-
end
|
47
|
-
|
48
|
-
def initialize_signature
|
49
|
-
return if attributes.blank?
|
50
|
-
|
51
|
-
attributes.map { |attr| "option :#{attr.name}" }.join("\n ")
|
52
|
-
end
|
53
|
-
end
|