bootstrap5_helper 1.0.1 → 1.1.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.
@@ -34,6 +34,7 @@ module Bootstrap5Helper
34
34
  # @option opts [Hash] :data
35
35
  # @option opts [Boolean] :always_open
36
36
  # @option opts [Boolean] :flush
37
+ # @yield [Accordion]
37
38
  # @return [Accordion]
38
39
  #
39
40
  def accordion_helper(opts = {}, &block)
@@ -62,7 +63,7 @@ module Bootstrap5Helper
62
63
  # @option opts [String] :class
63
64
  # @option opts [Boolean] :dismissible
64
65
  #
65
- # @return [String]
66
+ # @return [Alert]
66
67
  #
67
68
  def alert_helper(*args, &block)
68
69
  Alert.new(self, *args, &block)
@@ -94,7 +95,7 @@ module Bootstrap5Helper
94
95
  # @option opts [String] :class
95
96
  # @option opts [Hash] : :data
96
97
  #
97
- # @return [String]
98
+ # @return [Badge]
98
99
  #
99
100
  def badge_helper(*args, &block)
100
101
  Badge.new(self, *args, &block)
@@ -157,13 +158,34 @@ module Bootstrap5Helper
157
158
  # @option opts [String] :id
158
159
  # @option opts [String] :class
159
160
  # @option opts [Hash] :data
160
- # @return [String]
161
+ # @yield [Card]
162
+ # @return [Card]
161
163
  #
162
164
  def card_helper(opts = {}, &block)
163
165
  Card.new(self, opts, &block)
164
166
  end
165
167
 
166
- # Generates a Dropdown component. Default type `:dropdown`.
168
+ # @overload card_with_nav_tab_helper(type, opts)
169
+ # @param [Symbol|String] type - :tabs, :pills
170
+ # @param [Hash] opts
171
+ # @option opts [String] :id
172
+ # @option opts [String] :class
173
+ # @option opts [Hash] :data
174
+ #
175
+ # @overload card_with_nav_tab_helper(opts)
176
+ # @param [Hash] opts
177
+ # @option opts [String] :id
178
+ # @option opts [String] :class
179
+ # @option opts [Hash] :data
180
+ #
181
+ # @yield [CardWithNavTab]
182
+ # @return [CardWithNavTab]
183
+ #
184
+ def card_with_nav_tab_helper(*args, &block)
185
+ CardWithNavTab.new(self, *args, &block)
186
+ end
187
+
188
+ # Generates a Dropdown component.
167
189
  #
168
190
  # @example Dropdown
169
191
  # ```erb
@@ -177,19 +199,7 @@ module Bootstrap5Helper
177
199
  # <% end %>
178
200
  # ```
179
201
  #
180
- # @example Dropup
181
- # ```erb
182
- # <%= dropdown_helper :dropup do |dropdown| %>
183
- # <%= dropdown.button(:primary) { "Action" } %>
184
- # <%= dropdown.menu do |menu| %>
185
- # <%= menu.link 'Edit', '#' %>
186
- # <%= menu.link 'Delete', '#' %>
187
- # <%= menu.text 'Static text' %>
188
- # <% end %>
189
- # <% end %>
190
- # ```
191
- #
192
- # @example Dropdown w/ menu
202
+ # @example Dropdown w/ Login Form
193
203
  # ```erb
194
204
  # <%= dropdown_helper do |dropdown| %>
195
205
  # <%= dropdown.button :primary do %>
@@ -222,35 +232,100 @@ module Bootstrap5Helper
222
232
  # <% end %>
223
233
  # ```
224
234
  #
225
- # @example Dropdown::Menu in a Nav menu
226
- # ```erb
227
- # <%= nav.dropdown 'More' do |dropdown| %>
228
- # <%= dropdown.item :item5 %>
229
- # <%= dropdown.item(:item6) { 'Item 6' } %>
230
- # <% end %>
231
- # ```
232
- #
233
- # @overload dropdown_helper(type, opts)
234
- # @param [Symbol|String] type - :dropdown, :dropup, :dropstart, :dropend
235
- # @param [Hash] opts
235
+ # @overload dropdown_helper(tag, opts)
236
+ # @param [Symbol|String] tag - The HTML element to use to wrap the component.
237
+ # @param [Hash] opts
236
238
  # @option opts [String] :id
