Skip to content

Commit

Permalink
UPDATE RUBY_UI + QUICK FIX VIEW CHECKBOX_GROUP (#127)
Browse files Browse the repository at this point in the history
* UPDATE RUBY_UI

* CheckboxGroup -> Checkbox Group

* 1st OK

* 1st OK
  • Loading branch information
pierry01 authored Nov 7, 2024
1 parent 4dd7f90 commit 2b9f095
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ end
gem "phlex-rails"

gem "ruby_ui", github: "ruby-ui/ruby_ui", branch: "main"
# gem "ruby_ui", path: "../rbui"
# gem "ruby_ui", path: "../ruby_ui"

gem "pry"
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
GIT
remote: https://github.com/ruby-ui/ruby_ui.git
revision: 33dc56c7565e64080f976594b7a67eb0b7e2412f
revision: 5519a5f06e104c55141ff698e391befb7b61469f
branch: main
specs:
ruby_ui (1.0.0.pre.alpha.4)
phlex (~> 1.10, < 3)
phlex (>= 1.10, < 3)
rouge (~> 4.2.0)
tailwind_merge (~> 0.12)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Here is the list of components that are being built. For reference, see here htt
✅ Calendar
✅ Card
✅ Checkbox
CheckboxGroup
Checkbox Group
✅ Codeblock
✅ Collapsible
⚪️ Combobox
Expand Down
2 changes: 1 addition & 1 deletion app/views/components/shared/menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def components
{name: "Calendar", path: helpers.docs_calendar_path},
# { name: "Chart", path: helpers.docs_chart_path, badge: "New" },
{name: "Checkbox", path: helpers.docs_checkbox_path},
{name: "CheckboxGroup", path: helpers.docs_checkbox_group_path},
{name: "Checkbox Group", path: helpers.docs_checkbox_group_path},
{name: "Clipboard", path: helpers.docs_clipboard_path},
{name: "Codeblock", path: helpers.docs_codeblock_path},
{name: "Collapsible", path: helpers.docs_collapsible_path},
Expand Down
20 changes: 10 additions & 10 deletions app/views/docs/checkbox_group_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

class Docs::CheckboxGroupView < ApplicationView
def view_template
component = "CheckboxGroup"
component = "Checkbox Group"

div(class: "max-w-2xl mx-auto w-full py-10 space-y-10") do
render Docs::Header.new(title: "CheckboxGroup", description: "A control that allows the user to toggle between checked and not checked.")
render Docs::Header.new(title: "Checkbox Group", description: "A control that allows the user to toggle between checked and not checked.")

Heading(level: 2) { "Usage" }

Expand All @@ -14,13 +14,13 @@ def view_template
CheckboxGroup(data_required: true) do
div(class: "flex flex-col gap-2") do
div(class: "flex flex-row items-center gap-2") do
Checkbox(value: "FOO", id: "FOO")
FormFieldLabel(for: "FOO") { "FOO" }
Checkbox(value: "FOO", id: "EXAMPLE_FOO")
FormFieldLabel(for: "EXAMPLE_FOO") { "FOO" }
end
div(class: "flex flex-row items-center gap-2") do
Checkbox(value: "BAR", id: "BAR")
FormFieldLabel(for: "BAR") { "BAR" }
Checkbox(value: "BAR", id: "EXAMPLE_BAR")
FormFieldLabel(for: "EXAMPLE_BAR") { "BAR" }
end
end
end
Expand All @@ -39,26 +39,26 @@ def view_template
div(class: "flex flex-col gap-2") do
div(class: "flex flex-row items-center gap-2") do
Checkbox(
id: "FOO",
id: "FORM_FOO",
value: "FOO",
checked: false,
name: "CHECKBOX_GROUP[]",
data: {value_missing: "CUSTOM_MESSAGE"}
)
FormFieldLabel(for: "FOO") { "FOO" }
FormFieldLabel(for: "FORM_FOO") { "FOO" }
end
div(class: "flex flex-row items-center gap-2") do
Checkbox(
id: "BAR",
id: "FORM_BAR",
value: "BAR",
checked: true,
name: "CHECKBOX_GROUP[]",
data: {value_missing: "CUSTOM_MESSAGE"}
)
FormFieldLabel(for: "BAR") { "BAR" }
FormFieldLabel(for: "FORM_BAR") { "BAR" }
end
end
end
Expand Down
47 changes: 27 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==

"@babel/runtime@^7.21.0":
version "7.25.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb"
integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==
version "7.26.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1"
integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==
dependencies:
regenerator-runtime "^0.14.0"

Expand Down Expand Up @@ -135,24 +135,24 @@
integrity sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==

"@floating-ui/core@^1.6.0":
version "1.6.7"
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.7.tgz#7602367795a390ff0662efd1c7ae8ca74e75fb12"
integrity sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==
version "1.6.8"
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12"
integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==
dependencies:
"@floating-ui/utils" "^0.2.7"
"@floating-ui/utils" "^0.2.8"

"@floating-ui/dom@^1.6.8":
version "1.6.10"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.10.tgz#b74c32f34a50336c86dcf1f1c845cf3a39e26d6f"
integrity sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==
version "1.6.12"
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.12.tgz#6333dcb5a8ead3b2bf82f33d6bc410e95f54e556"
integrity sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==
dependencies:
"@floating-ui/core" "^1.6.0"
"@floating-ui/utils" "^0.2.7"
"@floating-ui/utils" "^0.2.8"

"@floating-ui/utils@^0.2.7":
version "0.2.7"
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.7.tgz#d0ece53ce99ab5a8e37ebdfe5e32452a2bfc073e"
integrity sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==
"@floating-ui/utils@^0.2.8":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62"
integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==

"@hotwired/[email protected]", "@hotwired/stimulus@^3.2.2":
version "3.2.2"
Expand Down Expand Up @@ -368,13 +368,20 @@ caniuse-lite@^1.0.30001599, caniuse-lite@^1.0.30001640:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz#9c004caef315de9452ab970c3da71085f8241dbd"
integrity sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==

[email protected], chart.js@^4.4.1:
[email protected]:
version "4.4.3"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-4.4.3.tgz#3b2e11e7010fefa99b07d0349236f5098e5226ad"
integrity sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw==
dependencies:
"@kurkle/color" "^0.3.0"

chart.js@^4.4.1:
version "4.4.6"
resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-4.4.6.tgz#da39b84ca752298270d4c0519675c7659936abec"
integrity sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==
dependencies:
"@kurkle/color" "^0.3.0"

chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz"
Expand Down Expand Up @@ -854,7 +861,7 @@ reusify@^1.0.4:

ruby_ui_js@ruby-ui/ruby_ui:
version "1.0.0-alpha.4"
resolved "https://codeload.github.com/ruby-ui/ruby_ui/tar.gz/0ae3ed06e7ce56f17c67e2aa530f7fc2c806dc74"
resolved "https://codeload.github.com/ruby-ui/ruby_ui/tar.gz/5519a5f06e104c55141ff698e391befb7b61469f"
dependencies:
"@floating-ui/dom" "^1.6.8"
"@hotwired/stimulus" "^3.2.2"
Expand Down Expand Up @@ -967,9 +974,9 @@ ts-interface-checker@^0.1.9:
integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==

tslib@^2.3.1:
version "2.6.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
version "2.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==

update-browserslist-db@^1.1.0:
version "1.1.0"
Expand Down

0 comments on commit 2b9f095

Please sign in to comment.