daisyui 1.0.1 → 1.0.3

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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/daisy_ui/alert.rb +0 -6
  3. data/lib/daisy_ui/avatar.rb +0 -6
  4. data/lib/daisy_ui/avatar_group.rb +2 -6
  5. data/lib/daisy_ui/badge.rb +0 -2
  6. data/lib/daisy_ui/base.rb +59 -14
  7. data/lib/daisy_ui/breadcrumbs.rb +4 -8
  8. data/lib/daisy_ui/calendar.rb +2 -2
  9. data/lib/daisy_ui/card.rb +6 -6
  10. data/lib/daisy_ui/carousel.rb +2 -6
  11. data/lib/daisy_ui/chat.rb +8 -12
  12. data/lib/daisy_ui/collapse.rb +5 -7
  13. data/lib/daisy_ui/collapsible_sub_menu.rb +9 -15
  14. data/lib/daisy_ui/configurable.rb +2 -0
  15. data/lib/daisy_ui/diff.rb +6 -6
  16. data/lib/daisy_ui/divider.rb +0 -4
  17. data/lib/daisy_ui/dock.rb +2 -6
  18. data/lib/daisy_ui/drawer.rb +14 -6
  19. data/lib/daisy_ui/dropdown.rb +16 -14
  20. data/lib/daisy_ui/fab.rb +4 -8
  21. data/lib/daisy_ui/fieldset.rb +2 -2
  22. data/lib/daisy_ui/filter.rb +3 -7
  23. data/lib/daisy_ui/footer.rb +2 -2
  24. data/lib/daisy_ui/form_control.rb +0 -4
  25. data/lib/daisy_ui/hero.rb +4 -8
  26. data/lib/daisy_ui/indicator.rb +2 -6
  27. data/lib/daisy_ui/join.rb +3 -5
  28. data/lib/daisy_ui/label.rb +2 -2
  29. data/lib/daisy_ui/list.rb +2 -2
  30. data/lib/daisy_ui/loading.rb +0 -2
  31. data/lib/daisy_ui/mask.rb +0 -6
  32. data/lib/daisy_ui/menu.rb +4 -6
  33. data/lib/daisy_ui/menu_item.rb +5 -7
  34. data/lib/daisy_ui/mockup_browser.rb +2 -6
  35. data/lib/daisy_ui/mockup_code.rb +0 -4
  36. data/lib/daisy_ui/mockup_phone.rb +4 -8
  37. data/lib/daisy_ui/mockup_window.rb +0 -4
  38. data/lib/daisy_ui/modal.rb +8 -10
  39. data/lib/daisy_ui/navbar.rb +6 -6
  40. data/lib/daisy_ui/pagination.rb +2 -6
  41. data/lib/daisy_ui/rating.rb +0 -4
  42. data/lib/daisy_ui/skeleton.rb +0 -6
  43. data/lib/daisy_ui/stack.rb +0 -4
  44. data/lib/daisy_ui/stat.rb +12 -16
  45. data/lib/daisy_ui/steps.rb +4 -4
  46. data/lib/daisy_ui/sub_menu.rb +7 -7
  47. data/lib/daisy_ui/swap.rb +6 -6
  48. data/lib/daisy_ui/tab.rb +6 -6
  49. data/lib/daisy_ui/tab_with_content.rb +9 -2
  50. data/lib/daisy_ui/tab_without_content.rb +0 -2
  51. data/lib/daisy_ui/table.rb +8 -10
  52. data/lib/daisy_ui/table_row.rb +5 -7
  53. data/lib/daisy_ui/tabs.rb +8 -3
  54. data/lib/daisy_ui/theme_controller.rb +2 -2
  55. data/lib/daisy_ui/timeline.rb +6 -6
  56. data/lib/daisy_ui/toast.rb +0 -4
  57. data/lib/daisy_ui/validator.rb +1 -1
  58. data/lib/daisy_ui/version.rb +1 -1
  59. data/lib/daisy_ui.rb +2 -0
  60. metadata +3 -2
data/lib/daisy_ui/hero.rb CHANGED
@@ -5,20 +5,16 @@ module DaisyUI
5
5
  class Hero < Base
