<%= header %>
diff --git a/app/components/menu_component.rb b/app/components/DS/menu.rb
similarity index 81%
rename from app/components/menu_component.rb
rename to app/components/DS/menu.rb
index 850031fa..39ef35e9 100644
--- a/app/components/menu_component.rb
+++ b/app/components/DS/menu.rb
@@ -1,15 +1,15 @@
# frozen_string_literal: true
-class MenuComponent < ViewComponent::Base
+class DS::Menu < DesignSystemComponent
attr_reader :variant, :avatar_url, :initials, :placement, :offset, :icon_vertical, :no_padding, :testid
renders_one :button, ->(**button_options, &block) do
- options_with_target = button_options.merge(data: { menu_target: "button" })
+ options_with_target = button_options.merge(data: { DS__menu_target: "button" })
if block
content_tag(:button, **options_with_target, &block)
else
- ButtonComponent.new(**options_with_target)
+ DS::Button.new(**options_with_target)
end
end
@@ -19,7 +19,7 @@ class MenuComponent < ViewComponent::Base
renders_one :custom_content
- renders_many :items, MenuItemComponent
+ renders_many :items, DS::MenuItem
VARIANTS = %i[icon button avatar].freeze
diff --git a/app/components/menu_controller.js b/app/components/DS/menu_controller.js
similarity index 100%
rename from app/components/menu_controller.js
rename to app/components/DS/menu_controller.js
diff --git a/app/components/menu_item_component.html.erb b/app/components/DS/menu_item.html.erb
similarity index 100%
rename from app/components/menu_item_component.html.erb
rename to app/components/DS/menu_item.html.erb
diff --git a/app/components/menu_item_component.rb b/app/components/DS/menu_item.rb
similarity index 97%
rename from app/components/menu_item_component.rb
rename to app/components/DS/menu_item.rb
index 9270de11..5b099e7a 100644
--- a/app/components/menu_item_component.rb
+++ b/app/components/DS/menu_item.rb
@@ -1,4 +1,4 @@
-class MenuItemComponent < ViewComponent::Base
+class DS::MenuItem < DesignSystemComponent
VARIANTS = %i[link button divider].freeze
attr_reader :variant, :text, :icon, :href, :method, :destructive, :confirm, :frame, :opts
diff --git a/app/components/tab_component.rb b/app/components/DS/tab.rb
similarity index 75%
rename from app/components/tab_component.rb
rename to app/components/DS/tab.rb
index fc084a1a..d1e7e7a9 100644
--- a/app/components/tab_component.rb
+++ b/app/components/DS/tab.rb
@@ -1,4 +1,4 @@
-class TabComponent < ViewComponent::Base
+class DS::Tab < DesignSystemComponent
attr_reader :id, :label
def initialize(id:, label:)
diff --git a/app/components/DS/tabs.html.erb b/app/components/DS/tabs.html.erb
new file mode 100644
index 00000000..78ca02dd
--- /dev/null
+++ b/app/components/DS/tabs.html.erb
@@ -0,0 +1,18 @@
+<%= tag.div data: {
+ controller: "DS--tabs",
+ testid: testid,
+ DS__tabs_session_key_value: session_key,
+ DS__tabs_url_param_key_value: url_param_key,
+ DS__tabs_nav_btn_active_class: active_btn_classes,
+ DS__tabs_nav_btn_inactive_class: inactive_btn_classes
+} do %>
+ <% if unstyled? %>
+ <%= content %>
+ <% else %>
+ <%= nav %>
+
+ <% panels.each do |panel| %>
+ <%= panel %>
+ <% end %>
+ <% end %>
+<% end %>
diff --git a/app/components/tabs_component.rb b/app/components/DS/tabs.rb
similarity index 94%
rename from app/components/tabs_component.rb
rename to app/components/DS/tabs.rb
index 747a9420..a2c0ff95 100644
--- a/app/components/tabs_component.rb
+++ b/app/components/DS/tabs.rb
@@ -1,6 +1,6 @@
-class TabsComponent < ViewComponent::Base
+class DS::Tabs < DesignSystemComponent
renders_one :nav, ->(classes: nil) do
- Tabs::NavComponent.new(
+ DS::Tabs::Nav.new(
active_tab: active_tab,
active_btn_classes: active_btn_classes,
inactive_btn_classes: inactive_btn_classes,
@@ -13,7 +13,7 @@ class TabsComponent < ViewComponent::Base
content_tag(
:div,
class: ("hidden" unless tab_id == active_tab),
- data: { id: tab_id, tabs_target: "panel" },
+ data: { id: tab_id, DS__tabs_target: "panel" },
&block
)
end
diff --git a/app/components/tabs/nav_component.rb b/app/components/DS/tabs/nav.rb
similarity index 87%
rename from app/components/tabs/nav_component.rb
rename to app/components/DS/tabs/nav.rb
index 2c4e81ca..8e795588 100644
--- a/app/components/tabs/nav_component.rb
+++ b/app/components/DS/tabs/nav.rb
@@ -1,4 +1,4 @@
-class Tabs::NavComponent < ViewComponent::Base
+class DS::Tabs::Nav < DesignSystemComponent
erb_template <<~ERB
<%= tag.nav class: classes do %>
<% btns.each do |btn| %>
@@ -12,7 +12,7 @@ class Tabs::NavComponent < ViewComponent::Base
:button, label, id: id,
type: "button",
class: class_names(btn_classes, id == active_tab ? active_btn_classes : inactive_btn_classes, classes),
- data: { id: id, action: "tabs#show", tabs_target: "navBtn" },
+ data: { id: id, action: "DS--tabs#show", DS__tabs_target: "navBtn" },
&block
)
end
diff --git a/app/components/tabs/panel_component.rb b/app/components/DS/tabs/panel.rb
similarity index 69%
rename from app/components/tabs/panel_component.rb
rename to app/components/DS/tabs/panel.rb
index 3c34932a..f354e312 100644
--- a/app/components/tabs/panel_component.rb
+++ b/app/components/DS/tabs/panel.rb
@@ -1,4 +1,4 @@
-class Tabs::PanelComponent < ViewComponent::Base
+class DS::Tabs::Panel < DesignSystemComponent
attr_reader :tab_id
def initialize(tab_id:)
diff --git a/app/components/tabs_controller.js b/app/components/DS/tabs_controller.js
similarity index 100%
rename from app/components/tabs_controller.js
rename to app/components/DS/tabs_controller.js
diff --git a/app/components/toggle_component.html.erb b/app/components/DS/toggle.html.erb
similarity index 100%
rename from app/components/toggle_component.html.erb
rename to app/components/DS/toggle.html.erb
diff --git a/app/components/toggle_component.rb b/app/components/DS/toggle.rb
similarity index 95%
rename from app/components/toggle_component.rb
rename to app/components/DS/toggle.rb
index e3af85a8..c384a296 100644
--- a/app/components/toggle_component.rb
+++ b/app/components/DS/toggle.rb
@@ -1,4 +1,4 @@
-class ToggleComponent < ViewComponent::Base
+class DS::Toggle < DesignSystemComponent
attr_reader :id, :name, :checked, :disabled, :checked_value, :unchecked_value, :opts
def initialize(id:, name: nil, checked: false, disabled: false, checked_value: "1", unchecked_value: "0", **opts)
diff --git a/app/components/UI/account_page.html.erb b/app/components/UI/account_page.html.erb
index 7b02d30f..9b7c01ab 100644
--- a/app/components/UI/account_page.html.erb
+++ b/app/components/UI/account_page.html.erb
@@ -8,7 +8,7 @@
<% if tabs.count > 1 %>
- <%= render TabsComponent.new(active_tab: active_tab, url_param_key: "tab") do |tabs_container| %>
+ <%= render DS::Tabs.new(active_tab: active_tab, url_param_key: "tab") do |tabs_container| %>
<% tabs_container.with_nav(classes: "max-w-fit") do |nav| %>
<% tabs.each do |tab| %>
<% nav.with_btn(id: tab, label: tab.to_s.humanize, classes: "px-6") %>
diff --git a/app/components/design_system_component.rb b/app/components/design_system_component.rb
new file mode 100644
index 00000000..35d21681
--- /dev/null
+++ b/app/components/design_system_component.rb
@@ -0,0 +1,2 @@
+class DesignSystemComponent < ViewComponent::Base
+end
diff --git a/app/components/tabs_component.html.erb b/app/components/tabs_component.html.erb
deleted file mode 100644
index bfceddad..00000000
--- a/app/components/tabs_component.html.erb
+++ /dev/null
@@ -1,18 +0,0 @@
-<%= tag.div data: {
- controller: "tabs",
- testid: testid,
- tabs_session_key_value: session_key,
- tabs_url_param_key_value: url_param_key,
- tabs_nav_btn_active_class: active_btn_classes,
- tabs_nav_btn_inactive_class: inactive_btn_classes
-} do %>
- <% if unstyled? %>
- <%= content %>
- <% else %>
- <%= nav %>
-
- <% panels.each do |panel| %>
- <%= panel %>
- <% end %>
- <% end %>
-<% end %>
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 094cd840..3ec81e82 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -21,7 +21,7 @@ module ApplicationHelper
if custom
inline_svg_tag("#{key}.svg", class: icon_classes, **opts)
elsif as_button
- render ButtonComponent.new(variant: "icon", class: extra_classes, icon: key, size: size, type: "button", **opts)
+ render DS::Button.new(variant: "icon", class: extra_classes, icon: key, size: size, type: "button", **opts)
else
lucide_icon(key, class: icon_classes, **opts)
end
diff --git a/app/helpers/styled_form_builder.rb b/app/helpers/styled_form_builder.rb
index b614255d..f90888d7 100644
--- a/app/helpers/styled_form_builder.rb
+++ b/app/helpers/styled_form_builder.rb
@@ -50,7 +50,7 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder
checked = object ? object.send(method) : options[:checked]
@template.render(
- ToggleComponent.new(
+ DS::Toggle.new(
id: field_id,
name: field_name,
checked: checked,
@@ -67,7 +67,7 @@ class StyledFormBuilder < ActionView::Helpers::FormBuilder
value ||= submit_default_value
@template.render(
- ButtonComponent.new(
+ DS::Button.new(
text: value,
data: (options[:data] || {}).merge({ turbo_submits_with: "Submitting..." }),
full_width: true
diff --git a/app/views/accounts/_account.html.erb b/app/views/accounts/_account.html.erb
index 9430d605..b1e1be99 100644
--- a/app/views/accounts/_account.html.erb
+++ b/app/views/accounts/_account.html.erb
@@ -41,7 +41,7 @@
<% end %>
<% if account.draft? %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Complete setup",
href: edit_account_path(account, return_to: return_to),
variant: :outline,
@@ -49,7 +49,7 @@
) %>
<% elsif account.active? || account.disabled? %>
<%= form_with model: account, url: toggle_active_account_path(account), method: :patch, data: { turbo_frame: "_top", controller: "auto-submit-form" } do |f| %>
- <%= render ToggleComponent.new(
+ <%= render DS::Toggle.new(
id: "account_#{account.id}_active",
name: "active",
checked: account.active?,
diff --git a/app/views/accounts/_account_sidebar_tabs.html.erb b/app/views/accounts/_account_sidebar_tabs.html.erb
index 182bdd6e..8951cc3c 100644
--- a/app/views/accounts/_account_sidebar_tabs.html.erb
+++ b/app/views/accounts/_account_sidebar_tabs.html.erb
@@ -21,7 +21,7 @@
<% end %>
- <%= render TabsComponent.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>
+ <%= render DS::Tabs.new(active_tab: active_tab, session_key: "account_sidebar_tab", testid: "account-sidebar-tabs") do |tabs| %>
<% tabs.with_nav do |nav| %>
<% nav.with_btn(id: "asset", label: "Assets") %>
<% nav.with_btn(id: "liability", label: "Debts") %>
@@ -30,7 +30,7 @@
<% tabs.with_panel(tab_id: "asset") do %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New asset",
variant: "ghost",
href: new_account_path(step: "method_select", classification: "asset"),
@@ -50,7 +50,7 @@
<% tabs.with_panel(tab_id: "liability") do %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New debt",
variant: "ghost",
href: new_account_path(step: "method_select", classification: "liability"),
@@ -70,7 +70,7 @@
<% tabs.with_panel(tab_id: "all") do %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New account",
variant: "ghost",
full_width: true,
diff --git a/app/views/accounts/_account_type.html.erb b/app/views/accounts/_account_type.html.erb
index 9eb98d6e..741ace78 100644
--- a/app/views/accounts/_account_type.html.erb
+++ b/app/views/accounts/_account_type.html.erb
@@ -2,7 +2,7 @@
<%= link_to new_polymorphic_path(accountable, step: "method_select", return_to: params[:return_to]),
class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %>
- <%= render FilledIconComponent.new(
+ <%= render DS::FilledIcon.new(
icon: accountable.icon,
hex_color: accountable.color,
) %>
diff --git a/app/views/accounts/_accountable_group.html.erb b/app/views/accounts/_accountable_group.html.erb
index ccca2088..e3ae8d5a 100644
--- a/app/views/accounts/_accountable_group.html.erb
+++ b/app/views/accounts/_accountable_group.html.erb
@@ -2,7 +2,7 @@
<% is_open = open.nil? ? account_group.accounts.any? { |account| page_active?(account_path(account)) } : open %>
- <%= render DisclosureComponent.new(align: :left, open: is_open) do |disclosure| %>
+ <%= render DS::Disclosure.new(align: :left, open: is_open) do |disclosure| %>
<% disclosure.with_summary_content do %>
<%= icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
@@ -51,7 +51,7 @@
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
href: new_polymorphic_path(account_group.key, step: "method_select"),
text: "New #{account_group.name.downcase.singularize}",
icon: "plus",
diff --git a/app/views/accounts/_empty.html.erb b/app/views/accounts/_empty.html.erb
index a1eef715..4583616f 100644
--- a/app/views/accounts/_empty.html.erb
+++ b/app/views/accounts/_empty.html.erb
@@ -3,7 +3,7 @@
<%= tag.p t(".no_accounts"), class: "text-primary mb-1 font-medium" %>
<%= tag.p t(".empty_message"), class: "text-secondary mb-4" %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".new_account"),
href: new_account_path,
frame: :modal
diff --git a/app/views/accounts/_form.html.erb b/app/views/accounts/_form.html.erb
index ef2e0af5..d2139b56 100644
--- a/app/views/accounts/_form.html.erb
+++ b/app/views/accounts/_form.html.erb
@@ -1,7 +1,7 @@
<%# locals: (account:, url:) %>
<% if @error_message.present? %>
- <%= render AlertComponent.new(message: @error_message, variant: :error) %>
+ <%= render DS::Alert.new(message: @error_message, variant: :error) %>
<% end %>
<%= styled_form_with model: account, url: url, scope: :account, data: { turbo: false }, class: "flex flex-col gap-4 justify-between grow text-primary" do |form| %>
diff --git a/app/views/accounts/_logo.html.erb b/app/views/accounts/_logo.html.erb
index 8eec2153..1da8e0bc 100644
--- a/app/views/accounts/_logo.html.erb
+++ b/app/views/accounts/_logo.html.erb
@@ -12,5 +12,5 @@
<% elsif account.logo.attached? %>
<%= image_tag account.logo, class: "shrink-0 rounded-full #{size_classes[size]}" %>
<% else %>
- <%= render FilledIconComponent.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
+ <%= render DS::FilledIcon.new(variant: :text, hex_color: color || account.accountable.color, text: account.name, size: size, rounded: true) %>
<% end %>
diff --git a/app/views/accounts/index.html.erb b/app/views/accounts/index.html.erb
index 35e647ea..ff45d33f 100644
--- a/app/views/accounts/index.html.erb
+++ b/app/views/accounts/index.html.erb
@@ -2,7 +2,7 @@
<%= t(".accounts") %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New account",
href: new_account_path(return_to: accounts_path),
variant: "primary",
diff --git a/app/views/accounts/new.html.erb b/app/views/accounts/new.html.erb
index 1ca5229e..35407561 100644
--- a/app/views/accounts/new.html.erb
+++ b/app/views/accounts/new.html.erb
@@ -25,7 +25,7 @@
<%= button_to imports_path(import: { type: "AccountImport" }),
data: { turbo_frame: :_top },
class: "flex items-center gap-4 w-full text-center focus:outline-hidden hover:bg-surface-hover focus:bg-surface-hover fg-primary border border-transparent block px-2 rounded-lg p-2" do %>
- <%= render FilledIconComponent.new(
+ <%= render DS::FilledIcon.new(
icon: "download",
hex_color: "#F79009",
) %>
diff --git a/app/views/accounts/new/_container.html.erb b/app/views/accounts/new/_container.html.erb
index 2d3582f7..47a75ca9 100644
--- a/app/views/accounts/new/_container.html.erb
+++ b/app/views/accounts/new/_container.html.erb
@@ -1,11 +1,11 @@
<%# locals: (title:, back_path: nil) %>
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% if back_path %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "icon",
icon: "arrow-left",
href: back_path,
diff --git a/app/views/accounts/show/_activity.html.erb b/app/views/accounts/show/_activity.html.erb
index 3c454f2d..63e77110 100644
--- a/app/views/accounts/show/_activity.html.erb
+++ b/app/views/accounts/show/_activity.html.erb
@@ -5,7 +5,7 @@
<%= tag.h2 t(".title"), class: "font-medium text-lg" %>
<% unless @account.plaid_account_id.present? %>
- <%= render MenuComponent.new(variant: "button") do |menu| %>
+ <%= render DS::Menu.new(variant: "button") do |menu| %>
<% menu.with_button(text: "New", variant: "secondary", icon: "plus") %>
<% menu.with_item(
diff --git a/app/views/accounts/show/_header.html.erb b/app/views/accounts/show/_header.html.erb
index 06bcc3e2..421f188d 100644
--- a/app/views/accounts/show/_header.html.erb
+++ b/app/views/accounts/show/_header.html.erb
@@ -10,7 +10,7 @@
"><%= title %>
<% if account.draft? %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Complete setup",
href: edit_account_path(account),
variant: :outline,
diff --git a/app/views/accounts/show/_menu.html.erb b/app/views/accounts/show/_menu.html.erb
index 0691f34e..ef98ae9e 100644
--- a/app/views/accounts/show/_menu.html.erb
+++ b/app/views/accounts/show/_menu.html.erb
@@ -1,6 +1,6 @@
<%# locals: (account:) %>
-<%= render MenuComponent.new(testid: "account-menu") do |menu| %>
+<%= render DS::Menu.new(testid: "account-menu") do |menu| %>
<% menu.with_item(variant: "link", text: "Edit", href: edit_account_path(account), icon: "pencil-line", data: { turbo_frame: :modal }) %>
<% unless account.crypto? %>
diff --git a/app/views/budget_categories/_budget_category.html.erb b/app/views/budget_categories/_budget_category.html.erb
index 6ae6ff38..81e857a2 100644
--- a/app/views/budget_categories/_budget_category.html.erb
+++ b/app/views/budget_categories/_budget_category.html.erb
@@ -12,7 +12,7 @@
<% if budget_category.category.lucide_icon %>
<%= icon(budget_category.category.lucide_icon, color: "current") %>
<% else %>
- <%= render FilledIconComponent.new(
+ <%= render DS::FilledIcon.new(
variant: :text,
hex_color: budget_category.category.color,
text: budget_category.category.name,
diff --git a/app/views/budget_categories/_confirm_button.html.erb b/app/views/budget_categories/_confirm_button.html.erb
index f7e00a22..a9d98331 100644
--- a/app/views/budget_categories/_confirm_button.html.erb
+++ b/app/views/budget_categories/_confirm_button.html.erb
@@ -1,5 +1,5 @@
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: "Confirm",
variant: "primary",
full_width: true,
diff --git a/app/views/budget_categories/_no_categories.html.erb b/app/views/budget_categories/_no_categories.html.erb
index 927a0b2b..44d8915b 100644
--- a/app/views/budget_categories/_no_categories.html.erb
+++ b/app/views/budget_categories/_no_categories.html.erb
@@ -6,12 +6,12 @@
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: "Use defaults (recommended)",
href: bootstrap_categories_path,
) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New category",
variant: "outline",
icon: "plus",
diff --git a/app/views/budget_categories/show.html.erb b/app/views/budget_categories/show.html.erb
index d6e3ea1b..affb01af 100644
--- a/app/views/budget_categories/show.html.erb
+++ b/app/views/budget_categories/show.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new(variant: :drawer) do |dialog| %>
+<%= render DS::Dialog.new(variant: :drawer) do |dialog| %>
<% dialog.with_header do %>
Category
@@ -119,7 +119,7 @@
<% end %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "View all category transactions",
variant: "outline",
full_width: true,
diff --git a/app/views/budgets/_budget_donut.html.erb b/app/views/budgets/_budget_donut.html.erb
index 384830e5..8726f4e4 100644
--- a/app/views/budgets/_budget_donut.html.erb
+++ b/app/views/budgets/_budget_donut.html.erb
@@ -12,7 +12,7 @@
<%= format_money(budget.actual_spending_money) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "of #{budget.budgeted_spending_money.format}",
variant: "secondary",
icon: "pencil",
@@ -25,7 +25,7 @@
<%= format_money Money.new(0, budget.currency || budget.family.currency) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New budget",
size: "sm",
icon: "plus",
@@ -46,7 +46,7 @@
<%= format_money(bc.actual_spending_money) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "of #{bc.budgeted_spending_money.format(precision: 0)}",
variant: "secondary",
icon: "pencil",
diff --git a/app/views/budgets/_budget_header.html.erb b/app/views/budgets/_budget_header.html.erb
index c6c8ce21..6f7d59fc 100644
--- a/app/views/budgets/_budget_header.html.erb
+++ b/app/views/budgets/_budget_header.html.erb
@@ -3,7 +3,7 @@
<% if budget.previous_budget_param %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "icon",
icon: "chevron-left",
href: budget_path(budget.previous_budget_param),
@@ -15,7 +15,7 @@
<% end %>
<% if budget.next_budget_param %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "icon",
icon: "chevron-right",
href: budget_path(budget.next_budget_param),
@@ -27,7 +27,7 @@
<% end %>
- <%= render MenuComponent.new(variant: "button") do |menu| %>
+ <%= render DS::Menu.new(variant: "button") do |menu| %>
<% menu.with_button class: "flex items-center gap-1 hover:bg-alpha-black-25 cursor-pointer rounded-md p-2" do %>
<%= @budget.name %>
<%= icon("chevron-down") %>
@@ -39,7 +39,7 @@
<% end %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Today",
variant: "outline",
href: budget_path(Budget.date_to_param(Date.current)),
diff --git a/app/views/budgets/_over_allocation_warning.html.erb b/app/views/budgets/_over_allocation_warning.html.erb
index 8d9f5913..bd75fba2 100644
--- a/app/views/budgets/_over_allocation_warning.html.erb
+++ b/app/views/budgets/_over_allocation_warning.html.erb
@@ -4,7 +4,7 @@
<%= icon "alert-triangle", size: "lg", color: "destructive" %>
You have over-allocated your budget. Please fix your allocations.
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Fix allocations",
variant: "secondary",
size: "sm",
diff --git a/app/views/budgets/_picker.html.erb b/app/views/budgets/_picker.html.erb
index 4b112f30..a1deaea0 100644
--- a/app/views/budgets/_picker.html.erb
+++ b/app/views/budgets/_picker.html.erb
@@ -38,7 +38,7 @@
<% param_key = Budget.date_to_param(date) %>
<% if Budget.budget_date_valid?(date, family: family) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "ghost",
text: month_name,
href: budget_path(param_key),
diff --git a/app/views/budgets/edit.html.erb b/app/views/budgets/edit.html.erb
index 546aa54b..3ec00b22 100644
--- a/app/views/budgets/edit.html.erb
+++ b/app/views/budgets/edit.html.erb
@@ -29,7 +29,7 @@
- <%= render ToggleComponent.new(
+ <%= render DS::Toggle.new(
id: "auto_fill",
data: {
action: "change->budget-form#toggleAutoFill",
diff --git a/app/views/budgets/show.html.erb b/app/views/budgets/show.html.erb
index ff19bab1..de47b27c 100644
--- a/app/views/budgets/show.html.erb
+++ b/app/views/budgets/show.html.erb
@@ -18,7 +18,7 @@
<% if @budget.initialized? && @budget.available_to_allocate.positive? %>
- <%= render TabsComponent.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %>
+ <%= render DS::Tabs.new(active_tab: params[:tab].presence || "budgeted") do |tabs| %>
<% tabs.with_nav do |nav| %>
<% nav.with_btn(id: "budgeted", label: "Budgeted") %>
<% nav.with_btn(id: "actuals", label: "Actual") %>
@@ -49,7 +49,7 @@
Categories
<% if @budget.initialized? %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Edit",
variant: "secondary",
icon: "settings-2",
diff --git a/app/views/categories/_category.html.erb b/app/views/categories/_category.html.erb
index 1b49a045..dbc9b80f 100644
--- a/app/views/categories/_category.html.erb
+++ b/app/views/categories/_category.html.erb
@@ -12,7 +12,7 @@
- <%= render MenuComponent.new do |menu| %>
+ <%= render DS::Menu.new do |menu| %>
<% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil", href: edit_category_path(category), data: { turbo_frame: :modal }) %>
<% if category.transactions.any? %>
diff --git a/app/views/categories/_menu.html.erb b/app/views/categories/_menu.html.erb
index d6ec5d0b..f7c74eac 100644
--- a/app/views/categories/_menu.html.erb
+++ b/app/views/categories/_menu.html.erb
@@ -1,6 +1,6 @@
<%# locals: (transaction:) %>
-<%= render MenuComponent.new(variant: "button") do |menu| %>
+<%= render DS::Menu.new(variant: "button") do |menu| %>
<% menu.with_button do %>
<% render partial: "categories/badge", locals: { category: transaction.category } %>
<% end %>
diff --git a/app/views/categories/edit.html.erb b/app/views/categories/edit.html.erb
index dd8eb41c..b71dac59 100644
--- a/app/views/categories/edit.html.erb
+++ b/app/views/categories/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".edit")) %>
<% dialog.with_body do %>
<%= render "form", category: @category, categories: @categories %>
diff --git a/app/views/categories/index.html.erb b/app/views/categories/index.html.erb
index e15c0976..0c873915 100644
--- a/app/views/categories/index.html.erb
+++ b/app/views/categories/index.html.erb
@@ -2,7 +2,7 @@
<%= t(".categories") %>
- <%= render MenuComponent.new do |menu| %>
+ <%= render DS::Menu.new do |menu| %>
<% menu.with_item(
variant: "button",
text: "Delete all",
@@ -12,7 +12,7 @@
confirm: CustomConfirm.for_resource_deletion("all categories", high_severity: true)) %>
<% end %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".new"),
variant: "primary",
icon: "plus",
@@ -38,12 +38,12 @@
<%= t(".empty") %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: t(".bootstrap"),
href: bootstrap_categories_path,
) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".new"),
variant: "outline",
icon: "plus",
diff --git a/app/views/categories/new.html.erb b/app/views/categories/new.html.erb
index 09ac5cd7..73f69f64 100644
--- a/app/views/categories/new.html.erb
+++ b/app/views/categories/new.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".new_category")) %>
<% dialog.with_body do %>
<%= render "form", category: @category, categories: @categories %>
diff --git a/app/views/category/deletions/new.html.erb b/app/views/category/deletions/new.html.erb
index b199b880..2de9c6c9 100644
--- a/app/views/category/deletions/new.html.erb
+++ b/app/views/category/deletions/new.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".delete_category"), subtitle: t(".explanation", category_name: @category.name)) %>
<% dialog.with_body do %>
@@ -14,14 +14,14 @@
{ prompt: t(".replacement_category_prompt"), label: t(".category"), container_class: "mb-4" },
data: { deletion_target: "replacementField", action: "deletion#chooseSubmitButton" } %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
variant: "destructive",
text: t(".delete_and_leave_uncategorized", category_name: @category.name),
full_width: true,
data: { deletion_target: "destructiveSubmitButton" }
) %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: "Delete and reassign",
data: { deletion_target: "safeSubmitButton" },
hidden: true,
diff --git a/app/views/category/dropdowns/_row.html.erb b/app/views/category/dropdowns/_row.html.erb
index de1adff2..6e25d478 100644
--- a/app/views/category/dropdowns/_row.html.erb
+++ b/app/views/category/dropdowns/_row.html.erb
@@ -24,7 +24,7 @@
<%= render partial: "categories/badge", locals: { category: category } %>
<% end %>
- <%= render MenuComponent.new do |menu| %>
+ <%= render DS::Menu.new do |menu| %>
<% menu.with_item(variant: "link", text: t(".edit"), icon: "pencil-line", href: edit_category_path(category), data: { turbo_frame: :modal }) %>
<% menu.with_item(variant: "link", text: t(".delete"), icon: "trash-2", href: new_category_deletion_path(category), data: { turbo_frame: :modal }, destructive: true) %>
<% end %>
diff --git a/app/views/category/dropdowns/show.html.erb b/app/views/category/dropdowns/show.html.erb
index 6cc34e29..02ec05a7 100644
--- a/app/views/category/dropdowns/show.html.erb
+++ b/app/views/category/dropdowns/show.html.erb
@@ -29,7 +29,7 @@
<%= t(".empty") %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: t(".bootstrap"),
variant: "outline",
href: bootstrap_categories_path,
diff --git a/app/views/chats/_chat.html.erb b/app/views/chats/_chat.html.erb
index 129cdbe7..9eb35a0f 100644
--- a/app/views/chats/_chat.html.erb
+++ b/app/views/chats/_chat.html.erb
@@ -11,7 +11,7 @@
- <%= render MenuComponent.new(icon_vertical: true) do |menu| %>
+ <%= render DS::Menu.new(icon_vertical: true) do |menu| %>
<% menu.with_item(
variant: "link",
text: "Edit chat title",
diff --git a/app/views/chats/_chat_nav.html.erb b/app/views/chats/_chat_nav.html.erb
index 5f4d44b5..6cf7d28f 100644
--- a/app/views/chats/_chat_nav.html.erb
+++ b/app/views/chats/_chat_nav.html.erb
@@ -4,7 +4,7 @@
<% path = chat.new_record? ? chats_path : chats_path(previous_chat_id: chat.id) %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
id: "chat-nav-back",
variant: "icon",
icon: "menu",
@@ -18,7 +18,7 @@
- <%= render MenuComponent.new(icon_vertical: true) do |menu| %>
+ <%= render DS::Menu.new(icon_vertical: true) do |menu| %>
<% menu.with_item(variant: "link", text: "Start new chat", href: new_chat_path, icon: "plus") %>
<% unless chat.new_record? %>
diff --git a/app/views/chats/_error.html.erb b/app/views/chats/_error.html.erb
index d72dd13d..bbcb7581 100644
--- a/app/views/chats/_error.html.erb
+++ b/app/views/chats/_error.html.erb
@@ -10,7 +10,7 @@
Failed to generate response. Please try again.
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: "Retry",
href: retry_chat_path(chat),
) %>
diff --git a/app/views/chats/index.html.erb b/app/views/chats/index.html.erb
index 1b8f6d1d..0f450748 100644
--- a/app/views/chats/index.html.erb
+++ b/app/views/chats/index.html.erb
@@ -5,7 +5,7 @@
Chats
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
id: "new-chat",
icon: "plus",
variant: "icon",
diff --git a/app/views/credit_cards/_overview.html.erb b/app/views/credit_cards/_overview.html.erb
index fec910e0..1dfcbb0b 100644
--- a/app/views/credit_cards/_overview.html.erb
+++ b/app/views/credit_cards/_overview.html.erb
@@ -27,7 +27,7 @@
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Edit account details",
variant: "ghost",
href: edit_credit_card_path(account),
diff --git a/app/views/credit_cards/edit.html.erb b/app/views/credit_cards/edit.html.erb
index f30f68a0..5e95ffa5 100644
--- a/app/views/credit_cards/edit.html.erb
+++ b/app/views/credit_cards/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
<% dialog.with_body do %>
diff --git a/app/views/credit_cards/new.html.erb b/app/views/credit_cards/new.html.erb
index 95bca964..a81805f2 100644
--- a/app/views/credit_cards/new.html.erb
+++ b/app/views/credit_cards/new.html.erb
@@ -5,7 +5,7 @@
show_eu_link: @show_eu_link,
accountable_type: "CreditCard" %>
<% else %>
- <%= render DialogComponent.new do |dialog| %>
+ <%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "credit_cards/form", account: @account, url: credit_cards_path %>
diff --git a/app/views/cryptos/edit.html.erb b/app/views/cryptos/edit.html.erb
index 6b7812c2..0f08498d 100644
--- a/app/views/cryptos/edit.html.erb
+++ b/app/views/cryptos/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
<% dialog.with_body do %>
<%= render "form", account: @account, url: crypto_path(@account) %>
diff --git a/app/views/cryptos/new.html.erb b/app/views/cryptos/new.html.erb
index 8e93242f..97fcccdc 100644
--- a/app/views/cryptos/new.html.erb
+++ b/app/views/cryptos/new.html.erb
@@ -5,7 +5,7 @@
show_eu_link: @show_eu_link,
accountable_type: "Crypto" %>
<% else %>
- <%= render DialogComponent.new do |dialog| %>
+ <%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "form", account: @account, url: cryptos_path %>
diff --git a/app/views/depositories/edit.html.erb b/app/views/depositories/edit.html.erb
index 03d3e668..5b265f41 100644
--- a/app/views/depositories/edit.html.erb
+++ b/app/views/depositories/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
<% dialog.with_body do %>
<%= render "form", account: @account, url: depository_path(@account) %>
diff --git a/app/views/depositories/new.html.erb b/app/views/depositories/new.html.erb
index 23bbd79b..f75ed00b 100644
--- a/app/views/depositories/new.html.erb
+++ b/app/views/depositories/new.html.erb
@@ -5,7 +5,7 @@
show_eu_link: @show_eu_link,
accountable_type: "Depository" %>
<% else %>
- <%= render DialogComponent.new do |dialog| %>
+ <%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "depositories/form", account: @account, url: depositories_path %>
diff --git a/app/views/doorkeeper/authorizations/error.html.erb b/app/views/doorkeeper/authorizations/error.html.erb
index 8df12c18..401e191f 100644
--- a/app/views/doorkeeper/authorizations/error.html.erb
+++ b/app/views/doorkeeper/authorizations/error.html.erb
@@ -13,7 +13,7 @@
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Go back",
href: "javascript:history.back()",
variant: :secondary
diff --git a/app/views/doorkeeper/authorizations/new.html.erb b/app/views/doorkeeper/authorizations/new.html.erb
index 4c3a727a..30c3ebfa 100644
--- a/app/views/doorkeeper/authorizations/new.html.erb
+++ b/app/views/doorkeeper/authorizations/new.html.erb
@@ -37,7 +37,7 @@
<% if params[:display].present? %>
<%= hidden_field_tag :display, params[:display], id: nil %>
<% end %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: t("doorkeeper.authorizations.buttons.authorize"),
variant: :primary,
size: :lg,
@@ -59,7 +59,7 @@
<% if params[:display].present? %>
<%= hidden_field_tag :display, params[:display], id: nil %>
<% end %>
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: t("doorkeeper.authorizations.buttons.deny"),
variant: :outline,
size: :lg,
diff --git a/app/views/family_merchants/_family_merchant.html.erb b/app/views/family_merchants/_family_merchant.html.erb
index 7614699c..bc69a25f 100644
--- a/app/views/family_merchants/_family_merchant.html.erb
+++ b/app/views/family_merchants/_family_merchant.html.erb
@@ -15,7 +15,7 @@
- <%= render MenuComponent.new do |menu| %>
+ <%= render DS::Menu.new do |menu| %>
<% menu.with_item(variant: "link", text: "Edit", href: edit_family_merchant_path(family_merchant), icon: "pencil", data: { turbo_frame: "modal" }) %>
<% menu.with_item(
variant: "button",
diff --git a/app/views/family_merchants/edit.html.erb b/app/views/family_merchants/edit.html.erb
index 044ae422..f1dfd133 100644
--- a/app/views/family_merchants/edit.html.erb
+++ b/app/views/family_merchants/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "form", family_merchant: @family_merchant %>
diff --git a/app/views/family_merchants/index.html.erb b/app/views/family_merchants/index.html.erb
index a65efeb0..1ca1e940 100644
--- a/app/views/family_merchants/index.html.erb
+++ b/app/views/family_merchants/index.html.erb
@@ -1,7 +1,7 @@
Merchants
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New merchant",
variant: "primary",
href: new_family_merchant_path,
@@ -29,7 +29,7 @@
<%= t(".empty") %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".new"),
icon: "plus",
href: new_family_merchant_path,
diff --git a/app/views/family_merchants/new.html.erb b/app/views/family_merchants/new.html.erb
index 044ae422..f1dfd133 100644
--- a/app/views/family_merchants/new.html.erb
+++ b/app/views/family_merchants/new.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "form", family_merchant: @family_merchant %>
diff --git a/app/views/holdings/_cash.html.erb b/app/views/holdings/_cash.html.erb
index 98ce1d3a..6fde392d 100644
--- a/app/views/holdings/_cash.html.erb
+++ b/app/views/holdings/_cash.html.erb
@@ -4,7 +4,7 @@
- <%= render FilledIconComponent.new(
+ <%= render DS::FilledIcon.new(
variant: :text,
text: currency.symbol,
rounded: true,
diff --git a/app/views/holdings/show.html.erb b/app/views/holdings/show.html.erb
index 19e4b504..5088ef10 100644
--- a/app/views/holdings/show.html.erb
+++ b/app/views/holdings/show.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new(variant: "drawer") do |dialog| %>
+<%= render DS::Dialog.new(variant: "drawer") do |dialog| %>
<% dialog.with_header do %>
diff --git a/app/views/import/cleans/show.html.erb b/app/views/import/cleans/show.html.erb
index 4a743d01..c0bce7d7 100644
--- a/app/views/import/cleans/show.html.erb
+++ b/app/views/import/cleans/show.html.erb
@@ -17,7 +17,7 @@
Your data has been cleaned
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Next step",
variant: "primary",
href: import_confirm_path(@import),
diff --git a/app/views/import/configurations/show.html.erb b/app/views/import/configurations/show.html.erb
index 89e53e07..5eb408b1 100644
--- a/app/views/import/configurations/show.html.erb
+++ b/app/views/import/configurations/show.html.erb
@@ -18,8 +18,8 @@
We found a configuration from a previous import for this account. Would you like to apply it to this import?
- <%= render LinkComponent.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %>
- <%= render ButtonComponent.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
+ <%= render DS::Link.new(text: "Manually configure", href: import_configuration_path(@import), variant: "outline") %>
+ <%= render DS::Button.new(text: "Apply template", href: apply_template_import_path(@import), method: :put, data: { turbo_frame: :_top }) %>
diff --git a/app/views/import/confirms/_mappings.html.erb b/app/views/import/confirms/_mappings.html.erb
index 2fcb14ac..bd27ff32 100644
--- a/app/views/import/confirms/_mappings.html.erb
+++ b/app/views/import/confirms/_mappings.html.erb
@@ -11,7 +11,7 @@
<%= tag.p t(".no_accounts"), class: "text-sm" %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Create account",
variant: "primary",
href: new_account_path(return_to: import_confirm_path(import)),
@@ -25,7 +25,7 @@
<%= tag.p t(".unassigned_account"), class: "text-sm" %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".create_account"),
variant: "primary",
href: new_account_path(return_to: import_confirm_path(import)),
@@ -59,7 +59,7 @@
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Next",
variant: "primary",
href: is_last_step ? import_path(import) : url_for(step: step_idx + 2),
diff --git a/app/views/import/uploads/show.html.erb b/app/views/import/uploads/show.html.erb
index 1f390617..1115382e 100644
--- a/app/views/import/uploads/show.html.erb
+++ b/app/views/import/uploads/show.html.erb
@@ -11,7 +11,7 @@
<%= t(".description") %>
- <%= render TabsComponent.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %>
+ <%= render DS::Tabs.new(active_tab: params[:tab] || "csv-upload", url_param_key: "tab", testid: "import-tabs") do |tabs| %>
<% tabs.with_nav do |nav| %>
<% nav.with_btn(id: "csv-upload", label: "Upload CSV") %>
<% nav.with_btn(id: "csv-paste", label: "Copy & Paste") %>
diff --git a/app/views/imports/_empty.html.erb b/app/views/imports/_empty.html.erb
index 8f147797..dc864ea0 100644
--- a/app/views/imports/_empty.html.erb
+++ b/app/views/imports/_empty.html.erb
@@ -2,7 +2,7 @@
<%= t(".message") %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: t(".new"),
variant: "primary",
href: new_import_path,
diff --git a/app/views/imports/_failure.html.erb b/app/views/imports/_failure.html.erb
index 533d4e52..ee9e8b9f 100644
--- a/app/views/imports/_failure.html.erb
+++ b/app/views/imports/_failure.html.erb
@@ -11,6 +11,6 @@
Please check that your file format, for any errors and that all required fields are filled, then come back and try again.
- <%= render ButtonComponent.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
+ <%= render DS::Button.new(text: "Try again", href: publish_import_path(import), full_width: true) %>
diff --git a/app/views/imports/_import.html.erb b/app/views/imports/_import.html.erb
index 88a75dce..106b4d24 100644
--- a/app/views/imports/_import.html.erb
+++ b/app/views/imports/_import.html.erb
@@ -36,7 +36,7 @@
<% end %>
- <%= render MenuComponent.new do |menu| %>
+ <%= render DS::Menu.new do |menu| %>
<% menu.with_item(variant: "link", text: t(".view"), href: import_path(import), icon: "eye") %>
<% if import.complete? || import.revert_failed? %>
diff --git a/app/views/imports/_importing.html.erb b/app/views/imports/_importing.html.erb
index 490132a8..43d61f54 100644
--- a/app/views/imports/_importing.html.erb
+++ b/app/views/imports/_importing.html.erb
@@ -12,8 +12,8 @@
- <%= render LinkComponent.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %>
- <%= render LinkComponent.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
+ <%= render DS::Link.new(text: "Check status", href: import_path(import), variant: "primary", full_width: true) %>
+ <%= render DS::Link.new(text: "Back to dashboard", href: root_path, variant: "secondary", full_width: true) %>
diff --git a/app/views/imports/_ready.html.erb b/app/views/imports/_ready.html.erb
index d093694f..9ab7c0eb 100644
--- a/app/views/imports/_ready.html.erb
+++ b/app/views/imports/_ready.html.erb
@@ -35,5 +35,5 @@
- <%= render ButtonComponent.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
+ <%= render DS::Button.new(text: "Publish import", href: publish_import_path(import), full_width: true) %>
diff --git a/app/views/imports/_revert_failure.html.erb b/app/views/imports/_revert_failure.html.erb
index 6eacd786..ae072b74 100644
--- a/app/views/imports/_revert_failure.html.erb
+++ b/app/views/imports/_revert_failure.html.erb
@@ -11,7 +11,7 @@
Please try again or contact support.
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
text: "Try again",
full_width: true,
href: revert_import_path(import)
diff --git a/app/views/imports/_success.html.erb b/app/views/imports/_success.html.erb
index a1130c0d..c0849e94 100644
--- a/app/views/imports/_success.html.erb
+++ b/app/views/imports/_success.html.erb
@@ -11,7 +11,7 @@
Your imported data has been successfully added to the app and is now ready for use.
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Back to dashboard",
variant: "primary",
full_width: true,
diff --git a/app/views/imports/index.html.erb b/app/views/imports/index.html.erb
index 1a81ecdb..c2f2660f 100644
--- a/app/views/imports/index.html.erb
+++ b/app/views/imports/index.html.erb
@@ -1,7 +1,7 @@
<%= t(".title") %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "New import",
href: new_import_path,
icon: "plus",
diff --git a/app/views/imports/new.html.erb b/app/views/imports/new.html.erb
index a1fcbe0c..c436cb25 100644
--- a/app/views/imports/new.html.erb
+++ b/app/views/imports/new.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title"), subtitle: t(".description")) %>
<% dialog.with_body do %>
diff --git a/app/views/investments/edit.html.erb b/app/views/investments/edit.html.erb
index 433f118f..b9c83af4 100644
--- a/app/views/investments/edit.html.erb
+++ b/app/views/investments/edit.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".edit", account: @account.name)) %>
<% dialog.with_body do %>
<%= render "investments/form", account: @account, url: investment_path(@account) %>
diff --git a/app/views/investments/new.html.erb b/app/views/investments/new.html.erb
index 1c2fb8e4..acfaa6ed 100644
--- a/app/views/investments/new.html.erb
+++ b/app/views/investments/new.html.erb
@@ -5,7 +5,7 @@
show_eu_link: @show_eu_link,
accountable_type: "Investment" %>
<% else %>
- <%= render DialogComponent.new do |dialog| %>
+ <%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title")) %>
<% dialog.with_body do %>
<%= render "investments/form", account: @account, url: investments_path %>
diff --git a/app/views/invitations/new.html.erb b/app/views/invitations/new.html.erb
index 71e4d624..6968f72d 100644
--- a/app/views/invitations/new.html.erb
+++ b/app/views/invitations/new.html.erb
@@ -1,4 +1,4 @@
-<%= render DialogComponent.new do |dialog| %>
+<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: t(".title"), subtitle: t(".subtitle")) %>
<% dialog.with_body do %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index e8fc202e..c053e04d 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -60,7 +60,7 @@
- <%= render ButtonComponent.new(
+ <%= render DS::Button.new(
variant: "icon",
icon: "message-circle-question",
data: { action: "intercom#show" }
@@ -93,7 +93,7 @@
<%= Current.family.days_left_in_trial %> days remaining
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
text: "Upgrade",
href: upgrade_subscription_path,
) %>
diff --git a/app/views/layouts/imports.html.erb b/app/views/layouts/imports.html.erb
index 258cc0a4..09f15cf0 100644
--- a/app/views/layouts/imports.html.erb
+++ b/app/views/layouts/imports.html.erb
@@ -1,7 +1,7 @@
<%= render "layouts/shared/htmldoc" do %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "icon",
icon: "arrow-left",
href: content_for(:previous_path) || imports_path
@@ -11,7 +11,7 @@
<%= yield :header_nav %>
- <%= render LinkComponent.new(
+ <%= render DS::Link.new(
variant: "icon",
icon: "x",
href: imports_path
diff --git a/app/views/layouts/shared/_confirm_dialog.html.erb b/app/views/layouts/shared/_confirm_dialog.html.erb
index 8e513755..03e92381 100644
--- a/app/views/layouts/shared/_confirm_dialog.html.erb
+++ b/app/views/layouts/shared/_confirm_dialog.html.erb
@@ -1,6 +1,6 @@
<%# This dialog is used as an override to the browser's confirm API when submitting forms with data-turbo-confirm %>
<%# See confirm_dialog_controller.js and _htmldoc.html.erb %>
-<%= render DialogComponent.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %>
+<%= render DS::Dialog.new(id: "confirm-dialog", auto_open: false, data: { controller: "confirm-dialog" }, width: "sm", disable_frame: true) do |dialog| %>
<% dialog.with_body do %>