Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/verify_components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Verify components

push:
branches: "main"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build
run: rails g ruby_ui:component:all

- uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true
push-if-not-clean: false
request-changes-if-not-clean: false
Copy link
Contributor

@stephannv stephannv May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if a PR with the changes was opened so we can review and merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it will. Let's do that later on!

targets: 'app' #optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rails g ruby_ui:component:all can cause changes in Gemfile/Gemfile.lock or js dependencies lock. Do we want to fail the job only if there are changes on component files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stephannv , I don't see a reason to be so strict about Gemfile.lock or js dependencies lock.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem "rails", "8.0.2"
# The modern asset pipeline for Rails [https://github.com/rails/propshaft]
gem "propshaft", "1.1.0"
# Use sqlite3 as the database for Active Record
gem "sqlite3", ">= 1.4"
gem "sqlite3", "2.6.0"
# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "6.6.0"
# Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails]
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GIT

GIT
remote: https://github.com/ruby-ui/ruby_ui.git
revision: 6e6b50ef39f08ec25db2db58a80d5b461e44837f
revision: f5a275f191c32bd50d8ab2876a32586cf9435866
branch: main
specs:
ruby_ui (1.0.1)
Expand Down Expand Up @@ -337,7 +337,7 @@ DEPENDENCIES
rouge (~> 4.5)
ruby_ui!
selenium-webdriver
sqlite3 (>= 1.4)
sqlite3 (= 2.6.0)
standard
stimulus-rails (= 1.3.4)
tailwind_merge (~> 1.2.0)
Expand Down
5 changes: 3 additions & 2 deletions app/components/ruby_ui/button/button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def destructive_classes
[
BASE_CLASSES,
size_classes,
"bg-destructive text-destructive-foreground shadow-sm",
"hover:bg-destructive/90"
"bg-destructive text-white shadow-sm",
"[a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20",
"dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
]
end

Expand Down
7 changes: 6 additions & 1 deletion app/components/ruby_ui/checkbox/checkbox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ def default_attrs
ruby_ui__checkbox_group_target: "checkbox",
action: "change->ruby-ui--checkbox-group#onChange change->ruby-ui--form-field#onInput invalid->ruby-ui--form-field#onInvalid"
},
class: "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 accent-primary"
class: [
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background accent-primary",
"disabled:cursor-not-allowed disabled:opacity-50",
"aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:pointer-events-none",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
]
}
end
end
Expand Down
5 changes: 3 additions & 2 deletions app/components/ruby_ui/link/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ def destructive_classes
[
BASE_CLASSES,
size_classes,
"bg-destructive text-destructive-foreground shadow-sm",
"hover:bg-destructive/90"
"bg-destructive text-white shadow-sm",
"[a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20",
"dark:focus-visible:ring-destructive/40 dark:bg-destructive/60"
]
end

Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/separator/separator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Separator < Base
def initialize(as: :div, orientation: :horizontal, decorative: true, **attrs)
raise ArgumentError, "Invalid orientation: #{orientation}" unless ORIENTATIONS.include?(orientation.to_sym)

@as = as.to_sym
@as = as
@orientation = orientation.to_sym
@decorative = decorative
super(**attrs)
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/table/table_footer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def view_template(&)

def default_attrs
{
class: "border-t bg-muted bg-opacity-50 font-medium[& amp;>tr]:last:border-b-0"
class: "border-t bg-muted/50 font-medium[& amp;>tr]:last:border-b-0"
}
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/components/ruby_ui/table/table_row.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def view_template(&)

def default_attrs
{
class: "border-b transition-colors hover:bg-muted hover:bg-opacity-50 data-[state=selected]:bg-muted"
class: "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
}
end
end
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"name": "app",
"private": true,
"dependencies": {
"@floating-ui/dom": "^1.7.0",
"@floating-ui/dom": "1.7.0",
"@hotwired/stimulus": "3.2.2",
"@hotwired/turbo-rails": "8.0.13",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/forms": "0.5.10",
"@tailwindcss/typography": "0.5.16",
"autoprefixer": "10.4.21",
"chart.js": "^4.4.9",
"chart.js": "4.4.9",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"embla-carousel": "^8.5.2",
"embla-carousel": "8.6.0",
"esbuild": "0.25.4",
"fuse.js": "^7.1.0",
"maska": "^3.1.1",
"motion": "^12.10.5",
"mustache": "^4.2.0",
"fuse.js": "7.1.0",
"maska": "3.1.1",
"motion": "12.10.5",
"mustache": "4.2.0",
"tailwindcss": "4.1.6",
"tippy.js": "^6.3.7",
"tw-animate-css": "^1.2.9"
"tippy.js": "6.3.7",
"tw-animate-css": "1.2.9"
},
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --sourcemap --format=esm --outdir=app/assets/builds --public-path=/assets",
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.