diff --git a/gem/lib/ruby_ui/combobox/combobox_trigger.rb b/gem/lib/ruby_ui/combobox/combobox_trigger.rb index 56ea757b3..3203d7105 100644 --- a/gem/lib/ruby_ui/combobox/combobox_trigger.rb +++ b/gem/lib/ruby_ui/combobox/combobox_trigger.rb @@ -52,10 +52,7 @@ def icon stroke_linejoin: "round" ) do |s| s.path( - d: "m7 15 5 5 5-5" - ) - s.path( - d: "m7 9 5-5 5 5" + d: "m6 9 6 6 6-6" ) end end diff --git a/gem/test/ruby_ui/combobox_test.rb b/gem/test/ruby_ui/combobox_test.rb index 3c054f15d..a660b7164 100644 --- a/gem/test/ruby_ui/combobox_test.rb +++ b/gem/test/ruby_ui/combobox_test.rb @@ -187,8 +187,7 @@ def test_combobox_badge_trigger_no_chevron def test_combobox_trigger_chevron_down output = phlex { RubyUI.ComboboxTrigger(placeholder: "Pick") } - assert_match(/m7 15 5 5 5-5/, output) - assert_match(/m7 9 5-5 5 5/, output) + assert_match(/m6 9 6 6 6-6/, output) end def test_combobox_trigger_sets_placeholder_data diff --git a/mcp/data/registry.json b/mcp/data/registry.json index 9c7af5855..a2a49683d 100644 --- a/mcp/data/registry.json +++ b/mcp/data/registry.json @@ -987,7 +987,7 @@ }, { "path": "combobox_trigger.rb", - "content": "# frozen_string_literal: true\n\nmodule RubyUI\n class ComboboxTrigger < Base\n def initialize(placeholder: \"\", **)\n @placeholder = placeholder\n super(**)\n end\n\n def view_template\n button(**attrs) do\n span(class: \"truncate\", data: {ruby_ui__combobox_target: \"triggerContent\"}) do\n @placeholder\n end\n icon\n end\n end\n\n private\n\n def default_attrs\n {\n type: \"button\",\n class: [\n \"flex h-full w-full items-center whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors border border-input bg-background h-9 px-4 py-2 justify-between\",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n ],\n data: {\n placeholder: @placeholder,\n ruby_ui__combobox_target: \"trigger\",\n action: \"ruby-ui--combobox#togglePopover\"\n },\n aria: {\n haspopup: \"listbox\",\n expanded: \"false\"\n }\n }\n end\n\n def icon\n svg(\n xmlns: \"http://www.w3.org/2000/svg\",\n viewbox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n class: \"ml-2 h-4 w-4 shrink-0 opacity-50\",\n stroke_width: \"2\",\n stroke_linecap: \"round\",\n stroke_linejoin: \"round\"\n ) do |s|\n s.path(\n d: \"m7 15 5 5 5-5\"\n )\n s.path(\n d: \"m7 9 5-5 5 5\"\n )\n end\n end\n end\nend\n" + "content": "# frozen_string_literal: true\n\nmodule RubyUI\n class ComboboxTrigger < Base\n def initialize(placeholder: \"\", **)\n @placeholder = placeholder\n super(**)\n end\n\n def view_template\n button(**attrs) do\n span(class: \"truncate\", data: {ruby_ui__combobox_target: \"triggerContent\"}) do\n @placeholder\n end\n icon\n end\n end\n\n private\n\n def default_attrs\n {\n type: \"button\",\n class: [\n \"flex h-full w-full items-center whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors border border-input bg-background h-9 px-4 py-2 justify-between\",\n \"hover:bg-accent hover:text-accent-foreground\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-disabled:cursor-not-allowed\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n ],\n data: {\n placeholder: @placeholder,\n ruby_ui__combobox_target: \"trigger\",\n action: \"ruby-ui--combobox#togglePopover\"\n },\n aria: {\n haspopup: \"listbox\",\n expanded: \"false\"\n }\n }\n end\n\n def icon\n svg(\n xmlns: \"http://www.w3.org/2000/svg\",\n viewbox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n class: \"ml-2 h-4 w-4 shrink-0 opacity-50\",\n stroke_width: \"2\",\n stroke_linecap: \"round\",\n stroke_linejoin: \"round\"\n ) do |s|\n s.path(\n d: \"m6 9 6 6 6-6\"\n )\n end\n end\n end\nend\n" } ], "dependencies": {