Module: Cmdk
- Extended by:
- Phlex::Kit
- Defined in:
- lib/cmdk.rb,
lib/cmdk/base.rb,
lib/cmdk/item.rb,
lib/cmdk/list.rb,
lib/cmdk/root.rb,
lib/cmdk/empty.rb,
lib/cmdk/group.rb,
lib/cmdk/input.rb,
lib/cmdk/dialog.rb,
lib/cmdk/footer.rb,
lib/cmdk/loading.rb,
lib/cmdk/version.rb,
lib/cmdk/separator.rb
Overview
Phlex port of the cmdk React command menu. Renders the same markup contract (cmdk-* attributes, ARIA roles) as the React package; runtime behavior is provided by assets/js/cmdk.js.
Defined Under Namespace
Classes: Base, Dialog, Empty, Footer, Group, Input, Item, List, Loading, Root, Separator
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
-
.javascript_path ⇒ Object
Absolute path to the JS runtime, for serving or copying into asset pipelines.
-
.stimulus_controller_path ⇒ Object
Absolute path to the optional Stimulus base controller (requires @hotwired/stimulus and the runtime pinned/aliased as ‘cmdk`).
-
.stylesheet_path ⇒ Object
Absolute path to the optional themes stylesheet (cmdk-vercel, cmdk-linear, cmdk-raycast).
Class Method Details
.javascript_path ⇒ Object
Absolute path to the JS runtime, for serving or copying into asset pipelines.
11 12 13 |
# File 'lib/cmdk.rb', line 11 def self.javascript_path File.('../assets/js/cmdk.js', __dir__) end |
.stimulus_controller_path ⇒ Object
Absolute path to the optional Stimulus base controller (requires @hotwired/stimulus and the runtime pinned/aliased as ‘cmdk`).
24 25 26 |
# File 'lib/cmdk.rb', line 24 def self.stimulus_controller_path File.('../assets/js/cmdk_controller.js', __dir__) end |
.stylesheet_path ⇒ Object
Absolute path to the optional themes stylesheet (cmdk-vercel, cmdk-linear, cmdk-raycast). Plain dependency-free CSS — serve it, copy it, or import it into a Tailwind build.
18 19 20 |
# File 'lib/cmdk.rb', line 18 def self.stylesheet_path File.('../assets/css/cmdk_themes.css', __dir__) end |