237
239
  # @option opts [String] :class
238
240
  # @option opts [Hash] :data
239
- # @option opts [Boolean] :split
241
+ # @option opts [Boolean] :centered
240
242
  #
241
- # @overload dropdown(opts)
242
- # @param [Hash] opts
243
+ # @overload dropdown_helper(opts)
244
+ # @param [Hash] opts
243
245
  # @option opts [String] :id
244
246
  # @option opts [String] :class
245
247
  # @option opts [Hash] :data
246
- # @option opts [Boolean] :split
248
+ # @option opts [Boolean] :centered
247
249
  #
248
- # @return [String]
250
+ # @yield [Dropdown]
251
+ # @return [Dropdown]
249
252
  #
250
253
  def dropdown_helper(*args, &block)
251
254
  Dropdown.new(self, *args, &block)
252
255
  end
253
256
 
257
+ # Generates a Dropup component.
258
+ #
259
+ # @overload dropup_helper(tag, opts)
260
+ # @param [Symbol|String] tag - The HTML element to use to wrap the component.
261
+ # @param [Hash] opts
262
+ # @option opts [String] :id
263
+ # @option opts [String] :class
264
+ # @option opts [Hash] :data
265
+ # @option opts [Boolean] :centered
266
+ #
267
+ # @overload dropup_helper(opts)
268
+ # @param [Hash] opts
269
+ # @option opts [String] :id
270
+ # @option opts [String] :class
271
+ # @option opts [Hash] :data
272
+ # @option opts [Boolean] :centered
273
+ #
274
+ # @yield [Dropdup]
275
+ # @return [Dropup]
276
+ #
277
+ def dropup_helper(*args, &block)
278
+ Dropup.new(self, *args, &block)
279
+ end
280
+
281
+ # Generates a Dropstart component.
282
+ #
283
+ # @overload dropstart_helper(tag, opts)
284
+ # @param [Symbol|String] tag - The HTML element to use to wrap the component.
285
+ # @param [Hash] opts
286
+ # @option opts [String] :id
287
+ # @option opts [String] :class
288
+ # @option opts [Hash] :data
289
+ # @option opts [Boolean] :centered
290
+ #
291
+ # @overload dropstart_helper(opts)
292
+ # @param [Hash] opts
293
+ # @option opts [String] :id
294
+ # @option opts [String] :class
295
+ # @option opts [Hash] :data
296
+ # @option opts [Boolean] :centered
297
+ #
298
+ # @yield [Dropstart]
299
+ # @return [Dropstart]
300
+ #
301
+ def dropstart_helper(*args, &block)
302
+ Dropstart.new(self, *args, &block)
303
+ end
304
+
305
+ # Generates a Dropend component.
306
+ #
307
+ # @overload dropend_helper(tag, opts)
308
+ # @param [Symbol|String] tag - The HTML element to use to wrap the component.
309
+ # @param [Hash] opts
310
+ # @option opts [String] :id
311
+ # @option opts [String] :class
312
+ # @option opts [Hash] :data
313
+ # @option opts [Boolean] :centered
314
+ #
315
+ # @overload dropend_helper(opts)
316
+ # @param [Hash] opts
317
+ # @option opts [String] :id
318
+ # @option opts [String] :class
319
+ # @option opts [Hash] :data
320
+ # @option opts [Boolean] :centered
321
+ #
322
+ # @yield [Dropend]
323
+ # @return [Dropend]
324
+ #
325
+ def dropend_helper(*args, &block)
326
+ Dropend.new(self, *args, &block)
327
+ end
328
+
254
329
  # Generates Modal windows.
255
330
  #
256
331
  # @example
@@ -283,7 +358,8 @@ module Bootstrap5Helper
283
358
  # @option opts [Boolean] :static
284
359
  # @option opts [Boolean|Symbol] :fullscreen - true, :sm, :lg, :xl etc
285
360
  # @option opts [Symbol] :size - :sm, :md, :lg etc
286
- # @return [String]
361
+ # @yield [Modal]
362
+ # @return [Modal]
287
363
  #
