shadcn-ui 0.0.13 → 0.0.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 403f7186d9ebbcca03f5f3bc13901e29db5d84bcdefa1d8648be46387822defc
4
- data.tar.gz: eb7e79a3a62954cdbb21777e46aea6bee225a1fbde655e2e85616f2a7d357648
3
+ metadata.gz: a39d85928cde2116a4a0ffb5bf8790b0697474a1dff54e164a8817f3e1c02dc7
4
+ data.tar.gz: d79e0cd3ce519b91f2e4186ed7946c67bf50e3d9125a0ad3767f6326ef21662b
5
5
  SHA512:
6
- metadata.gz: 05b4c95efea37e11f8251081572564b057ab11a77e10e97af756f5e3c9f880b0dbc68d15105dfb91af2c5c2b59723a8b0ced098b7f68f2e57e15603a8386c29f
7
- data.tar.gz: 8e03c73187dca4d4408962a83e676c5fe0ff8a344dd27bc60fe0575a5c1014386bc7d1de29ddc31414c14264b75c6626456ce3eb715ad0200f28f90b9156d7a2
6
+ metadata.gz: d0cb9bf3bb84df2d8a57c334fc43db494ab29a3b31d31ec5192aee725a3e321a207a56b86df94abc1d8b010c0728f1e718002edb6da371c0467cd4a63651ebdd
7
+ data.tar.gz: 11839c8a282b0497e8a2a33726818b7889bfd0299a60d41b6887f24f3b81b8189f2171e9dfb8e0749cf660b5b2e2a36ba502c6996c8491b90067459f8e18b59b
@@ -0,0 +1,10 @@
1
+ module Components::DatePickerHelper
2
+ def render_date_picker(name:, id: nil, value: 'Pick a date', **options)
3
+ render partial: "components/ui/date_picker", locals: {
4
+ name:,
5
+ value:,
6
+ id:,
7
+ options: options
8
+ }
9
+ end
10
+ end
@@ -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(:value, :name, :selected)
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.reverse_merge(
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.reverse_merge(
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.reverse_merge(
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.reverse_merge(
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.reverse_merge(
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.reverse_merge(
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