shadcn_view_components 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +590 -0
- data/LICENSE +49 -0
- data/README.md +542 -0
- data/app/assets/javascripts/shadcn/aria_relationships.js +88 -0
- data/app/assets/javascripts/shadcn/controllers/accordion_controller.js +241 -0
- data/app/assets/javascripts/shadcn/controllers/calendar_controller.js +98 -0
- data/app/assets/javascripts/shadcn/controllers/carousel_controller.js +305 -0
- data/app/assets/javascripts/shadcn/controllers/checked_state_controller.js +121 -0
- data/app/assets/javascripts/shadcn/controllers/combobox_controller.js +613 -0
- data/app/assets/javascripts/shadcn/controllers/command_controller.js +87 -0
- data/app/assets/javascripts/shadcn/controllers/dialog_controller.js +208 -0
- data/app/assets/javascripts/shadcn/controllers/hover_card_controller.js +145 -0
- data/app/assets/javascripts/shadcn/controllers/input_otp_controller.js +416 -0
- data/app/assets/javascripts/shadcn/controllers/menu_controller.js +286 -0
- data/app/assets/javascripts/shadcn/controllers/menubar_controller.js +430 -0
- data/app/assets/javascripts/shadcn/controllers/message_scroller_controller.js +37 -0
- data/app/assets/javascripts/shadcn/controllers/navigation_menu_controller.js +254 -0
- data/app/assets/javascripts/shadcn/controllers/popover_controller.js +117 -0
- data/app/assets/javascripts/shadcn/controllers/resizable_controller.js +256 -0
- data/app/assets/javascripts/shadcn/controllers/select_controller.js +491 -0
- data/app/assets/javascripts/shadcn/controllers/sidebar_controller.js +30 -0
- data/app/assets/javascripts/shadcn/controllers/slider_controller.js +74 -0
- data/app/assets/javascripts/shadcn/controllers/tabs_controller.js +146 -0
- data/app/assets/javascripts/shadcn/controllers/toast_controller.js +81 -0
- data/app/assets/javascripts/shadcn/controllers/toggle_controller.js +21 -0
- data/app/assets/javascripts/shadcn/controllers/toggle_group_controller.js +37 -0
- data/app/assets/javascripts/shadcn/controllers/tooltip_controller.js +123 -0
- data/app/assets/javascripts/shadcn/floating_position.js +660 -0
- data/app/assets/javascripts/shadcn/hide_after_exit.js +53 -0
- data/app/assets/javascripts/shadcn/index.js +65 -0
- data/app/assets/javascripts/shadcn/menu_popover.js +352 -0
- data/app/assets/javascripts/shadcn/package.json +17 -0
- data/app/assets/javascripts/shadcn/state_attrs.js +13 -0
- data/app/assets/stylesheets/shadcn/shadcn.css +766 -0
- data/app/assets/tailwind/shadcn_view_components/engine.css +11 -0
- data/app/components/shadcn/accordion.rb +121 -0
- data/app/components/shadcn/alert.rb +31 -0
- data/app/components/shadcn/alert_dialog.rb +165 -0
- data/app/components/shadcn/aspect_ratio.rb +34 -0
- data/app/components/shadcn/attachment.rb +86 -0
- data/app/components/shadcn/avatar.rb +55 -0
- data/app/components/shadcn/badge.rb +32 -0
- data/app/components/shadcn/base_component.rb +239 -0
- data/app/components/shadcn/breadcrumb.rb +70 -0
- data/app/components/shadcn/bubble.rb +48 -0
- data/app/components/shadcn/button.html.erb +1 -0
- data/app/components/shadcn/button.rb +41 -0
- data/app/components/shadcn/button_group.rb +41 -0
- data/app/components/shadcn/button_styled.rb +51 -0
- data/app/components/shadcn/calendar.rb +276 -0
- data/app/components/shadcn/card.rb +18 -0
- data/app/components/shadcn/carousel.rb +236 -0
- data/app/components/shadcn/chart.rb +57 -0
- data/app/components/shadcn/checkbox.rb +64 -0
- data/app/components/shadcn/collapsible.rb +25 -0
- data/app/components/shadcn/combobox.rb +552 -0
- data/app/components/shadcn/command.rb +149 -0
- data/app/components/shadcn/context_menu.rb +79 -0
- data/app/components/shadcn/dialog.rb +180 -0
- data/app/components/shadcn/direction_provider.rb +18 -0
- data/app/components/shadcn/drawer.rb +150 -0
- data/app/components/shadcn/dropdown_menu.rb +242 -0
- data/app/components/shadcn/empty.rb +40 -0
- data/app/components/shadcn/field.rb +106 -0
- data/app/components/shadcn/floating_position_options.rb +132 -0
- data/app/components/shadcn/form.rb +105 -0
- data/app/components/shadcn/hover_card.rb +66 -0
- data/app/components/shadcn/input.rb +13 -0
- data/app/components/shadcn/input_group/button.rb +48 -0
- data/app/components/shadcn/input_group.rb +51 -0
- data/app/components/shadcn/input_otp.rb +265 -0
- data/app/components/shadcn/item.rb +108 -0
- data/app/components/shadcn/kbd.rb +9 -0
- data/app/components/shadcn/label.rb +12 -0
- data/app/components/shadcn/marker.rb +37 -0
- data/app/components/shadcn/menubar.rb +110 -0
- data/app/components/shadcn/message.rb +29 -0
- data/app/components/shadcn/message_scroller.rb +52 -0
- data/app/components/shadcn/native_checked_state.rb +74 -0
- data/app/components/shadcn/native_select.rb +78 -0
- data/app/components/shadcn/navigation_menu.rb +122 -0
- data/app/components/shadcn/pagination.rb +160 -0
- data/app/components/shadcn/popover.rb +68 -0
- data/app/components/shadcn/preview_base.rb +107 -0
- data/app/components/shadcn/progress.rb +49 -0
- data/app/components/shadcn/radio_group.rb +74 -0
- data/app/components/shadcn/resizable.rb +77 -0
- data/app/components/shadcn/scroll_area.rb +59 -0
- data/app/components/shadcn/select.rb +356 -0
- data/app/components/shadcn/separator.rb +42 -0
- data/app/components/shadcn/sheet.rb +157 -0
- data/app/components/shadcn/sidebar.rb +332 -0
- data/app/components/shadcn/skeleton.rb +13 -0
- data/app/components/shadcn/slider.rb +279 -0
- data/app/components/shadcn/sonner.rb +30 -0
- data/app/components/shadcn/spinner.rb +32 -0
- data/app/components/shadcn/switch.rb +79 -0
- data/app/components/shadcn/table.rb +46 -0
- data/app/components/shadcn/tabs.rb +119 -0
- data/app/components/shadcn/textarea.rb +7 -0
- data/app/components/shadcn/toggle.rb +66 -0
- data/app/components/shadcn/toggle_group.rb +127 -0
- data/app/components/shadcn/tooltip.rb +74 -0
- data/config/importmap.rb +5 -0
- data/lib/generators/shadcn_view_components/install_generator.rb +182 -0
- data/lib/shadcn_view_components/classes.rb +89 -0
- data/lib/shadcn_view_components/component_naming.rb +21 -0
- data/lib/shadcn_view_components/contracts/calendar.rb +95 -0
- data/lib/shadcn_view_components/engine.rb +56 -0
- data/lib/shadcn_view_components/generated/contracts/accordion.rb +112 -0
- data/lib/shadcn_view_components/generated/contracts/alert-dialog.rb +300 -0
- data/lib/shadcn_view_components/generated/contracts/alert.rb +104 -0
- data/lib/shadcn_view_components/generated/contracts/aspect-ratio.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/attachment.rb +224 -0
- data/lib/shadcn_view_components/generated/contracts/avatar.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/badge.rb +39 -0
- data/lib/shadcn_view_components/generated/contracts/breadcrumb.rb +172 -0
- data/lib/shadcn_view_components/generated/contracts/bubble.rb +112 -0
- data/lib/shadcn_view_components/generated/contracts/button-group.rb +81 -0
- data/lib/shadcn_view_components/generated/contracts/button.rb +81 -0
- data/lib/shadcn_view_components/generated/contracts/card.rb +172 -0
- data/lib/shadcn_view_components/generated/contracts/carousel.rb +133 -0
- data/lib/shadcn_view_components/generated/contracts/chart.rb +109 -0
- data/lib/shadcn_view_components/generated/contracts/checkbox.rb +35 -0
- data/lib/shadcn_view_components/generated/contracts/collapsible.rb +89 -0
- data/lib/shadcn_view_components/generated/contracts/combobox.rb +368 -0
- data/lib/shadcn_view_components/generated/contracts/command.rb +222 -0
- data/lib/shadcn_view_components/generated/contracts/context-menu.rb +378 -0
- data/lib/shadcn_view_components/generated/contracts/dialog.rb +258 -0
- data/lib/shadcn_view_components/generated/contracts/direction.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/drawer.rb +280 -0
- data/lib/shadcn_view_components/generated/contracts/dropdown-menu.rb +380 -0
- data/lib/shadcn_view_components/generated/contracts/empty.rb +150 -0
- data/lib/shadcn_view_components/generated/contracts/field.rb +244 -0
- data/lib/shadcn_view_components/generated/contracts/form.rb +62 -0
- data/lib/shadcn_view_components/generated/contracts/hover-card.rb +90 -0
- data/lib/shadcn_view_components/generated/contracts/input-group.rb +155 -0
- data/lib/shadcn_view_components/generated/contracts/input-otp.rb +106 -0
- data/lib/shadcn_view_components/generated/contracts/input.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/item.rb +251 -0
- data/lib/shadcn_view_components/generated/contracts/kbd.rb +57 -0
- data/lib/shadcn_view_components/generated/contracts/label.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/marker.rb +82 -0
- data/lib/shadcn_view_components/generated/contracts/menubar.rb +394 -0
- data/lib/shadcn_view_components/generated/contracts/message-scroller.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/message.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/native-select.rb +82 -0
- data/lib/shadcn_view_components/generated/contracts/navigation-menu.rb +195 -0
- data/lib/shadcn_view_components/generated/contracts/pagination.rb +176 -0
- data/lib/shadcn_view_components/generated/contracts/popover.rb +159 -0
- data/lib/shadcn_view_components/generated/contracts/progress.rb +126 -0
- data/lib/shadcn_view_components/generated/contracts/radio-group.rb +58 -0
- data/lib/shadcn_view_components/generated/contracts/resizable.rb +85 -0
- data/lib/shadcn_view_components/generated/contracts/scroll-area.rb +59 -0
- data/lib/shadcn_view_components/generated/contracts/select.rb +245 -0
- data/lib/shadcn_view_components/generated/contracts/separator.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/sheet.rb +209 -0
- data/lib/shadcn_view_components/generated/contracts/sidebar.rb +558 -0
- data/lib/shadcn_view_components/generated/contracts/skeleton.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/slider.rb +38 -0
- data/lib/shadcn_view_components/generated/contracts/sonner.rb +36 -0
- data/lib/shadcn_view_components/generated/contracts/spinner.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/switch.rb +35 -0
- data/lib/shadcn_view_components/generated/contracts/table.rb +199 -0
- data/lib/shadcn_view_components/generated/contracts/tabs.rb +104 -0
- data/lib/shadcn_view_components/generated/contracts/textarea.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/toggle-group.rb +62 -0
- data/lib/shadcn_view_components/generated/contracts/toggle.rb +39 -0
- data/lib/shadcn_view_components/generated/contracts/tooltip.rb +116 -0
- data/lib/shadcn_view_components/numeric_property_validation.rb +124 -0
- data/lib/shadcn_view_components/property_contract_definitions.rb +92 -0
- data/lib/shadcn_view_components/property_contracts.rb +42 -0
- data/lib/shadcn_view_components/property_validation.rb +55 -0
- data/lib/shadcn_view_components/version.rb +6 -0
- data/lib/shadcn_view_components.rb +21 -0
- metadata +446 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "sidebar" (item sha256: 3838cb3f78e3a4ddb5e660cdf913ba3e30cb112c2cd7a3506b1fa4df5e8cd8da)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Sidebar
|
|
11
|
+
ROOT_SLOT = T.let("sidebar", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{} => "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "sidebar", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
24
|
+
{ name: "sidebar", tag: "SheetContent", static_attributes: { class: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden", "data-mobile" => "true", "data-sidebar" => "sidebar" }.freeze, dynamic_attributes: ["dir", "side", "style"].freeze }.freeze,
|
|
25
|
+
{ name: "sidebar", tag: "div", static_attributes: { class: "group peer hidden text-sidebar-foreground md:block" }.freeze, dynamic_attributes: ["data-collapsible", "data-side", "data-state", "data-variant"].freeze }.freeze,
|
|
26
|
+
{ name: "sidebar-gap", tag: "div", static_attributes: { class: "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear group-data-[collapsible=offcanvas]:w-0 group-data-[side=right]:rotate-180 group-data-[collapsible=icon]:w-(--sidebar-width-icon)" }.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
27
|
+
{ name: "sidebar-container", tag: "div", static_attributes: { class: "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l" }.freeze, dynamic_attributes: ["data-side"].freeze }.freeze,
|
|
28
|
+
{ name: "sidebar-inner", tag: "div", static_attributes: { class: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border", "data-sidebar" => "sidebar" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
29
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
30
|
+
|
|
31
|
+
extend T::Sig
|
|
32
|
+
|
|
33
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
34
|
+
module_function def combination(options)
|
|
35
|
+
COMBINATIONS.fetch(options)
|
|
36
|
+
end
|
|
37
|
+
module Content
|
|
38
|
+
ROOT_SLOT = T.let("sidebar-content", String)
|
|
39
|
+
|
|
40
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
41
|
+
|
|
42
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
43
|
+
|
|
44
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
45
|
+
COMBINATIONS = T.let({
|
|
46
|
+
{} => "no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden"
|
|
47
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
48
|
+
|
|
49
|
+
SLOTS = T.let([
|
|
50
|
+
{ name: "sidebar-content", tag: "div", static_attributes: { "data-sidebar" => "content" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
51
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
52
|
+
|
|
53
|
+
extend T::Sig
|
|
54
|
+
|
|
55
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
56
|
+
module_function def combination(options)
|
|
57
|
+
COMBINATIONS.fetch(options)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
module Footer
|
|
61
|
+
ROOT_SLOT = T.let("sidebar-footer", String)
|
|
62
|
+
|
|
63
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
64
|
+
|
|
65
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
66
|
+
|
|
67
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
68
|
+
COMBINATIONS = T.let({
|
|
69
|
+
{} => "flex flex-col gap-2 p-2"
|
|
70
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
71
|
+
|
|
72
|
+
SLOTS = T.let([
|
|
73
|
+
{ name: "sidebar-footer", tag: "div", static_attributes: { "data-sidebar" => "footer" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
74
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
75
|
+
|
|
76
|
+
extend T::Sig
|
|
77
|
+
|
|
78
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
79
|
+
module_function def combination(options)
|
|
80
|
+
COMBINATIONS.fetch(options)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
module Group
|
|
84
|
+
ROOT_SLOT = T.let("sidebar-group", String)
|
|
85
|
+
|
|
86
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
87
|
+
|
|
88
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
89
|
+
|
|
90
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
91
|
+
COMBINATIONS = T.let({
|
|
92
|
+
{} => "relative flex w-full min-w-0 flex-col p-2"
|
|
93
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
94
|
+
|
|
95
|
+
SLOTS = T.let([
|
|
96
|
+
{ name: "sidebar-group", tag: "div", static_attributes: { "data-sidebar" => "group" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
97
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
98
|
+
|
|
99
|
+
extend T::Sig
|
|
100
|
+
|
|
101
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
102
|
+
module_function def combination(options)
|
|
103
|
+
COMBINATIONS.fetch(options)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
module GroupAction
|
|
107
|
+
ROOT_SLOT = T.let("sidebar-group-action", String)
|
|
108
|
+
|
|
109
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
110
|
+
|
|
111
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
112
|
+
|
|
113
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
114
|
+
COMBINATIONS = T.let({
|
|
115
|
+
{} => "absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0"
|
|
116
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
117
|
+
|
|
118
|
+
SLOTS = T.let([
|
|
119
|
+
{ name: "sidebar-group-action", tag: "button", static_attributes: { "data-sidebar" => "group-action" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
120
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
121
|
+
|
|
122
|
+
extend T::Sig
|
|
123
|
+
|
|
124
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
125
|
+
module_function def combination(options)
|
|
126
|
+
COMBINATIONS.fetch(options)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
module GroupContent
|
|
130
|
+
ROOT_SLOT = T.let("sidebar-group-content", String)
|
|
131
|
+
|
|
132
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
133
|
+
|
|
134
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
135
|
+
|
|
136
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
137
|
+
COMBINATIONS = T.let({
|
|
138
|
+
{} => "w-full text-sm"
|
|
139
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
140
|
+
|
|
141
|
+
SLOTS = T.let([
|
|
142
|
+
{ name: "sidebar-group-content", tag: "div", static_attributes: { "data-sidebar" => "group-content" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
143
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
144
|
+
|
|
145
|
+
extend T::Sig
|
|
146
|
+
|
|
147
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
148
|
+
module_function def combination(options)
|
|
149
|
+
COMBINATIONS.fetch(options)
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
module GroupLabel
|
|
153
|
+
ROOT_SLOT = T.let("sidebar-group-label", String)
|
|
154
|
+
|
|
155
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
156
|
+
|
|
157
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
158
|
+
|
|
159
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
160
|
+
COMBINATIONS = T.let({
|
|
161
|
+
{} => "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0"
|
|
162
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
163
|
+
|
|
164
|
+
SLOTS = T.let([
|
|
165
|
+
{ name: "sidebar-group-label", tag: "div", static_attributes: { "data-sidebar" => "group-label" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
166
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
167
|
+
|
|
168
|
+
extend T::Sig
|
|
169
|
+
|
|
170
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
171
|
+
module_function def combination(options)
|
|
172
|
+
COMBINATIONS.fetch(options)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
module Header
|
|
176
|
+
ROOT_SLOT = T.let("sidebar-header", String)
|
|
177
|
+
|
|
178
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
179
|
+
|
|
180
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
181
|
+
|
|
182
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
183
|
+
COMBINATIONS = T.let({
|
|
184
|
+
{} => "flex flex-col gap-2 p-2"
|
|
185
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
186
|
+
|
|
187
|
+
SLOTS = T.let([
|
|
188
|
+
{ name: "sidebar-header", tag: "div", static_attributes: { "data-sidebar" => "header" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
189
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
190
|
+
|
|
191
|
+
extend T::Sig
|
|
192
|
+
|
|
193
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
194
|
+
module_function def combination(options)
|
|
195
|
+
COMBINATIONS.fetch(options)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
module Input
|
|
199
|
+
ROOT_SLOT = T.let("sidebar-input", String)
|
|
200
|
+
|
|
201
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
202
|
+
|
|
203
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
204
|
+
|
|
205
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
206
|
+
COMBINATIONS = T.let({
|
|
207
|
+
{} => "h-8 w-full bg-background shadow-none"
|
|
208
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
209
|
+
|
|
210
|
+
SLOTS = T.let([
|
|
211
|
+
{ name: "sidebar-input", tag: "Input", static_attributes: { "data-sidebar" => "input" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
212
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
213
|
+
|
|
214
|
+
extend T::Sig
|
|
215
|
+
|
|
216
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
217
|
+
module_function def combination(options)
|
|
218
|
+
COMBINATIONS.fetch(options)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
module Inset
|
|
222
|
+
ROOT_SLOT = T.let("sidebar-inset", String)
|
|
223
|
+
|
|
224
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
225
|
+
|
|
226
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
227
|
+
|
|
228
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
229
|
+
COMBINATIONS = T.let({
|
|
230
|
+
{} => "relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2"
|
|
231
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
232
|
+
|
|
233
|
+
SLOTS = T.let([
|
|
234
|
+
{ name: "sidebar-inset", tag: "main", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
235
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
236
|
+
|
|
237
|
+
extend T::Sig
|
|
238
|
+
|
|
239
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
240
|
+
module_function def combination(options)
|
|
241
|
+
COMBINATIONS.fetch(options)
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
module Menu
|
|
245
|
+
ROOT_SLOT = T.let("sidebar-menu", String)
|
|
246
|
+
|
|
247
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
248
|
+
|
|
249
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
250
|
+
|
|
251
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
252
|
+
COMBINATIONS = T.let({
|
|
253
|
+
{} => "flex w-full min-w-0 flex-col gap-0"
|
|
254
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
255
|
+
|
|
256
|
+
SLOTS = T.let([
|
|
257
|
+
{ name: "sidebar-menu", tag: "ul", static_attributes: { "data-sidebar" => "menu" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
258
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
259
|
+
|
|
260
|
+
extend T::Sig
|
|
261
|
+
|
|
262
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
263
|
+
module_function def combination(options)
|
|
264
|
+
COMBINATIONS.fetch(options)
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
module MenuAction
|
|
268
|
+
ROOT_SLOT = T.let("sidebar-menu-action", String)
|
|
269
|
+
|
|
270
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
271
|
+
|
|
272
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
273
|
+
|
|
274
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
275
|
+
COMBINATIONS = T.let({
|
|
276
|
+
{} => "absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0"
|
|
277
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
278
|
+
|
|
279
|
+
SLOTS = T.let([
|
|
280
|
+
{ name: "sidebar-menu-action", tag: "button", static_attributes: { "data-sidebar" => "menu-action" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
281
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
282
|
+
|
|
283
|
+
extend T::Sig
|
|
284
|
+
|
|
285
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
286
|
+
module_function def combination(options)
|
|
287
|
+
COMBINATIONS.fetch(options)
|
|
288
|
+
end
|
|
289
|
+
end
|
|
290
|
+
module MenuBadge
|
|
291
|
+
ROOT_SLOT = T.let("sidebar-menu-badge", String)
|
|
292
|
+
|
|
293
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
294
|
+
|
|
295
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
296
|
+
|
|
297
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
298
|
+
COMBINATIONS = T.let({
|
|
299
|
+
{} => "pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground"
|
|
300
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
301
|
+
|
|
302
|
+
SLOTS = T.let([
|
|
303
|
+
{ name: "sidebar-menu-badge", tag: "div", static_attributes: { "data-sidebar" => "menu-badge" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
304
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
305
|
+
|
|
306
|
+
extend T::Sig
|
|
307
|
+
|
|
308
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
309
|
+
module_function def combination(options)
|
|
310
|
+
COMBINATIONS.fetch(options)
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
module MenuButton
|
|
314
|
+
ROOT_SLOT = T.let("", String)
|
|
315
|
+
|
|
316
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
317
|
+
CLASSES_SLOT = T.let("sidebar-menu-button", String)
|
|
318
|
+
|
|
319
|
+
DEFAULTS = T.let({ size: :default, variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
320
|
+
|
|
321
|
+
VARIANTS = T.let({ size: [:default, :lg, :sm], variant: [:default, :outline] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
322
|
+
|
|
323
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
324
|
+
COMBINATIONS = T.let({
|
|
325
|
+
{ size: :default, variant: :default } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-8 text-sm",
|
|
326
|
+
{ size: :default, variant: :outline } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)] h-8 text-sm",
|
|
327
|
+
{ size: :lg, variant: :default } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-12 text-sm group-data-[collapsible=icon]:p-0!",
|
|
328
|
+
{ size: :lg, variant: :outline } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)] h-12 text-sm group-data-[collapsible=icon]:p-0!",
|
|
329
|
+
{ size: :sm, variant: :default } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate hover:bg-sidebar-accent hover:text-sidebar-accent-foreground h-7 text-xs",
|
|
330
|
+
{ size: :sm, variant: :outline } => "peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)] h-7 text-xs"
|
|
331
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
332
|
+
|
|
333
|
+
SLOTS = T.let([
|
|
334
|
+
{ name: "", tag: "Tooltip", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
335
|
+
{ name: "sidebar-menu-button", tag: "button", static_attributes: { "data-sidebar" => "menu-button" }.freeze, dynamic_attributes: ["data-active", "data-size"].freeze }.freeze
|
|
336
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
337
|
+
|
|
338
|
+
extend T::Sig
|
|
339
|
+
|
|
340
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
341
|
+
module_function def combination(options)
|
|
342
|
+
COMBINATIONS.fetch(options)
|
|
343
|
+
end
|
|
344
|
+
end
|
|
345
|
+
module MenuItem
|
|
346
|
+
ROOT_SLOT = T.let("sidebar-menu-item", String)
|
|
347
|
+
|
|
348
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
349
|
+
|
|
350
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
351
|
+
|
|
352
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
353
|
+
COMBINATIONS = T.let({
|
|
354
|
+
{} => "group/menu-item relative"
|
|
355
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
356
|
+
|
|
357
|
+
SLOTS = T.let([
|
|
358
|
+
{ name: "sidebar-menu-item", tag: "li", static_attributes: { "data-sidebar" => "menu-item" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
359
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
360
|
+
|
|
361
|
+
extend T::Sig
|
|
362
|
+
|
|
363
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
364
|
+
module_function def combination(options)
|
|
365
|
+
COMBINATIONS.fetch(options)
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
module MenuSkeleton
|
|
369
|
+
ROOT_SLOT = T.let("sidebar-menu-skeleton", String)
|
|
370
|
+
|
|
371
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
372
|
+
|
|
373
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
374
|
+
|
|
375
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
376
|
+
COMBINATIONS = T.let({
|
|
377
|
+
{} => "flex h-8 items-center gap-2 rounded-md px-2"
|
|
378
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
379
|
+
|
|
380
|
+
SLOTS = T.let([
|
|
381
|
+
{ name: "sidebar-menu-skeleton", tag: "div", static_attributes: { "data-sidebar" => "menu-skeleton" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
382
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
383
|
+
|
|
384
|
+
extend T::Sig
|
|
385
|
+
|
|
386
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
387
|
+
module_function def combination(options)
|
|
388
|
+
COMBINATIONS.fetch(options)
|
|
389
|
+
end
|
|
390
|
+
end
|
|
391
|
+
module MenuSub
|
|
392
|
+
ROOT_SLOT = T.let("sidebar-menu-sub", String)
|
|
393
|
+
|
|
394
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
395
|
+
|
|
396
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
397
|
+
|
|
398
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
399
|
+
COMBINATIONS = T.let({
|
|
400
|
+
{} => "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden"
|
|
401
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
402
|
+
|
|
403
|
+
SLOTS = T.let([
|
|
404
|
+
{ name: "sidebar-menu-sub", tag: "ul", static_attributes: { "data-sidebar" => "menu-sub" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
405
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
406
|
+
|
|
407
|
+
extend T::Sig
|
|
408
|
+
|
|
409
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
410
|
+
module_function def combination(options)
|
|
411
|
+
COMBINATIONS.fetch(options)
|
|
412
|
+
end
|
|
413
|
+
end
|
|
414
|
+
module MenuSubButton
|
|
415
|
+
ROOT_SLOT = T.let("sidebar-menu-sub-button", String)
|
|
416
|
+
|
|
417
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
418
|
+
|
|
419
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
420
|
+
|
|
421
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
422
|
+
COMBINATIONS = T.let({
|
|
423
|
+
{} => "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground"
|
|
424
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
425
|
+
|
|
426
|
+
SLOTS = T.let([
|
|
427
|
+
{ name: "sidebar-menu-sub-button", tag: "a", static_attributes: { "data-sidebar" => "menu-sub-button" }.freeze, dynamic_attributes: ["data-active", "data-size"].freeze }.freeze
|
|
428
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
429
|
+
|
|
430
|
+
extend T::Sig
|
|
431
|
+
|
|
432
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
433
|
+
module_function def combination(options)
|
|
434
|
+
COMBINATIONS.fetch(options)
|
|
435
|
+
end
|
|
436
|
+
end
|
|
437
|
+
module MenuSubItem
|
|
438
|
+
ROOT_SLOT = T.let("sidebar-menu-sub-item", String)
|
|
439
|
+
|
|
440
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
441
|
+
|
|
442
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
443
|
+
|
|
444
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
445
|
+
COMBINATIONS = T.let({
|
|
446
|
+
{} => "group/menu-sub-item relative"
|
|
447
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
448
|
+
|
|
449
|
+
SLOTS = T.let([
|
|
450
|
+
{ name: "sidebar-menu-sub-item", tag: "li", static_attributes: { "data-sidebar" => "menu-sub-item" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
451
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
452
|
+
|
|
453
|
+
extend T::Sig
|
|
454
|
+
|
|
455
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
456
|
+
module_function def combination(options)
|
|
457
|
+
COMBINATIONS.fetch(options)
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
module Provider
|
|
461
|
+
ROOT_SLOT = T.let("", String)
|
|
462
|
+
|
|
463
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
464
|
+
CLASSES_SLOT = T.let("sidebar-wrapper", String)
|
|
465
|
+
|
|
466
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
467
|
+
|
|
468
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
469
|
+
|
|
470
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
471
|
+
COMBINATIONS = T.let({
|
|
472
|
+
{} => "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar"
|
|
473
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
474
|
+
|
|
475
|
+
SLOTS = T.let([
|
|
476
|
+
{ name: "", tag: "SidebarContext.Provider", static_attributes: {}.freeze, dynamic_attributes: ["value"].freeze }.freeze,
|
|
477
|
+
{ name: "sidebar-wrapper", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["style"].freeze }.freeze
|
|
478
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
479
|
+
|
|
480
|
+
extend T::Sig
|
|
481
|
+
|
|
482
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
483
|
+
module_function def combination(options)
|
|
484
|
+
COMBINATIONS.fetch(options)
|
|
485
|
+
end
|
|
486
|
+
end
|
|
487
|
+
module Rail
|
|
488
|
+
ROOT_SLOT = T.let("sidebar-rail", String)
|
|
489
|
+
|
|
490
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
491
|
+
|
|
492
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
493
|
+
|
|
494
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
495
|
+
COMBINATIONS = T.let({
|
|
496
|
+
{} => "absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2 in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize [[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar [[data-side=left][data-collapsible=offcanvas]_&]:-right-2 [[data-side=right][data-collapsible=offcanvas]_&]:-left-2"
|
|
497
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
498
|
+
|
|
499
|
+
SLOTS = T.let([
|
|
500
|
+
{ name: "sidebar-rail", tag: "button", static_attributes: { "aria-label" => "Toggle Sidebar", "data-sidebar" => "rail", title: "Toggle Sidebar" }.freeze, dynamic_attributes: ["onClick", "tabIndex"].freeze }.freeze
|
|
501
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
502
|
+
|
|
503
|
+
extend T::Sig
|
|
504
|
+
|
|
505
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
506
|
+
module_function def combination(options)
|
|
507
|
+
COMBINATIONS.fetch(options)
|
|
508
|
+
end
|
|
509
|
+
end
|
|
510
|
+
module Separator
|
|
511
|
+
ROOT_SLOT = T.let("sidebar-separator", String)
|
|
512
|
+
|
|
513
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
514
|
+
|
|
515
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
516
|
+
|
|
517
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
518
|
+
COMBINATIONS = T.let({
|
|
519
|
+
{} => "mx-2 w-auto bg-sidebar-border"
|
|
520
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
521
|
+
|
|
522
|
+
SLOTS = T.let([
|
|
523
|
+
{ name: "sidebar-separator", tag: "Separator", static_attributes: { "data-sidebar" => "separator" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
524
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
525
|
+
|
|
526
|
+
extend T::Sig
|
|
527
|
+
|
|
528
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
529
|
+
module_function def combination(options)
|
|
530
|
+
COMBINATIONS.fetch(options)
|
|
531
|
+
end
|
|
532
|
+
end
|
|
533
|
+
module Trigger
|
|
534
|
+
ROOT_SLOT = T.let("sidebar-trigger", String)
|
|
535
|
+
|
|
536
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
537
|
+
|
|
538
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
539
|
+
|
|
540
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
541
|
+
COMBINATIONS = T.let({
|
|
542
|
+
{} => ""
|
|
543
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
544
|
+
|
|
545
|
+
SLOTS = T.let([
|
|
546
|
+
{ name: "sidebar-trigger", tag: "Button", static_attributes: { "data-sidebar" => "trigger" }.freeze, dynamic_attributes: ["onClick"].freeze }.freeze
|
|
547
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
548
|
+
|
|
549
|
+
extend T::Sig
|
|
550
|
+
|
|
551
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
552
|
+
module_function def combination(options)
|
|
553
|
+
COMBINATIONS.fetch(options)
|
|
554
|
+
end
|
|
555
|
+
end
|
|
556
|
+
end
|
|
557
|
+
end
|
|
558
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "skeleton" (item sha256: 886dbcfaab0c800bcb0734084e1fa2b1f7ebac27761d3b90c7276fc5bb508a7b)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Skeleton
|
|
11
|
+
ROOT_SLOT = T.let("skeleton", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{} => "animate-pulse rounded-md bg-muted"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "skeleton", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
24
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
25
|
+
|
|
26
|
+
extend T::Sig
|
|
27
|
+
|
|
28
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
29
|
+
module_function def combination(options)
|
|
30
|
+
COMBINATIONS.fetch(options)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "slider" (item sha256: 485f3c67d8b9acbbe2a752659e475e909c765d9ef1db171462bb1504482a29fe)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Slider
|
|
11
|
+
ROOT_SLOT = T.let("slider", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{} => "data-horizontal:w-full data-vertical:h-full"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "slider", tag: "SliderPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: ["defaultValue", "max", "min", "value"].freeze }.freeze,
|
|
24
|
+
{ name: "", tag: "SliderPrimitive.Control", static_attributes: { class: "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col" }.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
25
|
+
{ name: "slider-track", tag: "SliderPrimitive.Track", static_attributes: { class: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1" }.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
26
|
+
{ name: "slider-range", tag: "SliderPrimitive.Indicator", static_attributes: { class: "bg-primary select-none data-horizontal:h-full data-vertical:w-full" }.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
27
|
+
{ name: "slider-thumb", tag: "SliderPrimitive.Thumb", static_attributes: { class: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
28
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
29
|
+
|
|
30
|
+
extend T::Sig
|
|
31
|
+
|
|
32
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
33
|
+
module_function def combination(options)
|
|
34
|
+
COMBINATIONS.fetch(options)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "sonner" (item sha256: 4698083738679ab179f9a9d1a4faaf54119a53376d9476ec3abf7608571291ed)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Sonner
|
|
11
|
+
module Toaster
|
|
12
|
+
ROOT_SLOT = T.let("", String)
|
|
13
|
+
|
|
14
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
15
|
+
|
|
16
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
17
|
+
|
|
18
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
19
|
+
COMBINATIONS = T.let({
|
|
20
|
+
{} => ""
|
|
21
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
22
|
+
|
|
23
|
+
SLOTS = T.let([
|
|
24
|
+
{ name: "", tag: "Sonner", static_attributes: { class: "toaster group" }.freeze, dynamic_attributes: ["icons", "style", "theme", "toastOptions"].freeze }.freeze
|
|
25
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
26
|
+
|
|
27
|
+
extend T::Sig
|
|
28
|
+
|
|
29
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
30
|
+
module_function def combination(options)
|
|
31
|
+
COMBINATIONS.fetch(options)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|