-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
223e5c0
commit 1c63bd7
Showing
9 changed files
with
159 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// Entry point for the build script in your package.json | ||
import "@hotwired/turbo-rails" | ||
import "phlex_ui" | ||
import "./controllers" | ||
import "@hotwired/turbo-rails"; | ||
import "rbui-js"; | ||
import "phlex_ui"; | ||
import "./controllers"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# frozen_string_literal: true | ||
|
||
class Docs::ComboboxView < ApplicationView | ||
def view_template | ||
div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do | ||
render Docs::Header.new(title: "Combobox", description: "Autocomplete input and command palette with a list of suggestions.", premium: @premium) | ||
|
||
TypographyH2 { "Usage" } | ||
|
||
render Docs::VisualCodeExample.new(title: "Example", context: self, premium: @premium) do | ||
<<~RUBY | ||
Combobox do | ||
ComboboxTrigger(placeholder: "Select event...", aria_controls: "list") | ||
ComboboxContent(id: "list") do | ||
ComboboxSearchInput(placeholder: "Search event...") | ||
ComboboxList do | ||
ComboboxEmpty { "No results found." } | ||
ComboboxGroup(heading: "Suggestions") do | ||
ComboboxItem(value: "railsworld") do | ||
span { "Rails World" } | ||
end | ||
ComboboxItem(value: "tropicalrb") do | ||
span { "Tropical.rb" } | ||
end | ||
ComboboxItem(value: "friendly.rb") do | ||
span { "Friendly.rb" } | ||
end | ||
end | ||
ComboboxSeparator() | ||
ComboboxGroup(heading: "Others") do | ||
ComboboxItem(value: "railsconf") do | ||
span { "RailsConf" } | ||
end | ||
ComboboxItem(value: "euruko") do | ||
span { "Euruko" } | ||
end | ||
ComboboxItem(value: "rubykaigi") do | ||
span { "RubyKaigi" } | ||
end | ||
end | ||
end | ||
end | ||
end | ||
RUBY | ||
end | ||
render Docs::ComponentsTable.new(components) | ||
end | ||
end | ||
|
||
private | ||
|
||
def components | ||
[ | ||
Docs::ComponentStruct.new(name: "ComboboxController", source: "https://github.com/PhlexUI/phlex_ui_stimulus_pro/blob/main/controllers/command_controller.js", built_using: :stimulus), | ||
Docs::ComponentStruct.new(name: "ComboboxSeparator", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/dialog.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxTrigger", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/dialog_trigger.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxContent", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/dialog_content.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "Combobox", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxSearchInput", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/input.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxList", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/list.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxGroup", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/group.rb", built_using: :phlex), | ||
Docs::ComponentStruct.new(name: "ComboboxItem", source: "https://github.com/PhlexUI/phlex_ui_pro/blob/main/lib/phlex_ui_pro/command/item.rb", built_using: :phlex) | ||
] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,9 @@ | |
"clsx": "2.1.1", | ||
"esbuild": "0.23.0", | ||
"lottie-web": "5.12.2", | ||
"phlex_ui": "0.1.5", | ||
"phlex_ui": "https://github.com/PhlexUI/phlex_ui_stimulus.git", | ||
"postcss": "8.4.40", | ||
"rbui-js": "https://github.com/PhlexUI/phlex_ui.git#v1", | ||
"tailwindcss": "3.4.7", | ||
"tailwindcss-animate": "1.0.7" | ||
}, | ||
|
@@ -20,4 +21,4 @@ | |
"build:css": "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css --minify" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
Oops, something went wrong.