diff --git a/embedded_gems/pathogen/app/components/pathogen/tabs_panel.rb b/embedded_gems/pathogen/app/components/pathogen/tabs_panel.rb index 2c9c58f062..a4fe01802b 100644 --- a/embedded_gems/pathogen/app/components/pathogen/tabs_panel.rb +++ b/embedded_gems/pathogen/app/components/pathogen/tabs_panel.rb @@ -12,8 +12,8 @@ class TabsPanel < Pathogen::Component BODY_TAG_DEFAULT = :ul BODY_DEFAULT_CLASSES = 'flex flex-wrap text-sm font-medium text-center ' \ - 'text-slate-500 border-b border-slate-200 ' \ - 'dark:border-slate-700 dark:text-slate-400' + 'text-light-default border-b border-light-neutral-secondary ' \ + 'dark:border-dark-neutral-primary dark:text-dark-default' renders_many :tabs, lambda { |count: nil, selected: false, **system_arguments| Pathogen::TabsPanel::Tab.new( selected: selected, diff --git a/embedded_gems/pathogen/app/components/pathogen/tabs_panel/tab.rb b/embedded_gems/pathogen/app/components/pathogen/tabs_panel/tab.rb index 66846a1c71..ca1a35fa73 100644 --- a/embedded_gems/pathogen/app/components/pathogen/tabs_panel/tab.rb +++ b/embedded_gems/pathogen/app/components/pathogen/tabs_panel/tab.rb @@ -36,6 +36,7 @@ def initialize(controls:, tab_type:, selected: false, text: '', wrapper_argument @system_arguments[:'aria-current'] = @selected ? 'page' : 'false' @system_arguments[:classes] = generate_tab_classes @system_arguments[:'aria-controls'] = @controls + @system_arguments[:'aria-selected'] = @selected end # rubocop:enable Metrics/ParameterLists @@ -55,7 +56,7 @@ def default_tab_classes 'rounded-t-lg active dark:bg-dark-neutral-primary dark:text-dark-brand-onneutral' else 'inline-block p-4 rounded-t-lg hover:text-light-neutral-emphasis ' \ - 'hover:bg-slate-50 dark:hover:bg-slate-800 dark:hover:text-slate-300' + 'hover:bg-light-default dark:hover:bg-dark-neutral-primary-hover dark:hover:text-dark-onneutral-primary' end end diff --git a/test/components/pathogen/base_button_test.rb b/embedded_gems/pathogen/demo/test/components/base_button_test.rb similarity index 72% rename from test/components/pathogen/base_button_test.rb rename to embedded_gems/pathogen/demo/test/components/base_button_test.rb index e03697e846..2faa8b123d 100644 --- a/test/components/pathogen/base_button_test.rb +++ b/embedded_gems/pathogen/demo/test/components/base_button_test.rb @@ -3,40 +3,41 @@ require 'test_helper' module Pathogen + # Test for the BaseButton component class BaseButtonTest < ViewComponent::TestCase def test_renders_default_button - render_inline(BaseButton.new) { 'Click me' } + render_inline(Pathogen::BaseButton.new) { 'Click me' } assert_selector "button[type='button']", text: 'Click me' end def test_renders_anchor_tag - render_inline(BaseButton.new(tag: :a)) { 'Click me' } + render_inline(Pathogen::BaseButton.new(tag: :a)) { 'Click me' } assert_selector 'a', text: 'Click me' refute_selector 'a[type]' # Ensure type is not set on anchor tags end def test_renders_submit_button - render_inline(BaseButton.new(type: :submit)) { 'Submit' } + render_inline(Pathogen::BaseButton.new(type: :submit)) { 'Submit' } assert_selector "button[type='submit']", text: 'Submit' end def test_renders_reset_button - render_inline(BaseButton.new(type: :reset)) { 'Reset' } + render_inline(Pathogen::BaseButton.new(type: :reset)) { 'Reset' } assert_selector "button[type='reset']", text: 'Reset' end def test_handles_disabled_state - render_inline(BaseButton.new(disabled: true)) { 'Disabled' } + render_inline(Pathogen::BaseButton.new(disabled: true)) { 'Disabled' } assert_selector 'button[disabled]', text: 'Disabled' end def test_converts_disabled_anchor_to_button - render_inline(BaseButton.new(tag: :a, disabled: true)) { 'Disabled Link' } + render_inline(Pathogen::BaseButton.new(tag: :a, disabled: true)) { 'Disabled Link' } assert_selector 'button[disabled]', text: 'Disabled Link' refute_selector 'a' # Ensure it's not an anchor diff --git a/test/components/pathogen/base_component_test.rb b/embedded_gems/pathogen/demo/test/components/base_component_test.rb similarity index 100% rename from test/components/pathogen/base_component_test.rb rename to embedded_gems/pathogen/demo/test/components/base_component_test.rb diff --git a/test/components/pathogen/button_test.rb b/embedded_gems/pathogen/demo/test/components/button_test.rb similarity index 68% rename from test/components/pathogen/button_test.rb rename to embedded_gems/pathogen/demo/test/components/button_test.rb index a20e22950a..8b0f2a0627 100644 --- a/test/components/pathogen/button_test.rb +++ b/embedded_gems/pathogen/demo/test/components/button_test.rb @@ -19,7 +19,12 @@ class ButtonTest < ViewComponent::TestCase c.with_leading_visual_icon(icon: 'arrow-right') end render_inline(component) { 'Button' } - assert_selector 'button[data-test-selector="playground"]:not([disabled])', count: 1, visible: true, text: 'Button' + assert_selector( + 'button[data-test-selector="playground"]:not([disabled])', + count: 1, + visible: true, + text: 'Button' + ) assert_selector 'button svg.leading_visual_icon', count: 1 end @@ -28,7 +33,12 @@ class ButtonTest < ViewComponent::TestCase c.with_trailing_visual_icon(icon: 'arrow-right') end render_inline(component) { 'Button' } - assert_selector 'button[data-test-selector="playground"]:not([disabled])', count: 1, visible: true, text: 'Button' + assert_selector( + 'button[data-test-selector="playground"]:not([disabled])', + count: 1, + visible: true, + text: 'Button' + ) assert_selector 'button svg.trailing_visual_icon', count: 1 end @@ -38,13 +48,24 @@ class ButtonTest < ViewComponent::TestCase end test 'button with aria attributes' do - render_inline(Pathogen::Button.new(test_selector: 'playground', aria: { label: 'Custom Label', expanded: true })) { 'Button' } - assert_selector 'button[data-test-selector="playground"][aria-label="Custom Label"][aria-expanded="true"]', count: 1, visible: true, text: 'Button' + render_inline( + Pathogen::Button.new( + test_selector: 'playground', + aria: { label: 'Custom Label', expanded: true } + ) + ) { 'Button' } + assert_selector( + 'button[data-test-selector="playground"][aria-label="Custom Label"][aria-expanded="true"]', + count: 1, + visible: true, + text: 'Button' + ) end test 'button as a link' do render_inline(Pathogen::Button.new(test_selector: 'playground', tag: :a, href: '/example')) { 'Link Button' } - assert_selector 'a[data-test-selector="playground"][href="/example"]', count: 1, visible: true, text: 'Link Button' + assert_selector 'a[data-test-selector="playground"][href="/example"]', count: 1, visible: true, + text: 'Link Button' end end end diff --git a/embedded_gems/pathogen/demo/test/components/tabs_panel_test.rb b/embedded_gems/pathogen/demo/test/components/tabs_panel_test.rb new file mode 100644 index 0000000000..031bc6e905 --- /dev/null +++ b/embedded_gems/pathogen/demo/test/components/tabs_panel_test.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +require 'test_helper' + +module Pathogen + # Test for the TabsPanel component + class TabsPanelTest < ViewComponent::TestCase + test 'default panel' do + tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', test_selector: 'test_panel').tap do |tabs| + tabs.with_tab(selected: true, href: '#', text: 'Tab 1') + tabs.with_tab(selected: false, href: '#', text: 'Tab 2') + tabs.with_tab(selected: false, href: '#', text: 'Tab 3') + end + render_inline(tabs_component) + + assert_selector 'nav[data-test-selector="test_panel"]' + assert_selector 'ul[role="tablist"]', count: 1 + assert_selector 'li', count: 3 + assert_selector 'a[aria-current="page"][aria-selected="true"]', text: 'Tab 1' + assert_selector 'a[aria-selected="false"]', text: 'Tab 2' + assert_selector 'a[aria-selected="false"]', text: 'Tab 3' + end + + test 'default panel with counts' do + tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', test_selector: 'test_panel').tap do |tabs| + tabs.with_tab(selected: true, href: '#', text: 'Tab 1') do |tab| + tab.with_count(count: 1) + end + tabs.with_tab(selected: false, href: '#', text: 'Tab 2') do |tab| + tab.with_count(count: 10) + end + tabs.with_tab(selected: false, href: '#', text: 'Tab 3') do |tab| + tab.with_count(count: 100) + end + end + render_inline(tabs_component) + + # Selected tab + assert_selector 'a[aria-selected="true"] span', text: '1' + + # Unselected tabs + assert_selector 'a[aria-selected="false"] span', text: '10' + assert_selector 'a[aria-selected="false"] span', text: '100' + end + + test 'underline panel' do + tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', test_selector: 'test_panel', + type: 'underline').tap do |tabs| + tabs.with_tab(selected: true, href: '#', text: 'Tab 1') + tabs.with_tab(selected: false, href: '#', text: 'Tab 2') + tabs.with_tab(selected: false, href: '#', text: 'Tab 3') + end + render_inline(tabs_component) + + assert_selector 'nav[id="test_panel"]' + assert_selector 'ul[role="tablist"]', count: 1 + assert_selector 'li', count: 3 + assert_selector 'a[aria-selected="true"]', text: 'Tab 1' + assert_selector 'a[aria-selected="false"]', text: 'Tab 2' + assert_selector 'a[aria-selected="false"]', text: 'Tab 3' + end + + test 'underline panel with counts' do + tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', test_selector: 'test_panel', + type: 'underline').tap do |tabs| + tabs.with_tab(selected: true, href: '#', text: 'Tab 1') do |tab| + tab.with_count(count: 1) + end + tabs.with_tab(selected: false, href: '#', text: 'Tab 2') do |tab| + tab.with_count(count: 10) + end + tabs.with_tab(selected: false, href: '#', text: 'Tab 3') do |tab| + tab.with_count(count: 100) + end + end + render_inline(tabs_component) + + # Selected tab + assert_selector 'a[aria-selected="true"] span', text: '1' + + # Unselected tabs + assert_selector 'a[aria-selected="false"] span', text: '10' + assert_selector 'a[aria-selected="false"] span', text: '100' + end + end +end diff --git a/embedded_gems/pathogen/tailwind.config.js b/embedded_gems/pathogen/tailwind.config.js index 38001120c1..16bec68988 100644 --- a/embedded_gems/pathogen/tailwind.config.js +++ b/embedded_gems/pathogen/tailwind.config.js @@ -59,6 +59,7 @@ module.exports = { // Light mode "light-brand-primary": globalColors.brand[600], "light-neutral-primary": globalColors.neutral[400], + "light-neutral-secondary": globalColors.neutral[200], "light-danger-primary": globalColors.danger[400], // Dark mode diff --git a/test/components/pathogen/tabs_panel_test.rb b/test/components/pathogen/tabs_panel_test.rb deleted file mode 100644 index d863cc9ccb..0000000000 --- a/test/components/pathogen/tabs_panel_test.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -module Pathogen - class TabsPanelTest < ViewComponent::TestCase - test 'default panel' do - tabs_component = Pathogen::TabsPanel.new(id: 'test_panel').tap do |tabs| - tabs.with_tab(selected: true, href: '#', text: 'Tab 1') - tabs.with_tab(selected: false, href: '#', text: 'Tab 2') - tabs.with_tab(selected: false, href: '#', text: 'Tab 3') - end - render_inline(tabs_component) - - assert_selector 'nav[id="test_panel"]' - assert_selector 'ul[role="tablist"]', count: 1 - assert_selector 'li', count: 3 - assert_selector 'a[class="inline-block p-4 text-primary-600 bg-slate-100 ' \ - 'rounded-t-lg active dark:bg-slate-800 dark:text-primary-500"]', - text: 'Tab 1' - assert_selector 'a[class="inline-block p-4 rounded-t-lg hover:text-slate-600 ' \ - 'hover:bg-slate-50 dark:hover:bg-slate-800 dark:hover:text-slate-300"]', - text: 'Tab 2' - assert_selector 'a[class="inline-block p-4 rounded-t-lg hover:text-slate-600 ' \ - 'hover:bg-slate-50 dark:hover:bg-slate-800 dark:hover:text-slate-300"]', - text: 'Tab 3' - end - - test 'default panel with counts' do - tabs_component = Pathogen::TabsPanel.new(id: 'test_panel').tap do |tabs| - tabs.with_tab(selected: true, href: '#', text: 'Tab 1') do |tab| - tab.with_count(count: 1) - end - tabs.with_tab(selected: false, href: '#', text: 'Tab 2') do |tab| - tab.with_count(count: 10) - end - tabs.with_tab(selected: false, href: '#', text: 'Tab 3') do |tab| - tab.with_count(count: 100) - end - end - render_inline(tabs_component) - - # Selected tab - assert_selector 'span[class="bg-slate-300 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-500 dark:text-slate-300"]', - text: '1' - - # Unselected tabs - assert_selector 'span[class="bg-slate-100 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-700 dark:text-slate-300"]', - text: '10' - assert_selector 'span[class="bg-slate-100 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-700 dark:text-slate-300"]', - text: '100' - end - - test 'underline panel' do - tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', type: 'underline').tap do |tabs| - tabs.with_tab(selected: true, href: '#', text: 'Tab 1') - tabs.with_tab(selected: false, href: '#', text: 'Tab 2') - tabs.with_tab(selected: false, href: '#', text: 'Tab 3') - end - render_inline(tabs_component) - - assert_selector 'nav[id="test_panel"]' - assert_selector 'ul[role="tablist"]', count: 1 - assert_selector 'li', count: 3 - assert_selector 'a[class="inline-block p-4 text-primary-600 border-b-2 border-primary-600 ' \ - 'rounded-t-lg active dark:text-primary-500 dark:border-primary-500"]', - text: 'Tab 1' - assert_selector 'a[class="inline-block p-4 border-b-2 border-transparent rounded-t-lg ' \ - 'hover:text-slate-600 hover:border-slate-300 dark:hover:text-slate-300"]', - text: 'Tab 2' - assert_selector 'a[class="inline-block p-4 border-b-2 border-transparent rounded-t-lg ' \ - 'hover:text-slate-600 hover:border-slate-300 dark:hover:text-slate-300"]', - text: 'Tab 3' - end - - test 'underline panel with counts' do - tabs_component = Pathogen::TabsPanel.new(id: 'test_panel', type: 'underline').tap do |tabs| - tabs.with_tab(selected: true, href: '#', text: 'Tab 1') do |tab| - tab.with_count(count: 1) - end - tabs.with_tab(selected: false, href: '#', text: 'Tab 2') do |tab| - tab.with_count(count: 10) - end - tabs.with_tab(selected: false, href: '#', text: 'Tab 3') do |tab| - tab.with_count(count: 100) - end - end - render_inline(tabs_component) - - # Selected tab - assert_selector 'span[class="bg-slate-300 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-500 dark:text-slate-300"]', - text: '1' - - # Unselected tabs - assert_selector 'span[class="bg-slate-100 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-700 dark:text-slate-300"]', - text: '10' - assert_selector 'span[class="bg-slate-100 text-slate-800 text-xs ' \ - 'font-medium ms-2 px-2 py-1 rounded-full dark:bg-slate-700 dark:text-slate-300"]', - text: '100' - end - end -end diff --git a/test/components/previews/pathogen_button_preview.rb b/test/components/previews/pathogen_button_preview.rb deleted file mode 100644 index a7311127c4..0000000000 --- a/test/components/previews/pathogen_button_preview.rb +++ /dev/null @@ -1,89 +0,0 @@ -# frozen_string_literal: true - -class PathogenButtonPreview < ViewComponent::Preview - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param size select { choices: [small, medium] } "The size of the button." - # @param disabled toggle "The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants." - # @param block toggle "If true, the button will take up the full width of its container." - def playground(scheme: :default, size: :medium, disabled: false, block: false) - render Pathogen::Button.new(scheme:, size:, disabled:, block:, test_selector: 'playground') do - 'Button' - end - end - - # @param disabled toggle "The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants." - def default(disabled: false) - render Pathogen::Button.new(disabled:, test_selector: 'default') do - 'Button' - end - end - - # @param disabled toggle "The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants." - # @param block toggle "If true, the button will take up the full width of its container." - def primary(disabled: false, block: false) - render Pathogen::Button.new(scheme: :primary, disabled:, block:, test_selector: 'primary') do - 'Button' - end - end - - # @param disabled toggle "The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants." - # @param block toggle "If true, the button will take up the full width of its container." - def danger(disabled: false, block: false) - render Pathogen::Button.new(scheme: :danger, disabled:, block:, test_selector: 'danger') do - 'Button' - end - end - - def all_schemes; end - - def full_width - render Pathogen::Button.new(block: true, test_selector: 'full-width') do - 'Button' - end - end - - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param href text "The URL to link to." - # @param disabled toggle "The Boolean disabled attribute, when present, makes the element not mutable, focusable, or even submitted with the form. The user can neither edit nor focus on the control, nor its form control descendants." - def link_as_a_button(scheme: :default, href: '#', disabled: false) - render Pathogen::Button.new(scheme:, href:, tag: :a, disabled:, test_selector: 'link-as-a-button') do - 'Button' - end - end - - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param size select { choices: [small, medium] } "The size of the button." - def leading_visual(scheme: :primary, size: :medium) - render_with_template(locals: { - scheme:, - size: - }) - end - - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param size select { choices: [small, medium] } "The size of the button." - def leading_visual_svg(scheme: :primary, size: :medium) - render_with_template(locals: { - scheme:, - size: - }) - end - - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param size select { choices: [small, medium] } "The size of the button." - def trailing_visual(scheme: :primary, size: :medium) - render_with_template(locals: { - scheme:, - size: - }) - end - - # @param scheme select { choices: [default,primary, danger] } "The color scheme of the button." - # @param size select { choices: [small, medium] } "The size of the button." - def trailing_visual_svg(scheme: :primary, size: :medium) - render_with_template(locals: { - scheme:, - size: - }) - end -end diff --git a/test/components/previews/pathogen_button_preview/all_schemes.html.erb b/test/components/previews/pathogen_button_preview/all_schemes.html.erb deleted file mode 100644 index b3620f10a4..0000000000 --- a/test/components/previews/pathogen_button_preview/all_schemes.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -
- <%= render Pathogen::Button.new(scheme: :default) do %> - Button - <% end %> - - <%= render Pathogen::Button.new(scheme: :primary) do %> - Button - <% end %> - - <%= render Pathogen::Button.new(scheme: :danger) do %> - Button - <% end %> -
diff --git a/test/components/previews/pathogen_button_preview/leading_visual.html.erb b/test/components/previews/pathogen_button_preview/leading_visual.html.erb deleted file mode 100644 index 714db311a3..0000000000 --- a/test/components/previews/pathogen_button_preview/leading_visual.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= render Pathogen::Button.new(scheme:, size:) do |button| %> - <% button.with_leading_visual_icon(icon: "magnifying-glass") %> - Search -<% end %> diff --git a/test/components/previews/pathogen_button_preview/leading_visual_svg.html.erb b/test/components/previews/pathogen_button_preview/leading_visual_svg.html.erb deleted file mode 100644 index 1ddab85463..0000000000 --- a/test/components/previews/pathogen_button_preview/leading_visual_svg.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%= render Pathogen::Button.new(scheme:, size:) do |button| %> - <% button.with_leading_visual_svg do %> - - <% end %> - Warning -<% end %> diff --git a/test/components/previews/pathogen_button_preview/trailing_visual.html.erb b/test/components/previews/pathogen_button_preview/trailing_visual.html.erb deleted file mode 100644 index bdd73408fb..0000000000 --- a/test/components/previews/pathogen_button_preview/trailing_visual.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= render Pathogen::Button.new(scheme:, size:) do |button| %> - <% button.with_trailing_visual_icon(icon: "arrow-right") %> - Proceed -<% end %> diff --git a/test/components/previews/pathogen_button_preview/trailing_visual_svg.html.erb b/test/components/previews/pathogen_button_preview/trailing_visual_svg.html.erb deleted file mode 100644 index e7be1515bb..0000000000 --- a/test/components/previews/pathogen_button_preview/trailing_visual_svg.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<%= render Pathogen::Button.new(scheme:, size:) do |button| %> - <% button.with_trailing_visual_svg do %> - - - <% end %> - Warning -<% end %> diff --git a/test/components/previews/pathogen_tabs_panel_preview.rb b/test/components/previews/pathogen_tabs_panel_preview.rb deleted file mode 100644 index 73f5a805b7..0000000000 --- a/test/components/previews/pathogen_tabs_panel_preview.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -class PathogenTabsPanelPreview < ViewComponent::Preview - def default; end - def default_with_count; end - def underline; end - def underline_with_count; end -end diff --git a/test/components/previews/pathogen_tabs_panel_preview/default.html.erb b/test/components/previews/pathogen_tabs_panel_preview/default.html.erb deleted file mode 100644 index 041aba147d..0000000000 --- a/test/components/previews/pathogen_tabs_panel_preview/default.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= render Pathogen::TabsPanel.new(id: "default-tabs-panel-id", label: "default tabs panel") do |tabs| %> - <%= tabs.with_tab(selected: true, href: "#", text: "Tab 1") %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 2") %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 3") %> -<% end %> diff --git a/test/components/previews/pathogen_tabs_panel_preview/default_with_count.html.erb b/test/components/previews/pathogen_tabs_panel_preview/default_with_count.html.erb deleted file mode 100644 index f1ee0cd7d3..0000000000 --- a/test/components/previews/pathogen_tabs_panel_preview/default_with_count.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%= render Pathogen::TabsPanel.new(id: "default-tabs-panel-id", label: "default tabs panel") do |tabs| %> - <%= tabs.with_tab(selected: true, href: "#", text: "Tab 1") do |tab| %> - <%= tab.with_count(count: 1) %> - <% end %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 2") do |tab| %> - <%= tab.with_count(count: 10) %> - <% end %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 3") do |tab| %> - <%= tab.with_count(count: 100) %> - <% end %> -<% end %> diff --git a/test/components/previews/pathogen_tabs_panel_preview/underline.html.erb b/test/components/previews/pathogen_tabs_panel_preview/underline.html.erb deleted file mode 100644 index 56ed1fd1b9..0000000000 --- a/test/components/previews/pathogen_tabs_panel_preview/underline.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= render Pathogen::TabsPanel.new(id: "default-tabs-panel-id", type: 'underline', label: "default tabs panel") do |tabs| %> - <%= tabs.with_tab(selected: true, href: "#", text: "Tab 1") %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 2") %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 3") %> -<% end %> diff --git a/test/components/previews/pathogen_tabs_panel_preview/underline_with_count.html.erb b/test/components/previews/pathogen_tabs_panel_preview/underline_with_count.html.erb deleted file mode 100644 index 62ee5bb9ad..0000000000 --- a/test/components/previews/pathogen_tabs_panel_preview/underline_with_count.html.erb +++ /dev/null @@ -1,11 +0,0 @@ -<%= render Pathogen::TabsPanel.new(id: "default-tabs-panel-id", type: "underline", label: "default tabs panel") do |tabs| %> - <%= tabs.with_tab(selected: true, href: "#", text: "Tab 1") do |tab| %> - <%= tab.with_count(count: 1) %> - <% end %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 2") do |tab| %> - <%= tab.with_count(count: 10) %> - <% end %> - <%= tabs.with_tab(selected: false, href: "#", text: "Tab 3") do |tab| %> - <%= tab.with_count(count: 100) %> - <% end %> -<% end %>