daisyui 1.1.1 → 1.2.0

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.
@@ -9,20 +9,32 @@ module DaisyUI
9
9
 
10
10
  register_modifiers(
11
11
  # "sm:swap"
12
+ # "@sm:swap"
12
13
  # "md:swap"
14
+ # "@md:swap"
13
15
  # "lg:swap"
16
+ # "@lg:swap"
14
17
  swap: "swap",
15
18
  # "sm:swap sm:swap-rotate"
19
+ # "@sm:swap @sm:swap-rotate"
16
20
  # "md:swap md:swap-rotate"
21
+ # "@md:swap @md:swap-rotate"
17
22
  # "lg:swap lg:swap-rotate"
23
+ # "@lg:swap @lg:swap-rotate"
18
24
  swap_rotate: "swap swap-rotate",
19
25
  # "sm:swap sm:swap-flip"
26
+ # "@sm:swap @sm:swap-flip"
20
27
  # "md:swap md:swap-flip"
28
+ # "@md:swap @md:swap-flip"
21
29
  # "lg:swap lg:swap-flip"
30
+ # "@lg:swap @lg:swap-flip"
22
31
  swap_flip: "swap swap-flip",
23
32
  # "sm:toggle"
33
+ # "@sm:toggle"
24
34
  # "md:toggle"
35
+ # "@md:toggle"
25
36
  # "lg:toggle"
37
+ # "@lg:toggle"
26
38
  toggle: "toggle"
27
39
  )
28
40
 
@@ -34,7 +46,7 @@ module DaisyUI
34
46
 
35
47
  def view_template(&block)
36
48
  # Input always has just the theme-controller class
37
- input_classes = self.class.component_class.to_s
49
+ input_classes = apply_prefix(self.class.component_class.to_s)
38
50
 
39
51
  attrs = { type: :checkbox, class: input_classes }
40
52
  attrs[:value] = theme_value if theme_value
@@ -24,12 +24,12 @@ module DaisyUI
24
24
  # "lg:toast-center"
25
25
  # "@lg:toast-center"
26
26
  center: "toast-center",
27
- # "sm:toast-end"
28
- # "@sm:toast-end"
29
- # "md:toast-end"
30
- # "@md:toast-end"
31
- # "lg:toast-end"
32
- # "@lg:toast-end"
27
+ # "sm:toast-end"
28
+ # "@sm:toast-end"
29
+ # "md:toast-end"
30
+ # "@md:toast-end"
31
+ # "lg:toast-end"
32
+ # "@lg:toast-end"
33
33
  end: "toast-end",
34
34
  # "sm:toast-top"
35
35
  # "@sm:toast-top"
@@ -4,13 +4,19 @@ module DaisyUI
4
4
  class Tooltip < Base
5
5
  self.component_class = :tooltip
6
6
 
7
- def initialize(*, tip:, as: :div, **)
7
+ def initialize(*, tip: nil, as: :div, **)
8
8
  super(*, as:, **)
9
9
  @tip = tip
10
10
  end
11
11
 
12
12
  def view_template(&)
13
- public_send(as, class: classes, data_tip: tip, **attributes, &)
13
+ opts = { class: classes, **attributes }
14
+ opts[:data_tip] = tip if tip
15
+ public_send(as, **opts, &)
16
+ end
17
+
18
+ def content(**options, &)
19
+ div(class: component_classes("tooltip-content", options:), **options, &)
14
20
  end
15
21
 
16
22
  private
@@ -108,7 +114,28 @@ module DaisyUI
108
114
  # "@md:tooltip-error"
109
115
  # "lg:tooltip-error"
110
116
  # "@lg:tooltip-error"
111
- error: "tooltip-error"
117
+ error: "tooltip-error",
118
+ # "sm:tooltip-start"
119
+ # "@sm:tooltip-start"
120
+ # "md:tooltip-start"
121
+ # "@md:tooltip-start"
122
+ # "lg:tooltip-start"
123
+ # "@lg:tooltip-start"
124
+ start: "tooltip-start",
125
+ # "sm:tooltip-center"
126
+ # "@sm:tooltip-center"
127
+ # "md:tooltip-center"
128
+ # "@md:tooltip-center"
129
+ # "lg:tooltip-center"
130
+ # "@lg:tooltip-center"
131
+ center: "tooltip-center",
132
+ # "sm:tooltip-end"
133
+ # "@sm:tooltip-end"
134
+ # "md:tooltip-end"
135
+ # "@md:tooltip-end"
136
+ # "lg:tooltip-end"
137
+ # "@lg:tooltip-end"
138
+ end: "tooltip-end"
112
139
  )
