daisyui 1.0.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.
- checksums.yaml +7 -0
- data/lib/daisy_ui/accordion.rb +49 -0
- data/lib/daisy_ui/alert.rb +76 -0
- data/lib/daisy_ui/avatar.rb +41 -0
- data/lib/daisy_ui/avatar_group.rb +19 -0
- data/lib/daisy_ui/badge.rb +118 -0
- data/lib/daisy_ui/base.rb +239 -0
- data/lib/daisy_ui/breadcrumbs.rb +25 -0
- data/lib/daisy_ui/button.rb +197 -0
- data/lib/daisy_ui/calendar.rb +48 -0
- data/lib/daisy_ui/card.rb +73 -0
- data/lib/daisy_ui/carousel.rb +51 -0
- data/lib/daisy_ui/chat.rb +49 -0
- data/lib/daisy_ui/checkbox.rb +112 -0
- data/lib/daisy_ui/collapse.rb +53 -0
- data/lib/daisy_ui/collapsible_sub_menu.rb +55 -0
- data/lib/daisy_ui/configurable.rb +45 -0
- data/lib/daisy_ui/countdown.rb +16 -0
- data/lib/daisy_ui/diff.rb +28 -0
- data/lib/daisy_ui/divider.rb +103 -0
- data/lib/daisy_ui/dock.rb +65 -0
- data/lib/daisy_ui/drawer.rb +61 -0
- data/lib/daisy_ui/dropdown.rb +101 -0
- data/lib/daisy_ui/fab.rb +34 -0
- data/lib/daisy_ui/fieldset.rb +20 -0
- data/lib/daisy_ui/file_input.rb +117 -0
- data/lib/daisy_ui/filter.rb +21 -0
- data/lib/daisy_ui/footer.rb +44 -0
- data/lib/daisy_ui/form_control.rb +15 -0
- data/lib/daisy_ui/hero.rb +24 -0
- data/lib/daisy_ui/hover_gallery.rb +16 -0
- data/lib/daisy_ui/indicator.rb +65 -0
- data/lib/daisy_ui/input.rb +117 -0
- data/lib/daisy_ui/join.rb +35 -0
- data/lib/daisy_ui/kbd.rb +54 -0
- data/lib/daisy_ui/label.rb +15 -0
- data/lib/daisy_ui/link.rb +137 -0
- data/lib/daisy_ui/list.rb +37 -0
- data/lib/daisy_ui/loading.rb +146 -0
- data/lib/daisy_ui/mask.rb +167 -0
- data/lib/daisy_ui/menu.rb +79 -0
- data/lib/daisy_ui/menu_item.rb +50 -0
- data/lib/daisy_ui/mockup_browser.rb +20 -0
- data/lib/daisy_ui/mockup_code.rb +16 -0
- data/lib/daisy_ui/mockup_phone.rb +24 -0
- data/lib/daisy_ui/mockup_window.rb +16 -0
- data/lib/daisy_ui/modal.rb +77 -0
- data/lib/daisy_ui/navbar.rb +31 -0
- data/lib/daisy_ui/pagination.rb +37 -0
- data/lib/daisy_ui/progress.rb +75 -0
- data/lib/daisy_ui/radial_progress.rb +181 -0
- data/lib/daisy_ui/radio.rb +110 -0
- data/lib/daisy_ui/range.rb +110 -0
- data/lib/daisy_ui/rating.rb +68 -0
- data/lib/daisy_ui/select.rb +117 -0
- data/lib/daisy_ui/skeleton.rb +19 -0
- data/lib/daisy_ui/stack.rb +47 -0
- data/lib/daisy_ui/stat.rb +57 -0
- data/lib/daisy_ui/status.rb +110 -0
- data/lib/daisy_ui/steps.rb +41 -0
- data/lib/daisy_ui/sub_menu.rb +37 -0
- data/lib/daisy_ui/swap.rb +52 -0
- data/lib/daisy_ui/tab.rb +40 -0
- data/lib/daisy_ui/tab_with_content.rb +72 -0
- data/lib/daisy_ui/tab_without_content.rb +40 -0
- data/lib/daisy_ui/table.rb +81 -0
- data/lib/daisy_ui/table_row.rb +33 -0
- data/lib/daisy_ui/tabs.rb +80 -0
- data/lib/daisy_ui/textarea.rb +117 -0
- data/lib/daisy_ui/theme_controller.rb +64 -0
- data/lib/daisy_ui/timeline.rb +66 -0
- data/lib/daisy_ui/toast.rb +61 -0
- data/lib/daisy_ui/toggle.rb +110 -0
- data/lib/daisy_ui/tooltip.rb +107 -0
- data/lib/daisy_ui/updated_at.rb +7 -0
- data/lib/daisy_ui/validator.rb +25 -0
- data/lib/daisy_ui/version.rb +5 -0
- data/lib/daisy_ui.rb +17 -0
- metadata +156 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="diff"
|
|
5
|
+
class Diff < Base
|
|
6
|
+
self.component_class = :diff
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :figure, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def item_1(**opts, &)
|
|
17
|
+
div(class: component_classes("diff-item-1", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def item_2(**opts, &)
|
|
21
|
+
div(class: component_classes("diff-item-2", options: opts), **opts, &)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def resizer(**opts, &)
|
|
25
|
+
div(class: component_classes("diff-resizer", options: opts), **opts, &)
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="divider"
|
|
5
|
+
class Divider < Base
|
|
6
|
+
self.component_class = :divider
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :div, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
register_modifiers(
|
|
17
|
+
# "sm:divider-vertical"
|
|
18
|
+
# "@sm:divider-vertical"
|
|
19
|
+
# "md:divider-vertical"
|
|
20
|
+
# "@md:divider-vertical"
|
|
21
|
+
# "lg:divider-vertical"
|
|
22
|
+
# "@lg:divider-vertical"
|
|
23
|
+
vertical: "divider-vertical",
|
|
24
|
+
# "sm:divider-horizontal"
|
|
25
|
+
# "@sm:divider-horizontal"
|
|
26
|
+
# "md:divider-horizontal"
|
|
27
|
+
# "@md:divider-horizontal"
|
|
28
|
+
# "lg:divider-horizontal"
|
|
29
|
+
# "@lg:divider-horizontal"
|
|
30
|
+
horizontal: "divider-horizontal",
|
|
31
|
+
# "sm:divider-start"
|
|
32
|
+
# "@sm:divider-start"
|
|
33
|
+
# "md:divider-start"
|
|
34
|
+
# "@md:divider-start"
|
|
35
|
+
# "lg:divider-start"
|
|
36
|
+
# "@lg:divider-start"
|
|
37
|
+
start: "divider-start",
|
|
38
|
+
# "sm:divider-end"
|
|
39
|
+
# "@sm:divider-end"
|
|
40
|
+
# "md:divider-end"
|
|
41
|
+
# "@md:divider-end"
|
|
42
|
+
# "lg:divider-end"
|
|
43
|
+
# "@lg:divider-end"
|
|
44
|
+
end: "divider-end",
|
|
45
|
+
# "sm:divider-neutral"
|
|
46
|
+
# "@sm:divider-neutral"
|
|
47
|
+
# "md:divider-neutral"
|
|
48
|
+
# "@md:divider-neutral"
|
|
49
|
+
# "lg:divider-neutral"
|
|
50
|
+
# "@lg:divider-neutral"
|
|
51
|
+
neutral: "divider-neutral",
|
|
52
|
+
# "sm:divider-primary"
|
|
53
|
+
# "@sm:divider-primary"
|
|
54
|
+
# "md:divider-primary"
|
|
55
|
+
# "@md:divider-primary"
|
|
56
|
+
# "lg:divider-primary"
|
|
57
|
+
# "@lg:divider-primary"
|
|
58
|
+
primary: "divider-primary",
|
|
59
|
+
# "sm:divider-secondary"
|
|
60
|
+
# "@sm:divider-secondary"
|
|
61
|
+
# "md:divider-secondary"
|
|
62
|
+
# "@md:divider-secondary"
|
|
63
|
+
# "lg:divider-secondary"
|
|
64
|
+
# "@lg:divider-secondary"
|
|
65
|
+
secondary: "divider-secondary",
|
|
66
|
+
# "sm:divider-accent"
|
|
67
|
+
# "@sm:divider-accent"
|
|
68
|
+
# "md:divider-accent"
|
|
69
|
+
# "@md:divider-accent"
|
|
70
|
+
# "lg:divider-accent"
|
|
71
|
+
# "@lg:divider-accent"
|
|
72
|
+
accent: "divider-accent",
|
|
73
|
+
# "sm:divider-success"
|
|
74
|
+
# "@sm:divider-success"
|
|
75
|
+
# "md:divider-success"
|
|
76
|
+
# "@md:divider-success"
|
|
77
|
+
# "lg:divider-success"
|
|
78
|
+
# "@lg:divider-success"
|
|
79
|
+
success: "divider-success",
|
|
80
|
+
# "sm:divider-warning"
|
|
81
|
+
# "@sm:divider-warning"
|
|
82
|
+
# "md:divider-warning"
|
|
83
|
+
# "@md:divider-warning"
|
|
84
|
+
# "lg:divider-warning"
|
|
85
|
+
# "@lg:divider-warning"
|
|
86
|
+
warning: "divider-warning",
|
|
87
|
+
# "sm:divider-info"
|
|
88
|
+
# "@sm:divider-info"
|
|
89
|
+
# "md:divider-info"
|
|
90
|
+
# "@md:divider-info"
|
|
91
|
+
# "lg:divider-info"
|
|
92
|
+
# "@lg:divider-info"
|
|
93
|
+
info: "divider-info",
|
|
94
|
+
# "sm:divider-error"
|
|
95
|
+
# "@sm:divider-error"
|
|
96
|
+
# "md:divider-error"
|
|
97
|
+
# "@md:divider-error"
|
|
98
|
+
# "lg:divider-error"
|
|
99
|
+
# "@lg:divider-error"
|
|
100
|
+
error: "divider-error"
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="dock"
|
|
5
|
+
class Dock < Base
|
|
6
|
+
self.component_class = :dock
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :div, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def label(**opts, &)
|
|
17
|
+
span(class: component_classes("dock-label", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
register_modifiers(
|
|
21
|
+
# "sm:dock-active"
|
|
22
|
+
# "@sm:dock-active"
|
|
23
|
+
# "md:dock-active"
|
|
24
|
+
# "@md:dock-active"
|
|
25
|
+
# "lg:dock-active"
|
|
26
|
+
# "@lg:dock-active"
|
|
27
|
+
active: "dock-active",
|
|
28
|
+
# "sm:dock-xs"
|
|
29
|
+
# "@sm:dock-xs"
|
|
30
|
+
# "md:dock-xs"
|
|
31
|
+
# "@md:dock-xs"
|
|
32
|
+
# "lg:dock-xs"
|
|
33
|
+
# "@lg:dock-xs"
|
|
34
|
+
xs: "dock-xs",
|
|
35
|
+
# "sm:dock-sm"
|
|
36
|
+
# "@sm:dock-sm"
|
|
37
|
+
# "md:dock-sm"
|
|
38
|
+
# "@md:dock-sm"
|
|
39
|
+
# "lg:dock-sm"
|
|
40
|
+
# "@lg:dock-sm"
|
|
41
|
+
sm: "dock-sm",
|
|
42
|
+
# "sm:dock-md"
|
|
43
|
+
# "@sm:dock-md"
|
|
44
|
+
# "md:dock-md"
|
|
45
|
+
# "@md:dock-md"
|
|
46
|
+
# "lg:dock-md"
|
|
47
|
+
# "@lg:dock-md"
|
|
48
|
+
md: "dock-md",
|
|
49
|
+
# "sm:dock-lg"
|
|
50
|
+
# "@sm:dock-lg"
|
|
51
|
+
# "md:dock-lg"
|
|
52
|
+
# "@md:dock-lg"
|
|
53
|
+
# "lg:dock-lg"
|
|
54
|
+
# "@lg:dock-lg"
|
|
55
|
+
lg: "dock-lg",
|
|
56
|
+
# "sm:dock-xl"
|
|
57
|
+
# "@sm:dock-xl"
|
|
58
|
+
# "md:dock-xl"
|
|
59
|
+
# "@md:dock-xl"
|
|
60
|
+
# "lg:dock-xl"
|
|
61
|
+
# "@lg:dock-xl"
|
|
62
|
+
xl: "dock-xl"
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
class Drawer < Base
|
|
5
|
+
self.component_class = :drawer
|
|
6
|
+
|
|
7
|
+
def initialize(*, id:, as: :section, **)
|
|
8
|
+
super
|
|
9
|
+
@id = id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def toggle(**opts, &)
|
|
17
|
+
toggle_classes = component_classes("drawer-toggle", options: opts)
|
|
18
|
+
input(id:, type: :checkbox, class: toggle_classes, **opts, &)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def content(as: :div, **options, &)
|
|
22
|
+
public_send(as, class: component_classes("drawer-content", options: options), **options, &)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def side(as: :div, **options, &)
|
|
26
|
+
public_send(as, class: component_classes("drawer-side", options: options), **options, &)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def overlay(**options, &)
|
|
30
|
+
overlay_classes = component_classes("drawer-overlay", options: options)
|
|
31
|
+
label(for: id, class: overlay_classes, **options, &)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def button(*, **, &)
|
|
35
|
+
render Button.new(*, as: :label, for: id, **, &)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
register_modifiers(
|
|
41
|
+
# "sm:drawer-end"
|
|
42
|
+
# "@sm:drawer-end"
|
|
43
|
+
# "md:drawer-end"
|
|
44
|
+
# "@md:drawer-end"
|
|
45
|
+
# "lg:drawer-end"
|
|
46
|
+
# "@lg:drawer-end"
|
|
47
|
+
# "xl:drawer-end"
|
|
48
|
+
# "@xl:drawer-end"
|
|
49
|
+
end: "drawer-end",
|
|
50
|
+
# "sm:drawer-open"
|
|
51
|
+
# "@sm:drawer-open"
|
|
52
|
+
# "md:drawer-open"
|
|
53
|
+
# "@md:drawer-open"
|
|
54
|
+
# "lg:drawer-open"
|
|
55
|
+
# "@lg:drawer-open"
|
|
56
|
+
# "xl:drawer-open"
|
|
57
|
+
# "@xl:drawer-open"
|
|
58
|
+
open: "drawer-open"
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
class Dropdown < Base
|
|
5
|
+
self.component_class = :dropdown
|
|
6
|
+
|
|
7
|
+
def initialize(*, as: :div, **)
|
|
8
|
+
super
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def view_template(&)
|
|
12
|
+
if modifiers.include?(:tap_to_close)
|
|
13
|
+
details(class: classes, **attributes, &)
|
|
14
|
+
else
|
|
15
|
+
public_send(as, class: classes, **attributes, &)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def button(*, **, &)
|
|
20
|
+
if modifiers.include?(:tap_to_close)
|
|
21
|
+
render Button.new(*, as: :summary, **, &)
|
|
22
|
+
else
|
|
23
|
+
render Button.new(*, as: :div, role: :button, tabindex: 0, **, &)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def content(*, as: :div, **opts, &)
|
|
28
|
+
content_classes = component_classes("dropdown-content", options: opts)
|
|
29
|
+
|
|
30
|
+
if modifiers.include?(:tap_to_close)
|
|
31
|
+
render_as(*, as:, class: content_classes, **opts, &)
|
|
32
|
+
else
|
|
33
|
+
render_as(*, as:, tabindex: 0, class: content_classes, **opts, &)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def menu(*, **opts, &)
|
|
38
|
+
menu_classes = component_classes("dropdown-content", options: opts)
|
|
39
|
+
|
|
40
|
+
if modifiers.include?(:tap_to_close)
|
|
41
|
+
render Menu.new(*, class: menu_classes, **opts, &)
|
|
42
|
+
else
|
|
43
|
+
render Menu.new(*, tabindex: 0, class: menu_classes, **opts, &)
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
private
|
|
48
|
+
|
|
49
|
+
register_modifiers(
|
|
50
|
+
# "sm:dropdown-end"
|
|
51
|
+
# "@sm:dropdown-end"
|
|
52
|
+
# "md:dropdown-end"
|
|
53
|
+
# "@md:dropdown-end"
|
|
54
|
+
# "lg:dropdown-end"
|
|
55
|
+
# "@lg:dropdown-end"
|
|
56
|
+
end: "dropdown-end",
|
|
57
|
+
# "sm:dropdown-top"
|
|
58
|
+
# "@sm:dropdown-top"
|
|
59
|
+
# "md:dropdown-top"
|
|
60
|
+
# "@md:dropdown-top"
|
|
61
|
+
# "lg:dropdown-top"
|
|
62
|
+
# "@lg:dropdown-top"
|
|
63
|
+
top: "dropdown-top",
|
|
64
|
+
# "sm:dropdown-bottom"
|
|
65
|
+
# "@sm:dropdown-bottom"
|
|
66
|
+
# "md:dropdown-bottom"
|
|
67
|
+
# "@md:dropdown-bottom"
|
|
68
|
+
# "lg:dropdown-bottom"
|
|
69
|
+
# "@lg:dropdown-bottom"
|
|
70
|
+
bottom: "dropdown-bottom",
|
|
71
|
+
# "sm:dropdown-left"
|
|
72
|
+
# "@sm:dropdown-left"
|
|
73
|
+
# "md:dropdown-left"
|
|
74
|
+
# "@md:dropdown-left"
|
|
75
|
+
# "lg:dropdown-left"
|
|
76
|
+
# "@lg:dropdown-left"
|
|
77
|
+
left: "dropdown-left",
|
|
78
|
+
# "sm:dropdown-right"
|
|
79
|
+
# "@sm:dropdown-right"
|
|
80
|
+
# "md:dropdown-right"
|
|
81
|
+
# "@md:dropdown-right"
|
|
82
|
+
# "lg:dropdown-right"
|
|
83
|
+
# "@lg:dropdown-right"
|
|
84
|
+
right: "dropdown-right",
|
|
85
|
+
# "sm:dropdown-hover"
|
|
86
|
+
# "@sm:dropdown-hover"
|
|
87
|
+
# "md:dropdown-hover"
|
|
88
|
+
# "@md:dropdown-hover"
|
|
89
|
+
# "lg:dropdown-hover"
|
|
90
|
+
# "@lg:dropdown-hover"
|
|
91
|
+
hover: "dropdown-hover",
|
|
92
|
+
# "sm:dropdown-open"
|
|
93
|
+
# "@sm:dropdown-open"
|
|
94
|
+
# "md:dropdown-open"
|
|
95
|
+
# "@md:dropdown-open"
|
|
96
|
+
# "lg:dropdown-open"
|
|
97
|
+
# "@lg:dropdown-open"
|
|
98
|
+
open: "dropdown-open"
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
end
|
data/lib/daisy_ui/fab.rb
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="fab"
|
|
5
|
+
class Fab < Base
|
|
6
|
+
self.component_class = :fab
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :div, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def close(**opts, &)
|
|
17
|
+
div(class: component_classes("fab-close", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def main_action(**opts, &)
|
|
21
|
+
div(class: component_classes("fab-main-action", options: opts), **opts, &)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
register_modifiers(
|
|
25
|
+
# "sm:fab-flower"
|
|
26
|
+
# "@sm:fab-flower"
|
|
27
|
+
# "md:fab-flower"
|
|
28
|
+
# "@md:fab-flower"
|
|
29
|
+
# "lg:fab-flower"
|
|
30
|
+
# "@lg:fab-flower"
|
|
31
|
+
flower: "fab-flower"
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="fieldset"
|
|
5
|
+
class Fieldset < Base
|
|
6
|
+
self.component_class = :fieldset
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :fieldset, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def legend(**opts, &)
|
|
17
|
+
super(class: component_classes("fieldset-legend", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="file-input"
|
|
5
|
+
class FileInput < Base
|
|
6
|
+
self.component_class = "file-input"
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :input, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, type: :file, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
register_modifiers(
|
|
17
|
+
# "sm:file-input-ghost"
|
|
18
|
+
# "@sm:file-input-ghost"
|
|
19
|
+
# "md:file-input-ghost"
|
|
20
|
+
# "@md:file-input-ghost"
|
|
21
|
+
# "lg:file-input-ghost"
|
|
22
|
+
# "@lg:file-input-ghost"
|
|
23
|
+
ghost: "file-input-ghost",
|
|
24
|
+
# "sm:file-input-xs"
|
|
25
|
+
# "@sm:file-input-xs"
|
|
26
|
+
# "md:file-input-xs"
|
|
27
|
+
# "@md:file-input-xs"
|
|
28
|
+
# "lg:file-input-xs"
|
|
29
|
+
# "@lg:file-input-xs"
|
|
30
|
+
xs: "file-input-xs",
|
|
31
|
+
# "sm:file-input-sm"
|
|
32
|
+
# "@sm:file-input-sm"
|
|
33
|
+
# "md:file-input-sm"
|
|
34
|
+
# "@md:file-input-sm"
|
|
35
|
+
# "lg:file-input-sm"
|
|
36
|
+
# "@lg:file-input-sm"
|
|
37
|
+
sm: "file-input-sm",
|
|
38
|
+
# "sm:file-input-md"
|
|
39
|
+
# "@sm:file-input-md"
|
|
40
|
+
# "md:file-input-md"
|
|
41
|
+
# "@md:file-input-md"
|
|
42
|
+
# "lg:file-input-md"
|
|
43
|
+
# "@lg:file-input-md"
|
|
44
|
+
md: "file-input-md",
|
|
45
|
+
# "sm:file-input-lg"
|
|
46
|
+
# "@sm:file-input-lg"
|
|
47
|
+
# "md:file-input-lg"
|
|
48
|
+
# "@md:file-input-lg"
|
|
49
|
+
# "lg:file-input-lg"
|
|
50
|
+
# "@lg:file-input-lg"
|
|
51
|
+
lg: "file-input-lg",
|
|
52
|
+
# "sm:file-input-xl"
|
|
53
|
+
# "@sm:file-input-xl"
|
|
54
|
+
# "md:file-input-xl"
|
|
55
|
+
# "@md:file-input-xl"
|
|
56
|
+
# "lg:file-input-xl"
|
|
57
|
+
# "@lg:file-input-xl"
|
|
58
|
+
xl: "file-input-xl",
|
|
59
|
+
# "sm:file-input-neutral"
|
|
60
|
+
# "@sm:file-input-neutral"
|
|
61
|
+
# "md:file-input-neutral"
|
|
62
|
+
# "@md:file-input-neutral"
|
|
63
|
+
# "lg:file-input-neutral"
|
|
64
|
+
# "@lg:file-input-neutral"
|
|
65
|
+
neutral: "file-input-neutral",
|
|
66
|
+
# "sm:file-input-primary"
|
|
67
|
+
# "@sm:file-input-primary"
|
|
68
|
+
# "md:file-input-primary"
|
|
69
|
+
# "@md:file-input-primary"
|
|
70
|
+
# "lg:file-input-primary"
|
|
71
|
+
# "@lg:file-input-primary"
|
|
72
|
+
primary: "file-input-primary",
|
|
73
|
+
# "sm:file-input-secondary"
|
|
74
|
+
# "@sm:file-input-secondary"
|
|
75
|
+
# "md:file-input-secondary"
|
|
76
|
+
# "@md:file-input-secondary"
|
|
77
|
+
# "lg:file-input-secondary"
|
|
78
|
+
# "@lg:file-input-secondary"
|
|
79
|
+
secondary: "file-input-secondary",
|
|
80
|
+
# "sm:file-input-accent"
|
|
81
|
+
# "@sm:file-input-accent"
|
|
82
|
+
# "md:file-input-accent"
|
|
83
|
+
# "@md:file-input-accent"
|
|
84
|
+
# "lg:file-input-accent"
|
|
85
|
+
# "@lg:file-input-accent"
|
|
86
|
+
accent: "file-input-accent",
|
|
87
|
+
# "sm:file-input-info"
|
|
88
|
+
# "@sm:file-input-info"
|
|
89
|
+
# "md:file-input-info"
|
|
90
|
+
# "@md:file-input-info"
|
|
91
|
+
# "lg:file-input-info"
|
|
92
|
+
# "@lg:file-input-info"
|
|
93
|
+
info: "file-input-info",
|
|
94
|
+
# "sm:file-input-success"
|
|
95
|
+
# "@sm:file-input-success"
|
|
96
|
+
# "md:file-input-success"
|
|
97
|
+
# "@md:file-input-success"
|
|
98
|
+
# "lg:file-input-success"
|
|
99
|
+
# "@lg:file-input-success"
|
|
100
|
+
success: "file-input-success",
|
|
101
|
+
# "sm:file-input-warning"
|
|
102
|
+
# "@sm:file-input-warning"
|
|
103
|
+
# "md:file-input-warning"
|
|
104
|
+
# "@md:file-input-warning"
|
|
105
|
+
# "lg:file-input-warning"
|
|
106
|
+
# "@lg:file-input-warning"
|
|
107
|
+
warning: "file-input-warning",
|
|
108
|
+
# "sm:file-input-error"
|
|
109
|
+
# "@sm:file-input-error"
|
|
110
|
+
# "md:file-input-error"
|
|
111
|
+
# "@md:file-input-error"
|
|
112
|
+
# "lg:file-input-error"
|
|
113
|
+
# "@lg:file-input-error"
|
|
114
|
+
error: "file-input-error"
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="filter"
|
|
5
|
+
class Filter < Base
|
|
6
|
+
self.component_class = :filter
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :div, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def reset(**opts, &)
|
|
17
|
+
reset_classes = component_classes("filter-reset", options: opts)
|
|
18
|
+
input(type: :radio, class: reset_classes, **opts, &)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="footer"
|
|
5
|
+
class Footer < Base
|
|
6
|
+
self.component_class = :footer
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :footer, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def title(**opts, &)
|
|
17
|
+
div(class: component_classes("footer-title", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
register_modifiers(
|
|
21
|
+
# "sm:footer-center"
|
|
22
|
+
# "@sm:footer-center"
|
|
23
|
+
# "md:footer-center"
|
|
24
|
+
# "@md:footer-center"
|
|
25
|
+
# "lg:footer-center"
|
|
26
|
+
# "@lg:footer-center"
|
|
27
|
+
center: "footer-center",
|
|
28
|
+
# "sm:footer-horizontal"
|
|
29
|
+
# "@sm:footer-horizontal"
|
|
30
|
+
# "md:footer-horizontal"
|
|
31
|
+
# "@md:footer-horizontal"
|
|
32
|
+
# "lg:footer-horizontal"
|
|
33
|
+
# "@lg:footer-horizontal"
|
|
34
|
+
horizontal: "footer-horizontal",
|
|
35
|
+
# "sm:footer-vertical"
|
|
36
|
+
# "@sm:footer-vertical"
|
|
37
|
+
# "md:footer-vertical"
|
|
38
|
+
# "@md:footer-vertical"
|
|
39
|
+
# "lg:footer-vertical"
|
|
40
|
+
# "@lg:footer-vertical"
|
|
41
|
+
vertical: "footer-vertical"
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
class FormControl < Base
|
|
5
|
+
self.component_class = "form-control"
|
|
6
|
+
|
|
7
|
+
def initialize(*, as: :div, **)
|
|
8
|
+
super
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def view_template(&)
|
|
12
|
+
public_send(as, class: classes, **attributes, &)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="hero"
|
|
5
|
+
class Hero < Base
|
|
6
|
+
self.component_class = :hero
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :div, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def content(**opts, &)
|
|
17
|
+
div(class: component_classes("hero-content", options: opts), **opts, &)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def overlay(**opts, &)
|
|
21
|
+
div(class: component_classes("hero-overlay", options: opts), **opts, &)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module DaisyUI
|
|
4
|
+
# @component html class="hover-gallery"
|
|
5
|
+
class HoverGallery < Base
|
|
6
|
+
self.component_class = "hover-gallery"
|
|
7
|
+
|
|
8
|
+
def initialize(*, as: :figure, **)
|
|
9
|
+
super
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def view_template(&)
|
|
13
|
+
public_send(as, class: classes, **attributes, &)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|