diff --git a/Gemfile b/Gemfile index 8743076..d6525bc 100644 --- a/Gemfile +++ b/Gemfile @@ -74,7 +74,8 @@ group :test do end gem "phlex-rails" -gem "phlex_ui", github: "PhlexUI/phlex_ui", branch: "v1" -# gem "phlex_ui", path: "../phlex_ui" + +gem "rbui", github: "rbui-labs/rbui" +# gem "rbui", path: "../rbui" gem "pry" diff --git a/Gemfile.lock b/Gemfile.lock index 5856667..0d570a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,8 @@ GIT - remote: https://github.com/PhlexUI/phlex_ui.git - revision: bccfd09c75126620a65cae0560ef35ded715d1b5 - branch: v1 + remote: https://github.com/rbui-labs/rbui.git + revision: 19a1b5df2db0e000a21b9b2c5a573179c07506be specs: - phlex_ui (0.1.10) + rbui (0.2.0) phlex (~> 1.10) rouge (~> 4.2.0) tailwind_merge (>= 0.12) @@ -349,11 +348,11 @@ DEPENDENCIES lookbook (= 2.3.2) lucide-rails (= 0.4.0) phlex-rails - phlex_ui! propshaft (= 0.9.0) pry puma (= 6.4.2) rails (= 7.2.0) + rbui! selenium-webdriver sqlite3 (>= 1.4) standard diff --git a/app/javascript/application.js b/app/javascript/application.js index 64a1700..a37ff7f 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -1,5 +1,4 @@ // Entry point for the build script in your package.json import "@hotwired/turbo-rails"; import "rbui-js"; -import "phlex_ui"; import "./controllers"; diff --git a/app/views/application_view.rb b/app/views/application_view.rb index 96796ae..06be49f 100644 --- a/app/views/application_view.rb +++ b/app/views/application_view.rb @@ -30,7 +30,7 @@ def components(component, code_example = nil, use_component_files = false) require "rubygems" - def component_files(component, gem_name = "phlex_ui") + def component_files(component, gem_name = "rbui") # Find the gem specification gem_spec = Gem::Specification.find_by_name(gem_name) return [] unless gem_spec diff --git a/app/views/components/application_component.rb b/app/views/components/application_component.rb index d0cc74d..b2c77bd 100644 --- a/app/views/components/application_component.rb +++ b/app/views/components/application_component.rb @@ -2,7 +2,6 @@ class ApplicationComponent < Phlex::HTML include RBUI - include PhlexUI include Phlex::Rails::Helpers::Routes if Rails.env.development? diff --git a/package.json b/package.json index b01d7ae..bf8d250 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "lottie-web": "5.12.2", "phlex_ui": "https://github.com/PhlexUI/phlex_ui_stimulus.git", "postcss": "8.4.40", - "rbui-js": "https://github.com/PhlexUI/phlex_ui.git#v1", + "rbui-js": "^1.0.0-alpha.2", "tailwindcss": "3.4.7", "tailwindcss-animate": "1.0.7" }, diff --git a/tailwind.config.js b/tailwind.config.js index fd21d7b..c0ff205 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,20 +1,21 @@ -// For importing tailwind styles from phlex_ui/phlex_ui_pro gem -const execSync = require('child_process').execSync; +// For importing tailwind styles from rbui gem +const execSync = require("child_process").execSync; // Import rbui gem path -const outputRBUI = execSync('bundle show phlex_ui', { encoding: 'utf-8' }); -const rbui_path = outputRBUI.trim() + '/**/*.rb'; +const outputRBUI = execSync("bundle show rbui", { encoding: "utf-8" }); +const rbui_path = outputRBUI.trim() + "/**/*.rb"; -const defaultTheme = require('tailwindcss/defaultTheme') +const defaultTheme = require("tailwindcss/defaultTheme"); module.exports = { darkMode: ["class"], content: [ - './app/views/**/*.{erb,haml,html,slim,rb}', - './app/helpers/**/*.rb', - './app/assets/stylesheets/**/*.css', - './app/javascript/**/*.js', - rbui_path + "./app/views/**/*.{erb,haml,html,slim,rb}", + "./app/helpers/**/*.rb", + "./app/assets/stylesheets/**/*.css", + "./app/javascript/**/*.js", + rbui_path, + "./app/components/**/*.{erb,haml,html,slim,rb}", ], theme: { container: { @@ -79,7 +80,5 @@ module.exports = { }, }, }, - plugins: [ - require("tailwindcss-animate"), - ], -} \ No newline at end of file + plugins: [require("tailwindcss-animate")], +}; diff --git a/yarn.lock b/yarn.lock index 9654820..d9ed9bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -831,9 +831,10 @@ queue-microtask@^1.2.2: resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -"rbui-js@https://github.com/PhlexUI/phlex_ui.git#v1": - version "0.0.1-alpha.0" - resolved "https://github.com/PhlexUI/phlex_ui.git#bccfd09c75126620a65cae0560ef35ded715d1b5" +rbui-js@^1.0.0-alpha.2: + version "1.0.0-alpha.2" + resolved "https://registry.yarnpkg.com/rbui-js/-/rbui-js-1.0.0-alpha.2.tgz#b35e2e943fd016a53853c028196aec1be06fc635" + integrity sha512-HqUB37pRVoXWGUqcWWNEi3FH9S29QELmVIpJKX8U5q/DUxCxg9rD0HOt5JdP9ql5NKXnFy1/yW0p5hRrvNX3FQ== dependencies: "@floating-ui/dom" "^1.6.8" "@hotwired/stimulus" "^3.2.2"