shadcn-ui 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/components/date_picker_helper.rb +10 -0
- data/app/helpers/components/filter_helper.rb +1 -1
- data/app/helpers/components/table_helper.rb +6 -6
- data/app/javascript/controllers/ui/date-picker_controller.js +766 -0
- data/app/javascript/controllers/ui/select_controller.js +130 -0
- data/app/javascript/utils/bodyScrollLock.js +289 -0
- data/app/javascript/utils/iso_date.js +198 -0
- data/app/views/components/ui/_card.html.erb +1 -1
- data/app/views/components/ui/_date_picker.html.erb +13 -0
- data/app/views/components/ui/_filter.html.erb +16 -13
- data/app/views/components/ui/_list.html.erb +4 -4
- data/app/views/examples/components/accordion/code/_usage.erb +3 -3
- data/app/views/examples/components/date-picker/_usage.html.erb +19 -0
- data/app/views/examples/components/date-picker/code/_preview.erb +1 -0
- data/app/views/examples/components/date-picker/code/_usage.erb +1 -0
- data/app/views/examples/components/date-picker.html.erb +22 -0
- data/app/views/examples/components/dropdown-menu/code/_preview.erb +2 -2
- data/app/views/examples/components/dropdown-menu/code/_usage.erb +1 -1
- data/app/views/layouts/shared/_components.html.erb +1 -1
- data/config/importmap.rb +4 -1
- data/lib/shadcn-ui/version.rb +1 -1
- data/shadcn-ui.gemspec +1 -1
- metadata +14 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93c6ce85664d4fc60c3ada95d4754c69238619e07bdf0fb63843b03c84c7a7b0
|
4
|
+
data.tar.gz: 2e160df29b1166826c587d2ada208fff89095f4d1a5b22b7bbd76fc287ba737b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18709282a252039a411e0106b46cf31b02eedca5deb4841f747d880919adffcdd1eca3a262c85289f8bd5bdf8cdb88b3804690f3352a087f470279a8b797c8b8
|
7
|
+
data.tar.gz: a2aed1d08e07b2485b4773a0ce4860b62f9e8e96584d465c001a568b136348085bb7017b3e46a540df002de30728965cfbb0f0d00380d9f7d6859dbc15d374b8
|
@@ -10,7 +10,7 @@ module Components::FilterHelper
|
|
10
10
|
render "components/ui/filter", items: items, options: options, input_class: input_class, content: content
|
11
11
|
end
|
12
12
|
|
13
|
-
def list_item(
|
13
|
+
def list_item(value:, name:, selected:)
|
14
14
|
"#{name}"
|
15
15
|
end
|
16
16
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Components::TableHelper
|
2
2
|
def render_table(caption = nil, **options, &block)
|
3
|
-
content_tag :table, options.
|
3
|
+
content_tag :table, options.merge(
|
4
4
|
class: tw("w-full text-sm border-b", options[:class])
|
5
5
|
) do
|
6
6
|
if caption.present?
|
@@ -14,7 +14,7 @@ module Components::TableHelper
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def table_head(**options, &block)
|
17
|
-
content_tag :thead, options.
|
17
|
+
content_tag :thead, options.merge(
|
18
18
|
class: tw("[&_tr]:border-b", options[:class])
|
19
19
|
) do
|
20
20
|
content_tag :tr, class: "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted" do
|
@@ -24,7 +24,7 @@ module Components::TableHelper
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def table_header(content = nil, **options, &block)
|
27
|
-
content_tag :th, options.
|
27
|
+
content_tag :th, options.merge(
|
28
28
|
class: tw("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", options[:class])
|
29
29
|
) do
|
30
30
|
if block
|
@@ -36,19 +36,19 @@ module Components::TableHelper
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def table_body(**options, &block)
|
39
|
-
content_tag :tbody, class: options.
|
39
|
+
content_tag :tbody, class: options.merge(
|
40
40
|
class: tw("[&_tr:last-child]:border-0", options[:class])
|
41
41
|
), &block
|
42
42
|
end
|
43
43
|
|
44
44
|
def table_row(**options, &block)
|
45
|
-
content_tag :tr, options.
|
45
|
+
content_tag :tr, options.merge(
|
46
46
|
class: tw("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", options[:class])
|
47
47
|
), &block
|
48
48
|
end
|
49
49
|
|
50
50
|
def table_column(content = nil, **options, &block)
|
51
|
-
content_tag :td, options.
|
51
|
+
content_tag :td, options.merge(
|
52
52
|
class: tw("p-4 align-middle [&:has([role=checkbox])]:pr-0 font-medium", options[:class])
|
53
53
|
) do
|
54
54
|
if block
|