6
6
  self.component_class = :hero
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def content(**opts, &)
17
- div(class: component_classes("hero-content", options: opts), **opts, &)
12
+ def content(**options, &)
13
+ div(class: component_classes("hero-content", options:), **options, &)
18
14
  end
19
15
 
20
- def overlay(**opts, &)
21
- div(class: component_classes("hero-overlay", options: opts), **opts, &)
16
+ def overlay(**options, &)
17
+ div(class: component_classes("hero-overlay", options:), **options, &)
22
18
  end
23
19
  end
24
20
  end
@@ -5,16 +5,12 @@ module DaisyUI
5
5
  class Indicator < Base
6
6
  self.component_class = :indicator
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def item(**opts, &)
17
- span(class: component_classes("indicator-item", options: opts), **opts, &)
12
+ def item(**options, &)
13
+ span(class: component_classes("indicator-item", options:), **options, &)
18
14
  end
19
15
 
20
16
  register_modifiers(
data/lib/daisy_ui/join.rb CHANGED
@@ -3,16 +3,14 @@
3
3
  module DaisyUI
4
4
  # @component html class="join"
5
5
  class Join < Base
6
- def initialize(*, as: :div, **)
7
- super
8
- end
6
+ self.component_class = :join
9
7
 
10
8
  def view_template(&)
11
9
  public_send(as, class: classes, **attributes, &)
12
10
  end
13
11
 
14
- def item(**opts, &)
15
- div(class: component_classes("join-item", options: opts), **opts, &)
12
+ def item(**options, &)
13
+ div(class: component_classes("join-item", options:), **options, &)
16
14
  end
17
15
 
18
16
  register_modifiers(
@@ -54,8 +54,8 @@ module DaisyUI
54
54
  # label.text("Username")
55
55
  # label.text { "Email Address" }
56
56
  # label.text("https://", class: "custom-class")
57
- def text(content = nil, **options, &block)
58
- span(class: component_classes("label", options: options), **options) do
57
+ def text(content = nil, **options)
58
+ span(class: component_classes("label", options:), **options) do
59
59
  content || yield
60
60
  end
61
61
  end
data/lib/daisy_ui/list.rb CHANGED
@@ -13,8 +13,8 @@ module DaisyUI
13
13
  public_send(as, class: classes, **attributes, &)
14
14
  end
15
15
 
16
- def row(**opts, &)
17
- li(class: component_classes("list-row", options: opts), **opts, &)
16
+ def row(**options, &)
17
+ li(class: component_classes("list-row", options:), **options, &)
18
18
  end
19
19
 
20
20
  register_modifiers(
@@ -12,8 +12,6 @@ module DaisyUI
12
12
  public_send(as, class: classes, **attributes, &)
13
13
  end
14
14
 
15
- private
16
-
17
15
  register_modifiers(
18
16
  # "sm:loading-spinner"
19
17
  # "@sm:loading-spinner"
data/lib/daisy_ui/mask.rb CHANGED
@@ -4,16 +4,10 @@ module DaisyUI
4
4
  class Mask < Base
5
5
  self.component_class = :mask
6
6
 
7
- def initialize(*, as: :div, **)
8
- super
9
- end
10
-
11
7
  def view_template(&)
12
8
  public_send(as, class: classes, **attributes, &)
13
9
  end
14
10
 
15
- private
16
-
17
11
  register_modifiers(
18
12
  # "sm:mask-squircle"
19
13
  # "@sm:mask-squircle"
data/lib/daisy_ui/menu.rb CHANGED
@@ -8,12 +8,12 @@ module DaisyUI
8
8
  ul(class: classes, **attributes, &)
9
9
  end
10
10
 
11
- def title(*, as: :li, **opts, &)
12
- public_send(as, class: component_classes("menu-title", options: opts), **opts, &)
11
+ def title(*, as: :li, **options, &)
12
+ public_send(as, class: component_classes("menu-title", options:), **options, &)
13
13
  end
14
14
 
15
- def item(*, **, &)
16
- render MenuItem.new(*, **, &)
15
+ def item(...)
16
+ render MenuItem.new(...)
17
17
  end
18
18
 
19
19
  def submenu(*modifiers, **, &)
@@ -28,8 +28,6 @@ module DaisyUI
28
28
  end
29
29
  end
30
30
 
31
- private
32
-
33
31
  register_modifiers(
34
32
  # "sm:menu-xs"
35
33
  # "@sm:menu-xs"
@@ -9,20 +9,18 @@ module DaisyUI
9
9
  li(class: classes, **attributes, &)
10
10
  end
11
11
 
12
- def title(*, **options, &block)
13
- h2(class: component_classes("menu-title", options: options), **options, &block)
12
+ def title(*, **options, &)
13
+ h2(class: component_classes("menu-title", options:), **options, &)
14
14
  end
15
15
 
16
- def submenu(*modifiers, **opts, &)
16
+ def submenu(*modifiers, **, &)
17
17
  if modifiers.include?(:collapsible)
18
- render CollapsibleSubMenu.new(*modifiers, **opts, &)
18
+ render CollapsibleSubMenu.new(*modifiers, **, &)
19
19
  else
20
- render SubMenu.new(*modifiers, **opts, &)
20
+ render SubMenu.new(*modifiers, **, &)
21
21
  end
22
22
  end
23
23
 
24
- private
25
-
26
24
  register_modifiers(
27
25
  # "sm:disabled"
28
26
  # "@sm:disabled"
@@ -5,16 +5,12 @@ module DaisyUI
5
5
  class MockupBrowser < Base
6
6
  self.component_class = "mockup-browser"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def toolbar(**opts, &)
17
- div(class: component_classes("mockup-browser-toolbar", options: opts), **opts, &)
12
+ def toolbar(**options, &)
13
+ div(class: component_classes("mockup-browser-toolbar", options:), **options, &)
18
14
  end
19
15
  end
20
16
  end
@@ -5,10 +5,6 @@ module DaisyUI
5
5
  class MockupCode < Base
6
6
  self.component_class = "mockup-code"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
@@ -5,20 +5,16 @@ module DaisyUI
5
5
  class MockupPhone < Base
6
6
  self.component_class = "mockup-phone"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def camera(**opts, &)
17
- div(class: component_classes("mockup-phone-camera", options: opts), **opts, &)
12
+ def camera(**options, &)
13
+ div(class: component_classes("mockup-phone-camera", options:), **options, &)
18
14
  end
19
15
 
20
- def display(**opts, &)
21
- div(class: component_classes("mockup-phone-display", options: opts), **opts, &)
16
+ def display(**options, &)
17
+ div(class: component_classes("mockup-phone-display", options:), **options, &)
22
18
  end
23
19
  end
24
20
  end
@@ -5,10 +5,6 @@ module DaisyUI
5
5
  class MockupWindow < Base
6
6
  self.component_class = "mockup-window"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
@@ -17,20 +17,20 @@ module DaisyUI
17
17
  end
18
18
  end
19
19
 
20
- def body(*, as: :div, **opts, &)
21
- public_send(as, class: component_classes("modal-box", options: opts), **opts, &)
20
+ def body(*, as: :div, **options, &)
21
+ public_send(as, class: component_classes("modal-box", options:), **options, &)
22
22
  end
23
23
 
24
- def action(*, as: :div, **opts, &block)
25
- action_classes = component_classes("modal-action", options: opts)
26
- public_send(as, class: action_classes, **opts) do
24
+ def action(*, as: :div, **options, &block)
25
+ action_classes = component_classes("modal-action", options:)
26
+ public_send(as, class: action_classes, **options) do
27
27
  block&.call(self)
28
28
  end
29
29
  end
30
30
 
31
- def backdrop(*, **opts, &)
32
- backdrop_classes = component_classes("modal-backdrop", options: opts)
33
- form method: :dialog, class: backdrop_classes, **opts do
31
+ def backdrop(*, **options, &)
32
+ backdrop_classes = component_classes("modal-backdrop", options:)
33
+ form method: :dialog, class: backdrop_classes, **options do
34
34
  button
35
35
  end
36
36
  end
@@ -41,8 +41,6 @@ module DaisyUI
41
41
  end
42
42
  end
43
43
 
44
- private
45
-
46
44
  register_modifiers(
47
45
  # "sm:modal-open"
48
46
  # "@sm:modal-open"
@@ -12,16 +12,16 @@ module DaisyUI
12
12
  public_send(as, class: classes, **attributes, &)
13
13
  end
14
14
 
15
- def start(*, as: :div, **opts, &)
16
- public_send(as, class: component_classes("navbar-start", options: opts), **opts, &)
15
+ def start(*, as: :div, **options, &)
16
+ public_send(as, class: component_classes("navbar-start", options:), **options, &)
17
17
  end
18
18
 
19
- def center(*, as: :div, **opts, &)
20
- public_send(as, class: component_classes("navbar-center", options: opts), **opts, &)
19
+ def center(*, as: :div, **options, &)
20
+ public_send(as, class: component_classes("navbar-center", options:), **options, &)
21
21
  end
22
22
 
23
- def end(*, as: :div, **opts, &)
24
- public_send(as, class: component_classes("navbar-end", options: opts), **opts, &)
23
+ def end(*, as: :div, **options, &)
24
+ public_send(as, class: component_classes("navbar-end", options:), **options, &)
25
25
  end
26
26
 
27
27
  register_modifiers(
@@ -5,16 +5,12 @@ module DaisyUI
5
5
  class Pagination < Base
6
6
  self.component_class = "join"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def item(**opts, &)
17
- div(class: component_classes("join-item", options: opts), **opts, &)
12
+ def item(**options, &)
13
+ div(class: component_classes("join-item", options:), **options, &)
18
14
  end
19
15
 
20
16
  register_modifiers(
@@ -5,10 +5,6 @@ module DaisyUI
5
5
  class Rating < Base
6
6
  self.component_class = :rating
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
@@ -4,16 +4,10 @@ module DaisyUI
4
4
  class Skeleton < Base
5
5
  self.component_class = :skeleton
6
6
 
7
- def initialize(*, as: :div, **)
8
- super
9
- end
10
-
11
7
  def view_template(&)
12
8
  public_send(as, class: classes, **attributes, &)
13
9
  end
14
10
 
15
- private
16
-
17
11
  register_modifiers({})
18
12
  end
19
13
  end
@@ -5,10 +5,6 @@ module DaisyUI
5
5
  class Stack < Base
6
6
  self.component_class = :stack
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
data/lib/daisy_ui/stat.rb CHANGED
@@ -5,36 +5,32 @@ module DaisyUI
5
5
  class Stat < Base
6
6
  self.component_class = "stats"
7
7
 
8
- def initialize(*, as: :div, **)
9
- super
10
- end
11
-
12
8
  def view_template(&)
13
9
  public_send(as, class: classes, **attributes, &)
14
10
  end
15
11
 
16
- def item(**opts, &)
17
- div(class: component_classes("stat", options: opts), **opts, &)
12
+ def item(**options, &)
13
+ div(class: component_classes("stat", options:), **options, &)
18
14
  end
19
15
 
20
- def title(**opts, &)
21
- div(class: component_classes("stat-title", options: opts), **opts, &)
16
+ def title(**options, &)
17
+ div(class: component_classes("stat-title", options:), **options, &)
22
18
  end
23
19
 
24
- def value(**opts, &)
25
- div(class: component_classes("stat-value", options: opts), **opts, &)
20
+ def value(**options, &)
21
+ div(class: component_classes("stat-value", options:), **options, &)
26
22
  end
27
23
 
28
- def desc(**opts, &)
29
- div(class: component_classes("stat-desc", options: opts), **opts, &)
24
+ def desc(**options, &)
25
+ div(class: component_classes("stat-desc", options:), **options, &)
30
26
  end
31
27
 
32
- def figure(**opts, &)
33
- div(class: component_classes("stat-figure", options: opts), **opts, &)
28
+ def figure(**options, &)
29
+ div(class: component_classes("stat-figure", options:), **options, &)
34
30
  end
35
31
 
36
- def actions(**opts, &)
37
- div(class: component_classes("stat-actions", options: opts), **opts, &)
32
+ def actions(**options, &)
33
+ div(class: component_classes("stat-actions", options:), **options, &)
38
34
  end
39
35
 
40
36
  register_modifiers(
@@ -13,12 +13,12 @@ module DaisyUI
13
13
  public_send(as, class: classes, **attributes, &)
14
14
  end
15
15
 
16
- def step(**opts, &)
17
- li(class: component_classes("step", options: opts), **opts, &)
16
+ def step(**options, &)
17
+ li(class: component_classes("step", options:), **options, &)
18
18
  end
19
19
 
20
- def icon(**opts, &)
21
- div(class: component_classes("step-icon", options: opts), **opts, &)
20
+ def icon(**options, &)
21
+ div(class: component_classes("step-icon", options:), **options, &)
22
22
  end
23
23
 
24
24
  register_modifiers(
@@ -17,11 +17,11 @@ module DaisyUI
17
17
  end
18
18
  end
19
19
 
20
- if @items.any?
21
- ul do
22
- @items.each do |item|
23
- render item
24
- end
20
+ return unless @items.any?
21
+
22
+ ul do
23
+ @items.each do |item|
24
+ render item
25
25
  end
26
26
  end
27
27
  end
@@ -30,8 +30,8 @@ module DaisyUI
30
30
  @title = block
31
31
  end
32
32
 
33
- def item(*, **, &)
34
- @items << MenuItem.new(*, **, &)
33
+ def item(...)
34
+ @items << MenuItem.new(...)
35
35
  end
36
36
  end
37
37
  end
data/lib/daisy_ui/swap.rb CHANGED
@@ -13,16 +13,16 @@ module DaisyUI
13
13
  public_send(as, class: classes, **attributes, &)
14
14
  end
15
15
 
16
- def on(**opts, &)
17
- div(class: component_classes("swap-on", options: opts), **opts, &)
16
+ def on(**options, &)
17
+ div(class: component_classes("swap-on", options:), **options, &)
18
18
  end
19
19
 
20
- def off(**opts, &)
21
- div(class: component_classes("swap-off", options: opts), **opts, &)
20
+ def off(**options, &)
21
+ div(class: component_classes("swap-off", options:), **options, &)
22
22
  end
23
23
 
24
- def indeterminate(**opts, &)
25
- div(class: component_classes("swap-indeterminate", options: opts), **opts, &)
24
+ def indeterminate(**options, &)
25
+ div(class: component_classes("swap-indeterminate", options:), **options, &)
26
26
  end
27
27
 
28
28
  register_modifiers(
data/lib/daisy_ui/tab.rb CHANGED
@@ -3,8 +3,8 @@
3
3
  module DaisyUI
4
4
  # @private
5
5
  class Tab < Base
6
- def initialize(*modifiers, label: nil, id: nil, **options)
7
- super(*modifiers, **options)
6
+ def initialize(*modifiers, label: nil, id: nil, **)
7
+ super(*modifiers, **)
8
8
  @label = label
9
9
  @id = id
10
10
  end
@@ -25,15 +25,15 @@ module DaisyUI
25
25
  end
26
26
  end
27
27
 
28
- def content(*, **opts, &block)
28
+ def content(*, **options, &block)
29
29
  unless id
30
30
  raise ArgumentError,
31
31
  "You must pass an id to Tabs#new if you want to add content"
32
32
  end
33
33
 
34
- @content = -> do
35
- content_classes = component_classes("tab-content", options: opts)
36
- div role: :tabpanel, class: content_classes, **opts, &block
34
+ @content = lambda do
35
+ content_classes = component_classes("tab-content", options:)
36
+ div role: :tabpanel, class: content_classes, **options, &block
37
37
  end
38
38
  end
39
39
  end
@@ -17,9 +17,9 @@ module DaisyUI
17
17
  tab_attrs = {
18
18
  type: :radio,
19
19
  name: id,
20
- class: classes, # This deletes :class from options
20
+ class: classes, # This deletes :class from options
21
21
  role: :tab,
22
- aria: {label: @label}
22
+ aria: { label: @label }
23
23
  }
24
24
 
25
25
  # Now get remaining attributes (class has been deleted by classes method)
@@ -52,6 +52,13 @@ module DaisyUI
52
52
 
53
53
  private
54
54
 
55
+ # Override Base#attributes to exclude :id from the tab input.
56
+ # The TabWithContent component uses :id for the `name` attribute
57
+ # to group radio inputs together - NOT for the id attribute.
58
+ def attributes
59
+ options
60
+ end
61
+
55
62
  register_modifiers(
56
63
  # "sm:tab-active"
57
64
  # "@sm:tab-active"
@@ -18,8 +18,6 @@ module DaisyUI
18
18
  div role: :tab, class: classes, **attrs, &
19
19
  end
20
20
 
21
- private
22
-
23
21
  register_modifiers(
24
22
  # "sm:tab-active"
25
23
  # "@sm:tab-active"
@@ -8,24 +8,22 @@ module DaisyUI
8
8
  table(class: classes, **attributes, &)
9
9
  end
10
10
 
11
- def header(*, **, &)
12
- thead(*, **, &)
11
+ def header(...)
12
+ thead(...)
13
13
  end
14
14
 
15
- def row(*, **, &)
16
- render TableRow.new(*, **, &)
15
+ def row(...)
16
+ render TableRow.new(...)
17
17
  end
18
18
 
19
- def body(*, **, &)
20
- tbody(*, **, &)
19
+ def body(...)
20
+ tbody(...)
21
21
  end
22
22
 
23
- def footer(*, **, &)
24
- tfoot(*, **, &)
23
+ def footer(...)
24
+ tfoot(...)
25
25
  end
26
26
 
27
- private
28
-
29
27
  register_modifiers(
30
28
  # "sm:table-zebra"
31
29
  # "@sm:table-zebra"
@@ -8,16 +8,14 @@ module DaisyUI
8
8
  tr(class: classes, **attributes, &)
9
9
  end
10
10
 
11
- def head(*, **, &)
12
- th(*, **, &)
11
+ def head(...)
12
+ th(...)
13
13
  end
14
14
 
15
- def column(*, **, &)
16
- td(*, **, &)
15
+ def column(...)
16
+ td(...)
17
17
  end
18
- alias_method :cell, :column
19
-
20
- private
18
+ alias cell column
21
19
 
22
20
  register_modifiers(
23
21
  # "sm:table-row-hover"
data/lib/daisy_ui/tabs.rb CHANGED
@@ -16,15 +16,20 @@ module DaisyUI
16
16
  def tab(*args, label: nil, **, &)
17
17
  # If first arg is a string, it's the label, rest are modifiers
18
18
  # Otherwise all args are modifiers
19
- if args.first.is_a?(String)
20
- label = args.shift
21
- end
19
+ label = args.shift if args.first.is_a?(String)
22
20
 
23
21
  render Tab.new(*args, label:, id:, **, &)
24
22
  end
25
23
 
26
24
  private
27
25
 
26
+ # Override Base#attributes to exclude :id from the main tabs container.
27
+ # The Tabs component uses :id internally to wire up the radio inputs
28
+ # and their associated content panels - NOT for the main container.
29
+ def attributes
30
+ options
31
+ end
32
+
28
33
  register_modifiers(
29
34
  # "sm:tabs-boxed"
30
35
  # "@sm:tabs-boxed"
@@ -36,7 +36,7 @@ module DaisyUI
36
36
  # Input always has just the theme-controller class
37
37
  input_classes = self.class.component_class.to_s
38
38
 
39
- attrs = {type: :checkbox, class: input_classes}
39
+ attrs = { type: :checkbox, class: input_classes }
40
40
  attrs[:value] = theme_value if theme_value
41
41
  attrs[:checked] = true if checked
42
42
  attrs.merge!(options)
@@ -48,7 +48,7 @@ module DaisyUI
48
48
  label(class: wrapper_classes) do
49
49
  public_send(as, **attrs)
50
50
  whitespace
51
- block.call
51
+ yield
52
52
  whitespace
53
53
  end
54
54
  else