288
364
  def modal_helper(opts = {}, &block)
289
365
  Modal.new(self, opts, &block)
@@ -324,7 +400,8 @@ module Bootstrap5Helper
324
400
  # @option opts [Hash] :data
325
401
  # @option opts [Hash] :child - data attributes for child, NOT wrapper
326
402
  #
327
- # @return [String]
403
+ # @yield [Nav]
404
+ # @return [Nav]
328
405
  #
329
406
  def nav_helper(*args, &block)
330
407
  Nav.new(self, *args, &block)
@@ -388,7 +465,8 @@ module Bootstrap5Helper
388
465
  # @option opts [Boolean] :scrollable
389
466
  # @option opts [Boolean|String] :backdrop - true, false, 'static'
390
467
  #
391
- # @return [String]
468
+ # @yield [Offcanvas]
469
+ # @return [Offcanvas]
392
470
  #
393
471
  def offcanvas_helper(*args, &block)
394
472
  Offcanvas.new(self, *args, &block)
@@ -416,7 +494,7 @@ module Bootstrap5Helper
416
494
  # @option opts [String] :class
417
495
  # @option opts [Hash] :data
418
496
  #
419
- # @return [String]
497
+ # @return [PageHeader]
420
498
  #
421
499
  def page_header_helper(*args, &block)
422
500
  PageHeader.new(self, *args, &block)
@@ -455,7 +533,7 @@ module Bootstrap5Helper
455
533
  # @option opts [String] :class
456
534
  # @option opts [Hash] :data
457
535
  #
458
- # @return [String]
536
+ # @return [InputGroup]
459
537
  #
460
538
  def input_group_helper(*args, &block)
461
539
  InputGroup.new(self, *args, &block)
@@ -520,7 +598,8 @@ module Bootstrap5Helper
520
598
  # @option opts [String] :class
521
599
  # @option opts [Hash] :data
522
600
  #
523
- # @return [String]
601
+ # @yield [Tab]
602
+ # @return [Tab]
524
603
  #
525
604
  def tab_helper(*args, &block)
526
605
  Tab.new(self, *args, &block)
@@ -539,7 +618,7 @@ module Bootstrap5Helper
539
618
  # @option opts [String] :id
540
619
  # @option opts [String] :class
541
620
  # @option opts [Hash] :data
542
- # @return [String]
621
+ # @return [Spinner]
543
622
  #
544
623
  def spinner_helper(opts = {}, &block)
545
624
  Spinner.new(self, opts, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap5_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert David
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 5.1.3
19
+ version: 5.2.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 5.1.3
26
+ version: 5.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -103,17 +103,22 @@ files:
103
103
  - lib/bootstrap5_helper/badge.rb
104
104
  - lib/bootstrap5_helper/callout.rb
105
105
  - lib/bootstrap5_helper/card.rb
106
+ - lib/bootstrap5_helper/card_with_nav_tab.rb
106
107
  - lib/bootstrap5_helper/component.rb
107
108
  - lib/bootstrap5_helper/configuration.rb
108
109
  - lib/bootstrap5_helper/constants.rb
109
110
  - lib/bootstrap5_helper/dropdown.rb
110
- - lib/bootstrap5_helper/dropdown/menu.rb
111
+ - lib/bootstrap5_helper/dropend.rb
112
+ - lib/bootstrap5_helper/dropstart.rb
113
+ - lib/bootstrap5_helper/dropup.rb
111
114
  - lib/bootstrap5_helper/initialize.rb
112
115
  - lib/bootstrap5_helper/input_group.rb
113
116
  - lib/bootstrap5_helper/modal.rb
114
117
  - lib/bootstrap5_helper/nav.rb
115
118
  - lib/bootstrap5_helper/offcanvas.rb
116
119
  - lib/bootstrap5_helper/offcanvas/content.rb
120
+ - lib/bootstrap5_helper/overlay.rb
121
+ - lib/bootstrap5_helper/overlay/menu.rb
117
122
  - lib/bootstrap5_helper/page_header.rb
118
123
  - lib/bootstrap5_helper/railtie.rb
119
124
  - lib/bootstrap5_helper/spinner.rb