kiso 0.1.0.pre → 0.2.0.pre
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 +4 -4
- data/CHANGELOG.md +36 -2
- data/README.md +67 -27
- data/Rakefile +8 -0
- data/app/assets/tailwind/kiso/checkbox.css +18 -0
- data/app/assets/tailwind/kiso/color-mode.css +9 -0
- data/app/assets/tailwind/kiso/dashboard.css +194 -0
- data/app/assets/tailwind/kiso/engine.css +117 -0
- data/app/assets/tailwind/kiso/input-otp.css +10 -0
- data/app/assets/tailwind/kiso/radio-group.css +17 -0
- data/app/helpers/kiso/component_helper.rb +46 -27
- data/app/helpers/kiso/icon_helper.rb +53 -9
- data/app/helpers/kiso/theme_helper.rb +38 -0
- data/app/javascript/controllers/kiso/combobox_controller.js +616 -0
- data/app/javascript/controllers/kiso/command_controller.js +184 -0
- data/app/javascript/controllers/kiso/command_dialog_controller.js +104 -0
- data/app/javascript/controllers/kiso/dropdown_menu_controller.js +684 -0
- data/app/javascript/controllers/kiso/index.d.ts +12 -0
- data/app/javascript/controllers/kiso/index.js +42 -0
- data/app/javascript/controllers/kiso/input_otp_controller.js +195 -0
- data/app/javascript/controllers/kiso/popover_controller.js +254 -0
- data/app/javascript/controllers/kiso/select_controller.js +307 -0
- data/app/javascript/controllers/kiso/sidebar_controller.js +84 -0
- data/app/javascript/controllers/kiso/theme_controller.js +89 -0
- data/app/javascript/controllers/kiso/toggle_controller.js +24 -0
- data/app/javascript/controllers/kiso/toggle_group_controller.js +128 -0
- data/app/javascript/kiso/utils/focusable.js +8 -0
- data/app/javascript/kiso/utils/highlight.js +43 -0
- data/app/javascript/kiso/utils/positioning.js +86 -0
- data/app/javascript/kiso/vendor/floating-ui-core.js +1 -0
- data/app/javascript/kiso/vendor/floating-ui-dom.js +1 -0
- data/app/views/kiso/components/_alert.html.erb +1 -1
- data/app/views/kiso/components/_avatar.html.erb +23 -0
- data/app/views/kiso/components/_badge.html.erb +1 -1
- data/app/views/kiso/components/_breadcrumb.html.erb +8 -0
- data/app/views/kiso/components/_button.html.erb +1 -1
- data/app/views/kiso/components/_card.html.erb +1 -1
- data/app/views/kiso/components/_checkbox.html.erb +7 -0
- data/app/views/kiso/components/_color_mode_button.html.erb +14 -0
- data/app/views/kiso/components/_color_mode_select.html.erb +24 -0
- data/app/views/kiso/components/_combobox.html.erb +12 -0
- data/app/views/kiso/components/_command.html.erb +7 -0
- data/app/views/kiso/components/_dashboard_group.html.erb +14 -0
- data/app/views/kiso/components/_dashboard_navbar.html.erb +7 -0
- data/app/views/kiso/components/_dashboard_panel.html.erb +7 -0
- data/app/views/kiso/components/_dashboard_sidebar.html.erb +11 -0
- data/app/views/kiso/components/_dashboard_toolbar.html.erb +7 -0
- data/app/views/kiso/components/_dropdown_menu.html.erb +7 -0
- data/app/views/kiso/components/{_empty_state.html.erb → _empty.html.erb} +2 -2
- data/app/views/kiso/components/_field.html.erb +12 -0
- data/app/views/kiso/components/_field_group.html.erb +7 -0
- data/app/views/kiso/components/_field_set.html.erb +7 -0
- data/app/views/kiso/components/_input.html.erb +8 -0
- data/app/views/kiso/components/_input_group.html.erb +8 -0
- data/app/views/kiso/components/_input_otp.html.erb +22 -0
- data/app/views/kiso/components/_kbd.html.erb +7 -0
- data/app/views/kiso/components/_label.html.erb +5 -0
- data/app/views/kiso/components/_nav.html.erb +7 -0
- data/app/views/kiso/components/_pagination.html.erb +9 -0
- data/app/views/kiso/components/_popover.html.erb +8 -0
- data/app/views/kiso/components/_radio_group.html.erb +8 -0
- data/app/views/kiso/components/_select.html.erb +8 -0
- data/app/views/kiso/components/_select_native.html.erb +16 -0
- data/app/views/kiso/components/_separator.html.erb +1 -1
- data/app/views/kiso/components/_stats_card.html.erb +1 -1
- data/app/views/kiso/components/_stats_grid.html.erb +1 -1
- data/app/views/kiso/components/_switch.html.erb +10 -0
- data/app/views/kiso/components/_table.html.erb +2 -1
- data/app/views/kiso/components/_textarea.html.erb +9 -0
- data/app/views/kiso/components/_toggle.html.erb +12 -0
- data/app/views/kiso/components/_toggle_group.html.erb +12 -0
- data/app/views/kiso/components/alert/_description.html.erb +1 -1
- data/app/views/kiso/components/alert/_title.html.erb +1 -1
- data/app/views/kiso/components/avatar/_badge.html.erb +7 -0
- data/app/views/kiso/components/avatar/_fallback.html.erb +7 -0
- data/app/views/kiso/components/avatar/_group.html.erb +7 -0
- data/app/views/kiso/components/avatar/_group_count.html.erb +7 -0
- data/app/views/kiso/components/avatar/_image.html.erb +6 -0
- data/app/views/kiso/components/breadcrumb/_ellipsis.html.erb +10 -0
- data/app/views/kiso/components/breadcrumb/_item.html.erb +7 -0
- data/app/views/kiso/components/breadcrumb/_link.html.erb +7 -0
- data/app/views/kiso/components/breadcrumb/_list.html.erb +7 -0
- data/app/views/kiso/components/breadcrumb/_page.html.erb +9 -0
- data/app/views/kiso/components/breadcrumb/_separator.html.erb +9 -0
- data/app/views/kiso/components/card/_action.html.erb +7 -0
- data/app/views/kiso/components/card/_content.html.erb +1 -1
- data/app/views/kiso/components/card/_description.html.erb +1 -1
- data/app/views/kiso/components/card/_footer.html.erb +1 -1
- data/app/views/kiso/components/card/_header.html.erb +1 -1
- data/app/views/kiso/components/card/_title.html.erb +1 -1
- data/app/views/kiso/components/combobox/_chip.html.erb +19 -0
- data/app/views/kiso/components/combobox/_chips.html.erb +20 -0
- data/app/views/kiso/components/combobox/_chips_input.html.erb +10 -0
- data/app/views/kiso/components/combobox/_content.html.erb +9 -0
- data/app/views/kiso/components/combobox/_empty.html.erb +9 -0
- data/app/views/kiso/components/combobox/_group.html.erb +8 -0
- data/app/views/kiso/components/combobox/_input.html.erb +23 -0
- data/app/views/kiso/components/combobox/_item.html.erb +19 -0
- data/app/views/kiso/components/combobox/_label.html.erb +7 -0
- data/app/views/kiso/components/combobox/_list.html.erb +10 -0
- data/app/views/kiso/components/combobox/_separator.html.erb +6 -0
- data/app/views/kiso/components/command/_dialog.html.erb +11 -0
- data/app/views/kiso/components/command/_empty.html.erb +9 -0
- data/app/views/kiso/components/command/_group.html.erb +14 -0
- data/app/views/kiso/components/command/_input.html.erb +16 -0
- data/app/views/kiso/components/command/_item.html.erb +13 -0
- data/app/views/kiso/components/command/_list.html.erb +10 -0
- data/app/views/kiso/components/command/_separator.html.erb +7 -0
- data/app/views/kiso/components/command/_shortcut.html.erb +7 -0
- data/app/views/kiso/components/dashboard_navbar/_toggle.html.erb +11 -0
- data/app/views/kiso/components/dashboard_sidebar/_collapse.html.erb +12 -0
- data/app/views/kiso/components/dashboard_sidebar/_footer.html.erb +7 -0
- data/app/views/kiso/components/dashboard_sidebar/_header.html.erb +7 -0
- data/app/views/kiso/components/dashboard_sidebar/_toggle.html.erb +11 -0
- data/app/views/kiso/components/dashboard_toolbar/_left.html.erb +7 -0
- data/app/views/kiso/components/dashboard_toolbar/_right.html.erb +7 -0
- data/app/views/kiso/components/dropdown_menu/_checkbox_item.html.erb +18 -0
- data/app/views/kiso/components/dropdown_menu/_content.html.erb +10 -0
- data/app/views/kiso/components/dropdown_menu/_group.html.erb +8 -0
- data/app/views/kiso/components/dropdown_menu/_item.html.erb +15 -0
- data/app/views/kiso/components/dropdown_menu/_label.html.erb +8 -0
- data/app/views/kiso/components/dropdown_menu/_radio_group.html.erb +10 -0
- data/app/views/kiso/components/dropdown_menu/_radio_item.html.erb +19 -0
- data/app/views/kiso/components/dropdown_menu/_separator.html.erb +6 -0
- data/app/views/kiso/components/dropdown_menu/_shortcut.html.erb +7 -0
- data/app/views/kiso/components/dropdown_menu/_sub.html.erb +8 -0
- data/app/views/kiso/components/dropdown_menu/_sub_content.html.erb +10 -0
- data/app/views/kiso/components/dropdown_menu/_sub_trigger.html.erb +12 -0
- data/app/views/kiso/components/dropdown_menu/_trigger.html.erb +9 -0
- data/app/views/kiso/components/empty/_content.html.erb +7 -0
- data/app/views/kiso/components/empty/_description.html.erb +7 -0
- data/app/views/kiso/components/empty/_header.html.erb +7 -0
- data/app/views/kiso/components/empty/_media.html.erb +7 -0
- data/app/views/kiso/components/empty/_title.html.erb +7 -0
- data/app/views/kiso/components/field/_content.html.erb +7 -0
- data/app/views/kiso/components/field/_description.html.erb +7 -0
- data/app/views/kiso/components/field/_error.html.erb +22 -0
- data/app/views/kiso/components/field/_label.html.erb +5 -0
- data/app/views/kiso/components/field/_separator.html.erb +15 -0
- data/app/views/kiso/components/field/_title.html.erb +7 -0
- data/app/views/kiso/components/field_set/_legend.html.erb +9 -0
- data/app/views/kiso/components/input_group/_addon.html.erb +7 -0
- data/app/views/kiso/components/input_otp/_group.html.erb +7 -0
- data/app/views/kiso/components/input_otp/_separator.html.erb +8 -0
- data/app/views/kiso/components/input_otp/_slot.html.erb +11 -0
- data/app/views/kiso/components/kbd/_group.html.erb +7 -0
- data/app/views/kiso/components/nav/_item.html.erb +15 -0
- data/app/views/kiso/components/nav/_section.html.erb +37 -0
- data/app/views/kiso/components/nav/_section_title.html.erb +7 -0
- data/app/views/kiso/components/pagination/_content.html.erb +7 -0
- data/app/views/kiso/components/pagination/_ellipsis.html.erb +9 -0
- data/app/views/kiso/components/pagination/_item.html.erb +7 -0
- data/app/views/kiso/components/pagination/_link.html.erb +9 -0
- data/app/views/kiso/components/pagination/_next.html.erb +12 -0
- data/app/views/kiso/components/pagination/_previous.html.erb +12 -0
- data/app/views/kiso/components/popover/_anchor.html.erb +8 -0
- data/app/views/kiso/components/popover/_content.html.erb +11 -0
- data/app/views/kiso/components/popover/_description.html.erb +7 -0
- data/app/views/kiso/components/popover/_header.html.erb +7 -0
- data/app/views/kiso/components/popover/_title.html.erb +7 -0
- data/app/views/kiso/components/popover/_trigger.html.erb +9 -0
- data/app/views/kiso/components/radio_group/_item.html.erb +6 -0
- data/app/views/kiso/components/select/_content.html.erb +10 -0
- data/app/views/kiso/components/select/_group.html.erb +8 -0
- data/app/views/kiso/components/select/_item.html.erb +19 -0
- data/app/views/kiso/components/select/_label.html.erb +7 -0
- data/app/views/kiso/components/select/_separator.html.erb +6 -0
- data/app/views/kiso/components/select/_trigger.html.erb +13 -0
- data/app/views/kiso/components/select/_value.html.erb +11 -0
- data/app/views/kiso/components/stats_card/_description.html.erb +1 -1
- data/app/views/kiso/components/stats_card/_header.html.erb +1 -1
- data/app/views/kiso/components/stats_card/_label.html.erb +1 -1
- data/app/views/kiso/components/stats_card/_value.html.erb +1 -1
- data/app/views/kiso/components/table/_body.html.erb +1 -1
- data/app/views/kiso/components/table/_caption.html.erb +1 -1
- data/app/views/kiso/components/table/_cell.html.erb +1 -1
- data/app/views/kiso/components/table/_footer.html.erb +1 -1
- data/app/views/kiso/components/table/_head.html.erb +1 -1
- data/app/views/kiso/components/table/_header.html.erb +1 -1
- data/app/views/kiso/components/table/_row.html.erb +1 -1
- data/app/views/kiso/components/toggle_group/_item.html.erb +13 -0
- data/config/deploy.docs.yml +31 -0
- data/config/deploy.yml +34 -0
- data/config/importmap.rb +10 -0
- data/lib/kiso/cli/base.rb +15 -0
- data/lib/kiso/cli/icons.rb +2 -1
- data/lib/kiso/cli/main.rb +6 -0
- data/lib/kiso/cli/make.rb +22 -12
- data/lib/kiso/configuration.rb +54 -0
- data/lib/kiso/engine.rb +36 -1
- data/lib/kiso/theme_overrides.rb +130 -0
- data/lib/kiso/themes/alert.rb +16 -1
- data/lib/kiso/themes/avatar.rb +53 -0
- data/lib/kiso/themes/badge.rb +15 -5
- data/lib/kiso/themes/breadcrumb.rb +44 -0
- data/lib/kiso/themes/button.rb +15 -2
- data/lib/kiso/themes/card.rb +18 -2
- data/lib/kiso/themes/checkbox.rb +33 -0
- data/lib/kiso/themes/color_mode_button.rb +15 -0
- data/lib/kiso/themes/color_mode_select.rb +7 -0
- data/lib/kiso/themes/combobox.rb +97 -0
- data/lib/kiso/themes/command.rb +79 -0
- data/lib/kiso/themes/dashboard.rb +51 -0
- data/lib/kiso/themes/dropdown_menu.rb +108 -0
- data/lib/kiso/themes/empty.rb +54 -0
- data/lib/kiso/themes/field.rb +76 -0
- data/lib/kiso/themes/field_group.rb +15 -0
- data/lib/kiso/themes/field_set.rb +32 -0
- data/lib/kiso/themes/input.rb +33 -0
- data/lib/kiso/themes/input_group.rb +39 -0
- data/lib/kiso/themes/input_otp.rb +46 -0
- data/lib/kiso/themes/kbd.rb +31 -0
- data/lib/kiso/themes/label.rb +16 -0
- data/lib/kiso/themes/nav.rb +27 -0
- data/lib/kiso/themes/pagination.rb +73 -0
- data/lib/kiso/themes/popover.rb +32 -0
- data/lib/kiso/themes/radio_group.rb +43 -0
- data/lib/kiso/themes/select.rb +78 -0
- data/lib/kiso/themes/select_native.rb +49 -0
- data/lib/kiso/themes/separator.rb +8 -2
- data/lib/kiso/themes/shared.rb +51 -0
- data/lib/kiso/themes/stats_card.rb +26 -14
- data/lib/kiso/themes/switch.rb +56 -0
- data/lib/kiso/themes/table.rb +18 -15
- data/lib/kiso/themes/textarea.rb +33 -0
- data/lib/kiso/themes/toggle.rb +71 -0
- data/lib/kiso/themes/toggle_group.rb +13 -0
- data/lib/kiso/version.rb +4 -1
- data/lib/kiso.rb +70 -2
- metadata +183 -22
- data/app/views/kiso/components/empty_state/_content.html.erb +0 -7
- data/app/views/kiso/components/empty_state/_description.html.erb +0 -7
- data/app/views/kiso/components/empty_state/_header.html.erb +0 -7
- data/app/views/kiso/components/empty_state/_media.html.erb +0 -7
- data/app/views/kiso/components/empty_state/_title.html.erb +0 -7
- data/lib/kiso/themes/empty_state.rb +0 -42
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::AlertDescription.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "alert-description"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::AlertTitle.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "alert-title"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::AvatarBadge.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "avatar-badge"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= capture { yield }.presence %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (size: :md, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::AvatarFallback.render(size: size, class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "avatar-fallback"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::AvatarGroupCount.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "avatar-group-count"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<%# locals: (src:, alt: "", css_classes: "", **component_options) %>
|
|
2
|
+
<%= tag.img src: src, alt: alt,
|
|
3
|
+
class: Kiso::Themes::AvatarImage.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "avatar-image"),
|
|
5
|
+
onerror: "this.style.display='none'",
|
|
6
|
+
**component_options %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbEllipsis.render(class: css_classes),
|
|
4
|
+
role: "presentation",
|
|
5
|
+
aria: { hidden: "true" },
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-ellipsis"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= kiso_component_icon(:ellipsis, class: "size-4") %>
|
|
9
|
+
<span class="sr-only">More</span>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :li,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbItem.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-item"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :a,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbLink.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-link"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :ol,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbList.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-list"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbPage.render(class: css_classes),
|
|
4
|
+
role: "link",
|
|
5
|
+
aria: { disabled: "true", current: "page" },
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-page"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :li,
|
|
3
|
+
class: Kiso::Themes::BreadcrumbSeparator.render(class: css_classes),
|
|
4
|
+
role: "presentation",
|
|
5
|
+
aria: { hidden: "true" },
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "breadcrumb-separator"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= capture { yield }.presence || kiso_component_icon(:chevron_right, class: "size-3.5") %>
|
|
9
|
+
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::CardContent.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "card-content"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::CardDescription.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "card-description"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::CardFooter.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "card-footer"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::CardHeader.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "card-header"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::CardTitle.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "card-title"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<%# locals: (value:, removable: true, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::ComboboxChip.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-chip",
|
|
5
|
+
kiso__combobox_target: "chip",
|
|
6
|
+
value: value),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<span data-slot="combobox-chip-text"><%= yield %></span>
|
|
9
|
+
<% if removable %>
|
|
10
|
+
<button type="button"
|
|
11
|
+
class="flex size-4 items-center justify-center rounded-sm opacity-50 hover:opacity-100"
|
|
12
|
+
data-slot="combobox-chip-remove"
|
|
13
|
+
data-action="click->kiso--combobox#removeChip"
|
|
14
|
+
data-value="<%= value %>"
|
|
15
|
+
tabindex="-1">
|
|
16
|
+
<%= kiso_component_icon(:x, class: "size-3 pointer-events-none") %>
|
|
17
|
+
</button>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxChips.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-chips",
|
|
5
|
+
kiso__combobox_target: "chips"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<%= tag.template data: { kiso__combobox_target: "chipTemplate" } do %>
|
|
9
|
+
<%= tag.span class: Kiso::Themes::ComboboxChip.render,
|
|
10
|
+
data: { slot: "combobox-chip", kiso__combobox_target: "chip" } do %>
|
|
11
|
+
<%= tag.span data: { slot: "combobox-chip-text" } %>
|
|
12
|
+
<%= tag.button type: "button",
|
|
13
|
+
class: "flex size-4 items-center justify-center rounded-sm opacity-50 hover:opacity-100",
|
|
14
|
+
tabindex: "-1",
|
|
15
|
+
data: { slot: "combobox-chip-remove", action: "click->kiso--combobox#removeChip" } do %>
|
|
16
|
+
<%= kiso_component_icon(:x, class: "size-3 pointer-events-none") %>
|
|
17
|
+
<% end %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
20
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (placeholder: nil, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= tag.input type: "text",
|
|
3
|
+
class: Kiso::Themes::ComboboxChipsInput.render(class: css_classes),
|
|
4
|
+
placeholder: placeholder,
|
|
5
|
+
autocomplete: "off",
|
|
6
|
+
disabled: (disabled || nil),
|
|
7
|
+
data: kiso_prepare_options(component_options, slot: "combobox-chip-input",
|
|
8
|
+
kiso__combobox_target: "input",
|
|
9
|
+
action: "input->kiso--combobox#filter focus->kiso--combobox#onInputFocus keydown->kiso--combobox#inputKeydown"),
|
|
10
|
+
**component_options %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxContent.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-content",
|
|
5
|
+
kiso__combobox_target: "content"),
|
|
6
|
+
hidden: true,
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxEmpty.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-empty",
|
|
5
|
+
kiso__combobox_target: "empty"),
|
|
6
|
+
hidden: true,
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxGroup.render(class: css_classes),
|
|
4
|
+
role: "group",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "combobox-group"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<%# locals: (placeholder: nil, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxInput.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-input"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= tag.input type: "text",
|
|
7
|
+
placeholder: placeholder,
|
|
8
|
+
autocomplete: "off",
|
|
9
|
+
disabled: (disabled || nil),
|
|
10
|
+
data: { kiso__combobox_target: "input",
|
|
11
|
+
action: "input->kiso--combobox#filter focus->kiso--combobox#onInputFocus keydown->kiso--combobox#inputKeydown" } %>
|
|
12
|
+
<div class="flex items-center pe-2">
|
|
13
|
+
<%= tag.button type: "button",
|
|
14
|
+
class: "flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground",
|
|
15
|
+
disabled: (disabled || nil),
|
|
16
|
+
tabindex: "-1",
|
|
17
|
+
aria: { label: "Toggle" },
|
|
18
|
+
data: { slot: "combobox-trigger", kiso__combobox_target: "trigger",
|
|
19
|
+
action: "click->kiso--combobox#toggle" } do %>
|
|
20
|
+
<%= kiso_component_icon(:chevron_down, class: "size-4 pointer-events-none") %>
|
|
21
|
+
<% end %>
|
|
22
|
+
</div>
|
|
23
|
+
<% end %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<%# locals: (value:, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxItem.render(class: css_classes),
|
|
4
|
+
role: "option",
|
|
5
|
+
tabindex: "-1",
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "combobox-item",
|
|
7
|
+
kiso__combobox_target: "item",
|
|
8
|
+
action: "click->kiso--combobox#selectItem",
|
|
9
|
+
value: value,
|
|
10
|
+
disabled: (disabled ? "true" : nil)),
|
|
11
|
+
aria: {selected: false, disabled: (disabled || nil)},
|
|
12
|
+
**component_options do %>
|
|
13
|
+
<%= tag.span yield, data: { slot: "combobox-item-text" } %>
|
|
14
|
+
<%= tag.span class: Kiso::Themes::ComboboxItemIndicator.render,
|
|
15
|
+
data: { slot: "combobox-item-indicator", kiso__combobox_target: "indicator" },
|
|
16
|
+
hidden: true do %>
|
|
17
|
+
<%= kiso_component_icon(:check, class: "size-4") %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxLabel.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "combobox-label"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (label: "Options", css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::ComboboxList.render(class: css_classes),
|
|
4
|
+
role: "listbox",
|
|
5
|
+
aria: { label: label },
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "combobox-list",
|
|
7
|
+
kiso__combobox_target: "list"),
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= yield %>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (shortcut: "k", css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :dialog,
|
|
3
|
+
class: Kiso::Themes::CommandDialog.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "command-dialog",
|
|
5
|
+
controller: "kiso--command-dialog",
|
|
6
|
+
kiso__command_dialog_shortcut_value: shortcut),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<div class="<%= Kiso::Themes::CommandDialogContent.render %>">
|
|
9
|
+
<%= yield %>
|
|
10
|
+
</div>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::CommandEmpty.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "command-empty",
|
|
5
|
+
kiso__command_target: "empty"),
|
|
6
|
+
hidden: true,
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<%# locals: (heading: nil, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::CommandGroup.render(class: css_classes),
|
|
4
|
+
role: "group",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "command-group",
|
|
6
|
+
kiso__command_target: "group"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<% if heading.present? %>
|
|
9
|
+
<div class="<%= Kiso::Themes::CommandGroupHeading.render %>"
|
|
10
|
+
data-slot="command-group-heading"
|
|
11
|
+
role="presentation"><%= heading %></div>
|
|
12
|
+
<% end %>
|
|
13
|
+
<%= yield %>
|
|
14
|
+
<% end %>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<%# locals: (placeholder: nil, label: "Search", css_classes: "", **component_options) %>
|
|
2
|
+
<div class="<%= Kiso::Themes::CommandInputWrapper.render %>"
|
|
3
|
+
data-slot="command-input-wrapper">
|
|
4
|
+
<%= kiso_component_icon(:search, class: "size-4 shrink-0 opacity-50") %>
|
|
5
|
+
<%= tag.input(
|
|
6
|
+
type: "text",
|
|
7
|
+
class: Kiso::Themes::CommandInput.render(class: css_classes),
|
|
8
|
+
placeholder: placeholder,
|
|
9
|
+
autocomplete: "off",
|
|
10
|
+
aria: { label: label },
|
|
11
|
+
data: kiso_prepare_options(component_options, slot: "command-input",
|
|
12
|
+
kiso__command_target: "input",
|
|
13
|
+
action: "input->kiso--command#filter keydown->kiso--command#inputKeydown"),
|
|
14
|
+
**component_options
|
|
15
|
+
) %>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%# locals: (value: nil, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::CommandItem.render(class: css_classes),
|
|
4
|
+
role: "option",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "command-item",
|
|
6
|
+
kiso__command_target: "item",
|
|
7
|
+
action: "click->kiso--command#selectItem",
|
|
8
|
+
value: value,
|
|
9
|
+
disabled: (disabled ? "true" : nil)),
|
|
10
|
+
aria: {selected: false, disabled: (disabled || nil)},
|
|
11
|
+
**component_options do %>
|
|
12
|
+
<%= yield %>
|
|
13
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (label: "Suggestions", css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::CommandList.render(class: css_classes),
|
|
4
|
+
role: "listbox",
|
|
5
|
+
aria: { label: label },
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "command-list",
|
|
7
|
+
kiso__command_target: "list"),
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= yield %>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::CommandSeparator.render(class: css_classes),
|
|
4
|
+
role: "none",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "command-separator"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::CommandShortcut.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "command-shortcut"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :button,
|
|
3
|
+
class: Kiso::Themes::DashboardNavbarToggle.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-navbar-toggle",
|
|
5
|
+
kiso__sidebar_target: "trigger",
|
|
6
|
+
action: "click->kiso--sidebar#toggle"),
|
|
7
|
+
aria: { label: "Toggle sidebar", expanded: "false", controls: "dashboard-sidebar" },
|
|
8
|
+
type: "button",
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= capture { yield }.presence || kiso_component_icon(:menu) %>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :button,
|
|
3
|
+
class: Kiso::Themes::DashboardSidebarCollapse.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-sidebar-collapse",
|
|
5
|
+
kiso__sidebar_target: "trigger",
|
|
6
|
+
action: "click->kiso--sidebar#toggle"),
|
|
7
|
+
aria: { label: "Collapse sidebar", expanded: "false", controls: "dashboard-sidebar" },
|
|
8
|
+
type: "button",
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<span data-slot="collapse-icon-open"><%= kiso_component_icon(:panel_left_close) %></span>
|
|
11
|
+
<span data-slot="collapse-icon-closed"><%= kiso_component_icon(:panel_left_open) %></span>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DashboardSidebarFooter.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-sidebar-footer"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DashboardSidebarHeader.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-sidebar-header"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :button,
|
|
3
|
+
class: Kiso::Themes::DashboardSidebarToggle.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-sidebar-toggle",
|
|
5
|
+
kiso__sidebar_target: "trigger",
|
|
6
|
+
action: "click->kiso--sidebar#toggle"),
|
|
7
|
+
aria: { label: "Toggle sidebar", expanded: "false", controls: "dashboard-sidebar" },
|
|
8
|
+
type: "button",
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= capture { yield }.presence || kiso_component_icon(:menu) %>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DashboardToolbarLeft.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-toolbar-left"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DashboardToolbarRight.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dashboard-toolbar-right"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<%# locals: (checked: false, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuCheckboxItem.render(class: css_classes),
|
|
4
|
+
role: "menuitemcheckbox",
|
|
5
|
+
tabindex: "-1",
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-checkbox-item",
|
|
7
|
+
kiso__dropdown_menu_target: "checkboxItem",
|
|
8
|
+
action: "click->kiso--dropdown-menu#toggleCheckboxItem",
|
|
9
|
+
disabled: (disabled ? "true" : nil)),
|
|
10
|
+
aria: {checked: checked, disabled: (disabled || nil)},
|
|
11
|
+
**component_options do %>
|
|
12
|
+
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
13
|
+
data-slot="dropdown-menu-item-indicator"
|
|
14
|
+
<% unless checked %>hidden<% end %>>
|
|
15
|
+
<%= kiso_component_icon(:check, class: "size-4") %>
|
|
16
|
+
</span>
|
|
17
|
+
<%= yield %>
|
|
18
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuContent.render(class: css_classes),
|
|
4
|
+
role: "menu",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-content",
|
|
6
|
+
kiso__dropdown_menu_target: "content"),
|
|
7
|
+
hidden: true,
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= yield %>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuGroup.render(class: css_classes),
|
|
4
|
+
role: "group",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-group"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<%# locals: (variant: :default, inset: false, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuItem.render(variant: variant, class: css_classes),
|
|
4
|
+
role: "menuitem",
|
|
5
|
+
tabindex: "-1",
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-item",
|
|
7
|
+
kiso__dropdown_menu_target: "item",
|
|
8
|
+
action: "click->kiso--dropdown-menu#selectItem",
|
|
9
|
+
inset: (inset ? "" : nil),
|
|
10
|
+
variant: (variant == :destructive ? "destructive" : nil),
|
|
11
|
+
disabled: (disabled ? "true" : nil)),
|
|
12
|
+
aria: {disabled: (disabled || nil)},
|
|
13
|
+
**component_options do %>
|
|
14
|
+
<%= yield %>
|
|
15
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (inset: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuLabel.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-label",
|
|
5
|
+
inset: (inset ? "" : nil)),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (value: nil, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuRadioGroup.render(class: css_classes),
|
|
4
|
+
role: "group",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-radio-group",
|
|
6
|
+
kiso__dropdown_menu_target: "radioGroup",
|
|
7
|
+
value: value),
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= yield %>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<%# locals: (value:, checked: false, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuRadioItem.render(class: css_classes),
|
|
4
|
+
role: "menuitemradio",
|
|
5
|
+
tabindex: "-1",
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-radio-item",
|
|
7
|
+
kiso__dropdown_menu_target: "radioItem",
|
|
8
|
+
action: "click->kiso--dropdown-menu#selectRadioItem",
|
|
9
|
+
value: value,
|
|
10
|
+
disabled: (disabled ? "true" : nil)),
|
|
11
|
+
aria: {checked: checked, disabled: (disabled || nil)},
|
|
12
|
+
**component_options do %>
|
|
13
|
+
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
14
|
+
data-slot="dropdown-menu-item-indicator"
|
|
15
|
+
<% unless checked %>hidden<% end %>>
|
|
16
|
+
<%= kiso_component_icon(:circle, class: "size-2 fill-current") %>
|
|
17
|
+
</span>
|
|
18
|
+
<%= yield %>
|
|
19
|
+
<% end %>
|