diff --git a/.github/workflows/verify_components.yml b/.github/workflows/verify_components.yml new file mode 100644 index 00000000..bb93a1f5 --- /dev/null +++ b/.github/workflows/verify_components.yml @@ -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 + targets: 'app' #optional diff --git a/Gemfile b/Gemfile index d8932224..aa5377a3 100644 --- a/Gemfile +++ b/Gemfile @@ -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] diff --git a/Gemfile.lock b/Gemfile.lock index 6b827d9d..114e6434 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) diff --git a/app/components/ruby_ui/button/button.rb b/app/components/ruby_ui/button/button.rb index 00750853..1eb92106 100644 --- a/app/components/ruby_ui/button/button.rb +++ b/app/components/ruby_ui/button/button.rb @@ -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 diff --git a/app/components/ruby_ui/checkbox/checkbox.rb b/app/components/ruby_ui/checkbox/checkbox.rb index 391289d9..977bb9fe 100644 --- a/app/components/ruby_ui/checkbox/checkbox.rb +++ b/app/components/ruby_ui/checkbox/checkbox.rb @@ -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 diff --git a/app/components/ruby_ui/link/link.rb b/app/components/ruby_ui/link/link.rb index 424ab79e..be988767 100644 --- a/app/components/ruby_ui/link/link.rb +++ b/app/components/ruby_ui/link/link.rb @@ -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 diff --git a/app/components/ruby_ui/separator/separator.rb b/app/components/ruby_ui/separator/separator.rb index 4c489647..92347347 100644 --- a/app/components/ruby_ui/separator/separator.rb +++ b/app/components/ruby_ui/separator/separator.rb @@ -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) diff --git a/app/components/ruby_ui/table/table_footer.rb b/app/components/ruby_ui/table/table_footer.rb index 156d7683..24bf71ac 100644 --- a/app/components/ruby_ui/table/table_footer.rb +++ b/app/components/ruby_ui/table/table_footer.rb @@ -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 diff --git a/app/components/ruby_ui/table/table_row.rb b/app/components/ruby_ui/table/table_row.rb index 4b451df7..d1eeb2b4 100644 --- a/app/components/ruby_ui/table/table_row.rb +++ b/app/components/ruby_ui/table/table_row.rb @@ -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 diff --git a/package.json b/package.json index 60f14870..6950ea3d 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87fe7d4b..f354314d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,7 +9,7 @@ importers: .: dependencies: '@floating-ui/dom': - specifier: ^1.7.0 + specifier: 1.7.0 version: 1.7.0 '@hotwired/stimulus': specifier: 3.2.2 @@ -18,16 +18,16 @@ importers: specifier: 8.0.13 version: 8.0.13 '@tailwindcss/forms': - specifier: ^0.5.10 + specifier: 0.5.10 version: 0.5.10(tailwindcss@4.1.6) '@tailwindcss/typography': - specifier: ^0.5.16 + specifier: 0.5.16 version: 0.5.16(tailwindcss@4.1.6) autoprefixer: specifier: 10.4.21 version: 10.4.21(postcss@8.5.3) chart.js: - specifier: ^4.4.9 + specifier: 4.4.9 version: 4.4.9 class-variance-authority: specifier: 0.7.1 @@ -36,31 +36,31 @@ importers: specifier: 2.1.1 version: 2.1.1 embla-carousel: - specifier: ^8.5.2 + specifier: 8.6.0 version: 8.6.0 esbuild: specifier: 0.25.4 version: 0.25.4 fuse.js: - specifier: ^7.1.0 + specifier: 7.1.0 version: 7.1.0 maska: - specifier: ^3.1.1 + specifier: 3.1.1 version: 3.1.1 motion: - specifier: ^12.10.5 + specifier: 12.10.5 version: 12.10.5 mustache: - specifier: ^4.2.0 + specifier: 4.2.0 version: 4.2.0 tailwindcss: specifier: 4.1.6 version: 4.1.6 tippy.js: - specifier: ^6.3.7 + specifier: 6.3.7 version: 6.3.7 tw-animate-css: - specifier: ^1.2.9 + specifier: 1.2.9 version: 1.2.9 packages: