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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= tag.div(
|
|
3
|
+
class: Kiso::Themes::DropdownMenuSeparator.render(class: css_classes),
|
|
4
|
+
role: "separator",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-separator"),
|
|
6
|
+
**component_options) %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuShortcut.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-shortcut"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuSub.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-sub",
|
|
5
|
+
kiso__dropdown_menu_target: "sub"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuSubContent.render(class: css_classes),
|
|
4
|
+
role: "menu",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-sub-content",
|
|
6
|
+
kiso__dropdown_menu_target: "subContent"),
|
|
7
|
+
hidden: true,
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= yield %>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%# locals: (inset: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuSubTrigger.render(class: css_classes),
|
|
4
|
+
tabindex: "-1",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-sub-trigger",
|
|
6
|
+
kiso__dropdown_menu_target: "subTrigger",
|
|
7
|
+
action: "click->kiso--dropdown-menu#toggleSub mouseenter->kiso--dropdown-menu#openSubOnHover",
|
|
8
|
+
inset: (inset ? "" : nil)),
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= yield %>
|
|
11
|
+
<%= kiso_component_icon(:chevron_right, class: "ml-auto size-4") %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::DropdownMenuTrigger.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "dropdown-menu-trigger",
|
|
5
|
+
kiso__dropdown_menu_target: "trigger",
|
|
6
|
+
action: "click->kiso--dropdown-menu#toggle keydown->kiso--dropdown-menu#triggerKeydown"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::EmptyContent.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "empty-content"),
|
|
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::EmptyDescription.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "empty-description"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (variant: :default, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::EmptyMedia.render(variant: variant, class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "empty-media"),
|
|
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::FieldContent.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "field-content"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :p,
|
|
3
|
+
class: Kiso::Themes::FieldDescription.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "field-description"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<%# locals: (errors: [], css_classes: "", **component_options) %>
|
|
2
|
+
<% messages = Array(errors).compact.map(&:to_s).reject(&:blank?).uniq %>
|
|
3
|
+
<% content = capture { yield }.presence %>
|
|
4
|
+
<% if content || messages.any? %>
|
|
5
|
+
<%= content_tag :div,
|
|
6
|
+
role: :alert,
|
|
7
|
+
class: Kiso::Themes::FieldError.render(class: css_classes),
|
|
8
|
+
data: kiso_prepare_options(component_options, slot: "field-error"),
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<% if content %>
|
|
11
|
+
<%= content %>
|
|
12
|
+
<% elsif messages.one? %>
|
|
13
|
+
<%= messages.first %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<ul class="ml-4 flex list-disc flex-col gap-1">
|
|
16
|
+
<% messages.each do |msg| %>
|
|
17
|
+
<li><%= msg %></li>
|
|
18
|
+
<% end %>
|
|
19
|
+
</ul>
|
|
20
|
+
<% end %>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<% captured = capture { yield }.presence %>
|
|
3
|
+
<%= content_tag :div,
|
|
4
|
+
class: Kiso::Themes::FieldSeparator.render(class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "field-separator").merge(
|
|
6
|
+
content: captured&.present? || nil
|
|
7
|
+
).compact,
|
|
8
|
+
**component_options do %>
|
|
9
|
+
<%= kui(:separator, css_classes: "absolute inset-0 top-1/2") %>
|
|
10
|
+
<% if captured&.present? %>
|
|
11
|
+
<span class="<%= Kiso::Themes::FieldSeparatorText.render %>">
|
|
12
|
+
<%= captured %>
|
|
13
|
+
</span>
|
|
14
|
+
<% end %>
|
|
15
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (variant: :legend, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :legend,
|
|
3
|
+
class: Kiso::Themes::FieldLegend.render(variant: variant, class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "field-set-legend").merge(
|
|
5
|
+
variant: variant
|
|
6
|
+
),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (align: :start, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::InputGroupAddon.render(align: align, class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "input-group-addon"),
|
|
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::InputOtpGroup.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "input-otp-group"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
role: "separator",
|
|
4
|
+
class: Kiso::Themes::InputOtpSeparator.render(class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "input-otp-separator"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= capture { yield }.presence || kiso_component_icon(:minus) %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (size: :md, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::InputOtpSlot.render(size: size, class: css_classes),
|
|
4
|
+
aria: { hidden: "true" },
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "input-otp-slot",
|
|
6
|
+
kiso__input_otp_target: "slot") do %>
|
|
7
|
+
<span data-slot="input-otp-slot-char"></span>
|
|
8
|
+
<div data-slot="input-otp-caret" class="pointer-events-none absolute inset-0 flex items-center justify-center" hidden>
|
|
9
|
+
<div class="bg-foreground h-4 w-px animate-caret-blink"></div>
|
|
10
|
+
</div>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<%# locals: (href: "#", icon: nil, badge: nil, active: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :a,
|
|
3
|
+
href: href,
|
|
4
|
+
class: Kiso::Themes::NavItem.render(class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "nav-item", active: active || nil),
|
|
6
|
+
aria: active ? { current: "page" } : {},
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<% if icon %>
|
|
9
|
+
<%= kiso_icon(icon, class: "size-4 shrink-0") %>
|
|
10
|
+
<% end %>
|
|
11
|
+
<span data-slot="nav-item-label" class="truncate"><%= yield %></span>
|
|
12
|
+
<% if badge %>
|
|
13
|
+
<span data-slot="nav-item-badge" class="<%= Kiso::Themes::NavItemBadge.render %>"><%= badge %></span>
|
|
14
|
+
<% end %>
|
|
15
|
+
<% end %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<%# locals: (title: nil, open: true, collapsible: true, css_classes: "", **component_options) %>
|
|
2
|
+
<% if title && collapsible %>
|
|
3
|
+
<%= content_tag :details,
|
|
4
|
+
class: Kiso::Themes::NavSection.render(class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "nav-section"),
|
|
6
|
+
open: open,
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<summary class="<%= Kiso::Themes::NavSectionTitle.render %>" data-slot="nav-section-title">
|
|
9
|
+
<span class="truncate"><%= title %></span>
|
|
10
|
+
<span class="ml-auto" data-slot="nav-section-chevron">
|
|
11
|
+
<%= kiso_component_icon(:chevron_down, class: "size-4") %>
|
|
12
|
+
</span>
|
|
13
|
+
</summary>
|
|
14
|
+
<div data-slot="nav-section-content" class="<%= Kiso::Themes::NavSectionContent.render %>">
|
|
15
|
+
<%= yield %>
|
|
16
|
+
</div>
|
|
17
|
+
<% end %>
|
|
18
|
+
<% elsif title %>
|
|
19
|
+
<%= content_tag :div,
|
|
20
|
+
class: Kiso::Themes::NavSection.render(class: css_classes),
|
|
21
|
+
data: kiso_prepare_options(component_options, slot: "nav-section"),
|
|
22
|
+
**component_options do %>
|
|
23
|
+
<div class="<%= Kiso::Themes::NavSectionTitle.render %>" data-slot="nav-section-title">
|
|
24
|
+
<span class="truncate"><%= title %></span>
|
|
25
|
+
</div>
|
|
26
|
+
<div data-slot="nav-section-content" class="<%= Kiso::Themes::NavSectionContent.render %>">
|
|
27
|
+
<%= yield %>
|
|
28
|
+
</div>
|
|
29
|
+
<% end %>
|
|
30
|
+
<% else %>
|
|
31
|
+
<%= content_tag :div,
|
|
32
|
+
class: Kiso::Themes::NavSection.render(class: css_classes),
|
|
33
|
+
data: kiso_prepare_options(component_options, slot: "nav-section"),
|
|
34
|
+
**component_options do %>
|
|
35
|
+
<%= yield %>
|
|
36
|
+
<% end %>
|
|
37
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::NavSectionTitle.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "nav-section-title"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :ul,
|
|
3
|
+
class: Kiso::Themes::PaginationContent.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "pagination-content"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
aria: {hidden: true},
|
|
4
|
+
class: Kiso::Themes::PaginationEllipsis.render(class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "pagination-ellipsis"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= kiso_component_icon(:ellipsis, size: :sm) %>
|
|
8
|
+
<%= content_tag :span, "More pages", class: "sr-only" %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :li,
|
|
3
|
+
class: Kiso::Themes::PaginationItem.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "pagination-item"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (active: false, href: "#", css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :a,
|
|
3
|
+
href: href,
|
|
4
|
+
**(active ? {aria: {current: "page"}} : {}),
|
|
5
|
+
class: Kiso::Themes::PaginationLink.render(active: active, class: css_classes),
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "pagination-link", active: active),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%# locals: (href: "#", active: false, css_classes: "", **component_options) %>
|
|
2
|
+
<% aria_attrs = {label: "Go to next page"}
|
|
3
|
+
aria_attrs[:current] = "page" if active %>
|
|
4
|
+
<%= content_tag :a,
|
|
5
|
+
href: href,
|
|
6
|
+
aria: aria_attrs,
|
|
7
|
+
class: Kiso::Themes::PaginationNext.render(active: active, class: css_classes),
|
|
8
|
+
data: kiso_prepare_options(component_options, slot: "pagination-next"),
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= content_tag :span, "Next", class: "hidden sm:block" %>
|
|
11
|
+
<%= kiso_component_icon(:chevron_right) %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%# locals: (href: "#", active: false, css_classes: "", **component_options) %>
|
|
2
|
+
<% aria_attrs = {label: "Go to previous page"}
|
|
3
|
+
aria_attrs[:current] = "page" if active %>
|
|
4
|
+
<%= content_tag :a,
|
|
5
|
+
href: href,
|
|
6
|
+
aria: aria_attrs,
|
|
7
|
+
class: Kiso::Themes::PaginationPrevious.render(active: active, class: css_classes),
|
|
8
|
+
data: kiso_prepare_options(component_options, slot: "pagination-previous"),
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= kiso_component_icon(:chevron_left) %>
|
|
11
|
+
<%= content_tag :span, "Previous", class: "hidden sm:block" %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: css_classes.presence,
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "popover-anchor",
|
|
5
|
+
kiso__popover_target: "anchor"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (align: :center, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::PopoverContent.render(class: css_classes),
|
|
4
|
+
role: "dialog",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "popover-content",
|
|
6
|
+
kiso__popover_target: "content",
|
|
7
|
+
align: align),
|
|
8
|
+
hidden: true,
|
|
9
|
+
**component_options do %>
|
|
10
|
+
<%= yield %>
|
|
11
|
+
<% end %>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :p,
|
|
3
|
+
class: Kiso::Themes::PopoverDescription.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "popover-description"),
|
|
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::PopoverHeader.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "popover-header"),
|
|
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::PopoverTitle.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "popover-title"),
|
|
5
|
+
**component_options do %>
|
|
6
|
+
<%= yield %>
|
|
7
|
+
<% end %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: css_classes.presence,
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "popover-trigger",
|
|
5
|
+
kiso__popover_target: "trigger",
|
|
6
|
+
action: "click->kiso--popover#toggle keydown->kiso--popover#triggerKeydown"),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<%= yield %>
|
|
9
|
+
<% end %>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<%# locals: (color: :primary, css_classes: "", **component_options) %>
|
|
2
|
+
<% component_options[:type] = :radio %>
|
|
3
|
+
<%= tag.input(
|
|
4
|
+
class: Kiso::Themes::RadioGroupItem.render(color: color, class: css_classes),
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "radio-group-item"),
|
|
6
|
+
**component_options) %>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%# locals: (css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::SelectContent.render(class: css_classes),
|
|
4
|
+
role: "listbox",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "select-content",
|
|
6
|
+
kiso__select_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::SelectGroup.render(class: css_classes),
|
|
4
|
+
role: "group",
|
|
5
|
+
data: kiso_prepare_options(component_options, slot: "select-group"),
|
|
6
|
+
**component_options do %>
|
|
7
|
+
<%= yield %>
|
|
8
|
+
<% end %>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<%# locals: (value:, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :div,
|
|
3
|
+
class: Kiso::Themes::SelectItem.render(class: css_classes),
|
|
4
|
+
role: "option",
|
|
5
|
+
tabindex: "-1",
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "select-item",
|
|
7
|
+
kiso__select_target: "item",
|
|
8
|
+
action: "click->kiso--select#selectItem",
|
|
9
|
+
value: value,
|
|
10
|
+
disabled: (disabled ? "true" : nil)),
|
|
11
|
+
aria: {selected: false, disabled: (disabled || nil)},
|
|
12
|
+
**component_options do %>
|
|
13
|
+
<%= tag.span class: Kiso::Themes::SelectItemIndicator.render,
|
|
14
|
+
data: { slot: "select-item-indicator", kiso__select_target: "indicator" },
|
|
15
|
+
hidden: true do %>
|
|
16
|
+
<%= kiso_component_icon(:check, class: "size-4") %>
|
|
17
|
+
<% end %>
|
|
18
|
+
<%= tag.span yield, data: { slot: "select-item-text" } %>
|
|
19
|
+
<% end %>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%# locals: (size: :md, disabled: false, css_classes: "", **component_options) %>
|
|
2
|
+
<% component_options[:disabled] = true if disabled %>
|
|
3
|
+
<%= content_tag :button,
|
|
4
|
+
type: "button",
|
|
5
|
+
class: Kiso::Themes::SelectTrigger.render(size: size, class: css_classes),
|
|
6
|
+
data: kiso_prepare_options(component_options, slot: "select-trigger",
|
|
7
|
+
kiso__select_target: "trigger",
|
|
8
|
+
action: "click->kiso--select#toggle keydown->kiso--select#triggerKeydown"),
|
|
9
|
+
aria: {haspopup: "listbox", expanded: false},
|
|
10
|
+
**component_options do %>
|
|
11
|
+
<%= yield %>
|
|
12
|
+
<%= kiso_component_icon(:chevron_down, class: "size-4 opacity-50") %>
|
|
13
|
+
<% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%# locals: (placeholder: nil, css_classes: "", **component_options) %>
|
|
2
|
+
<%= content_tag :span,
|
|
3
|
+
class: Kiso::Themes::SelectValue.render(class: css_classes),
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "select-value",
|
|
5
|
+
kiso__select_target: "valueDisplay",
|
|
6
|
+
placeholder: placeholder),
|
|
7
|
+
**component_options do %>
|
|
8
|
+
<% if placeholder %>
|
|
9
|
+
<span class="text-muted-foreground"><%= placeholder %></span>
|
|
10
|
+
<% end %>
|
|
11
|
+
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%# locals: (css_classes: "", **component_options) %>
|
|
2
2
|
<%= content_tag :div,
|
|
3
3
|
class: Kiso::Themes::StatsCardDescription.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "stats-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::StatsCardHeader.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "stats-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::StatsCardLabel.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "stats-card-label"),
|
|
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::StatsCardValue.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "stats-card-value"),
|
|
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 :tbody,
|
|
3
3
|
class: Kiso::Themes::TableBody.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "table-body"),
|
|
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 :caption,
|
|
3
3
|
class: Kiso::Themes::TableCaption.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "table-caption"),
|
|
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 :td,
|
|
3
3
|
class: Kiso::Themes::TableCell.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "table-cell"),
|
|
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 :tfoot,
|
|
3
3
|
class: Kiso::Themes::TableFooter.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "table-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 :th,
|
|
3
3
|
class: Kiso::Themes::TableHead.render(class: css_classes),
|
|
4
|
-
data:
|
|
4
|
+
data: kiso_prepare_options(component_options, slot: "table-head"),
|
|
5
5
|
**component_options do %>
|
|
6
6
|
<%= yield %>
|
|
7
7
|
<% end %>
|