113
140
  end
114
141
  end
@@ -3,5 +3,5 @@
3
3
  module DaisyUI
4
4
  # This timestamp is automatically updated when releasing a new version
5
5
  # Format: YYYY-MM-DD HH:MM:SS UTC
6
- UPDATED_AT = "2026-04-05 07:31:56 UTC"
6
+ UPDATED_AT = "2026-06-26 15:27:35 UTC"
7
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DaisyUI
4
- VERSION = "1.1.1"
4
+ VERSION = "1.2.0"
5
5
  end
data/lib/daisy_ui.rb CHANGED
@@ -11,6 +11,9 @@ loader.inflector.inflect(
11
11
  )
12
12
  loader.ignore("#{__dir__}/daisyui.rb")
13
13
  loader.ignore("#{__dir__}/daisy_ui/updated_at.rb")
14
+ # The Rails engine references Rails::Engine, so it is required explicitly below
15
+ # (only when Rails is present) rather than autoloaded.
16
+ loader.ignore("#{__dir__}/daisy_ui/engine.rb")
14
17
  loader.setup # ready!
15
18
  loader.load_file("#{__dir__}/daisy_ui/base.rb")
16
19
 
@@ -18,3 +21,7 @@ module DaisyUI
18
21
  extend Configurable
19
22
  extend Phlex::Kit
20
23
  end
24
+
25
+ # Optional Rails integration (exposes the opt-in Stimulus controller via
26
+ # importmap/assets). Loaded only under Rails; the gem stays pure Phlex otherwise.
27
+ require_relative "daisy_ui/engine" if defined?(Rails::Engine)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daisyui
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikael Henriksson
@@ -55,10 +55,13 @@ files:
55
55
  - CHANGELOG.md
56
56
  - LICENSE.txt
57
57
  - README.md
58
+ - app/javascript/daisy_ui/controllers/daisy_dropdown_controller.js
59
+ - config/importmap.rb
58
60
  - exe/daisyui-mcp
59
61
  - lib/daisy_ui.rb
60
62
  - lib/daisy_ui/accordion.rb
61
63
  - lib/daisy_ui/alert.rb
64
+ - lib/daisy_ui/aura.rb
62
65
  - lib/daisy_ui/avatar.rb
63
66
  - lib/daisy_ui/avatar_group.rb
64
67
  - lib/daisy_ui/badge.rb
@@ -79,6 +82,7 @@ files:
79
82
  - lib/daisy_ui/dock.rb
80
83
  - lib/daisy_ui/drawer.rb
81
84
  - lib/daisy_ui/dropdown.rb
85
+ - lib/daisy_ui/engine.rb
82
86
  - lib/daisy_ui/fab.rb
83
87
  - lib/daisy_ui/fieldset.rb
84
88
  - lib/daisy_ui/file_input.rb
@@ -98,6 +102,7 @@ files:
98
102
  - lib/daisy_ui/loading.rb
99
103
  - lib/daisy_ui/mask.rb
100
104
  - lib/daisy_ui/mcp_server.rb
105
+ - lib/daisy_ui/megamenu.rb
101
106
  - lib/daisy_ui/menu.rb
102
107
  - lib/daisy_ui/menu_item.rb
103
108
  - lib/daisy_ui/mockup_browser.rb
@@ -106,6 +111,7 @@ files:
106
111
  - lib/daisy_ui/mockup_window.rb
107
112
  - lib/daisy_ui/modal.rb
108
113
  - lib/daisy_ui/navbar.rb
114
+ - lib/daisy_ui/otp.rb
109
115
  - lib/daisy_ui/pagination.rb
110
116
  - lib/daisy_ui/progress.rb
111
117
  - lib/daisy_ui/radial_progress.rb