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.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +590 -0
  3. data/LICENSE +49 -0
  4. data/README.md +542 -0
  5. data/app/assets/javascripts/shadcn/aria_relationships.js +88 -0
  6. data/app/assets/javascripts/shadcn/controllers/accordion_controller.js +241 -0
  7. data/app/assets/javascripts/shadcn/controllers/calendar_controller.js +98 -0
  8. data/app/assets/javascripts/shadcn/controllers/carousel_controller.js +305 -0
  9. data/app/assets/javascripts/shadcn/controllers/checked_state_controller.js +121 -0
  10. data/app/assets/javascripts/shadcn/controllers/combobox_controller.js +613 -0
  11. data/app/assets/javascripts/shadcn/controllers/command_controller.js +87 -0
  12. data/app/assets/javascripts/shadcn/controllers/dialog_controller.js +208 -0
  13. data/app/assets/javascripts/shadcn/controllers/hover_card_controller.js +145 -0
  14. data/app/assets/javascripts/shadcn/controllers/input_otp_controller.js +416 -0
  15. data/app/assets/javascripts/shadcn/controllers/menu_controller.js +286 -0
  16. data/app/assets/javascripts/shadcn/controllers/menubar_controller.js +430 -0
  17. data/app/assets/javascripts/shadcn/controllers/message_scroller_controller.js +37 -0
  18. data/app/assets/javascripts/shadcn/controllers/navigation_menu_controller.js +254 -0
  19. data/app/assets/javascripts/shadcn/controllers/popover_controller.js +117 -0
  20. data/app/assets/javascripts/shadcn/controllers/resizable_controller.js +256 -0
  21. data/app/assets/javascripts/shadcn/controllers/select_controller.js +491 -0
  22. data/app/assets/javascripts/shadcn/controllers/sidebar_controller.js +30 -0
  23. data/app/assets/javascripts/shadcn/controllers/slider_controller.js +74 -0
  24. data/app/assets/javascripts/shadcn/controllers/tabs_controller.js +146 -0
  25. data/app/assets/javascripts/shadcn/controllers/toast_controller.js +81 -0
  26. data/app/assets/javascripts/shadcn/controllers/toggle_controller.js +21 -0
  27. data/app/assets/javascripts/shadcn/controllers/toggle_group_controller.js +37 -0
  28. data/app/assets/javascripts/shadcn/controllers/tooltip_controller.js +123 -0
  29. data/app/assets/javascripts/shadcn/floating_position.js +660 -0
  30. data/app/assets/javascripts/shadcn/hide_after_exit.js +53 -0
  31. data/app/assets/javascripts/shadcn/index.js +65 -0
  32. data/app/assets/javascripts/shadcn/menu_popover.js +352 -0
  33. data/app/assets/javascripts/shadcn/package.json +17 -0
  34. data/app/assets/javascripts/shadcn/state_attrs.js +13 -0
  35. data/app/assets/stylesheets/shadcn/shadcn.css +766 -0
  36. data/app/assets/tailwind/shadcn_view_components/engine.css +11 -0
  37. data/app/components/shadcn/accordion.rb +121 -0
  38. data/app/components/shadcn/alert.rb +31 -0
  39. data/app/components/shadcn/alert_dialog.rb +165 -0
  40. data/app/components/shadcn/aspect_ratio.rb +34 -0
  41. data/app/components/shadcn/attachment.rb +86 -0
  42. data/app/components/shadcn/avatar.rb +55 -0
  43. data/app/components/shadcn/badge.rb +32 -0
  44. data/app/components/shadcn/base_component.rb +239 -0
  45. data/app/components/shadcn/breadcrumb.rb +70 -0
  46. data/app/components/shadcn/bubble.rb +48 -0
  47. data/app/components/shadcn/button.html.erb +1 -0
  48. data/app/components/shadcn/button.rb +41 -0
  49. data/app/components/shadcn/button_group.rb +41 -0
  50. data/app/components/shadcn/button_styled.rb +51 -0
  51. data/app/components/shadcn/calendar.rb +276 -0
  52. data/app/components/shadcn/card.rb +18 -0
  53. data/app/components/shadcn/carousel.rb +236 -0
  54. data/app/components/shadcn/chart.rb +57 -0
  55. data/app/components/shadcn/checkbox.rb +64 -0
  56. data/app/components/shadcn/collapsible.rb +25 -0
  57. data/app/components/shadcn/combobox.rb +552 -0
  58. data/app/components/shadcn/command.rb +149 -0
  59. data/app/components/shadcn/context_menu.rb +79 -0
  60. data/app/components/shadcn/dialog.rb +180 -0
  61. data/app/components/shadcn/direction_provider.rb +18 -0
  62. data/app/components/shadcn/drawer.rb +150 -0
  63. data/app/components/shadcn/dropdown_menu.rb +242 -0
  64. data/app/components/shadcn/empty.rb +40 -0
  65. data/app/components/shadcn/field.rb +106 -0
  66. data/app/components/shadcn/floating_position_options.rb +132 -0
  67. data/app/components/shadcn/form.rb +105 -0
  68. data/app/components/shadcn/hover_card.rb +66 -0
  69. data/app/components/shadcn/input.rb +13 -0
  70. data/app/components/shadcn/input_group/button.rb +48 -0
  71. data/app/components/shadcn/input_group.rb +51 -0
  72. data/app/components/shadcn/input_otp.rb +265 -0
  73. data/app/components/shadcn/item.rb +108 -0
  74. data/app/components/shadcn/kbd.rb +9 -0
  75. data/app/components/shadcn/label.rb +12 -0
  76. data/app/components/shadcn/marker.rb +37 -0
  77. data/app/components/shadcn/menubar.rb +110 -0
  78. data/app/components/shadcn/message.rb +29 -0
  79. data/app/components/shadcn/message_scroller.rb +52 -0
  80. data/app/components/shadcn/native_checked_state.rb +74 -0
  81. data/app/components/shadcn/native_select.rb +78 -0
  82. data/app/components/shadcn/navigation_menu.rb +122 -0
  83. data/app/components/shadcn/pagination.rb +160 -0
  84. data/app/components/shadcn/popover.rb +68 -0
  85. data/app/components/shadcn/preview_base.rb +107 -0
  86. data/app/components/shadcn/progress.rb +49 -0
  87. data/app/components/shadcn/radio_group.rb +74 -0
  88. data/app/components/shadcn/resizable.rb +77 -0
  89. data/app/components/shadcn/scroll_area.rb +59 -0
  90. data/app/components/shadcn/select.rb +356 -0
  91. data/app/components/shadcn/separator.rb +42 -0
  92. data/app/components/shadcn/sheet.rb +157 -0
  93. data/app/components/shadcn/sidebar.rb +332 -0
  94. data/app/components/shadcn/skeleton.rb +13 -0
  95. data/app/components/shadcn/slider.rb +279 -0
  96. data/app/components/shadcn/sonner.rb +30 -0
  97. data/app/components/shadcn/spinner.rb +32 -0
  98. data/app/components/shadcn/switch.rb +79 -0
  99. data/app/components/shadcn/table.rb +46 -0
  100. data/app/components/shadcn/tabs.rb +119 -0
  101. data/app/components/shadcn/textarea.rb +7 -0
  102. data/app/components/shadcn/toggle.rb +66 -0
  103. data/app/components/shadcn/toggle_group.rb +127 -0
  104. data/app/components/shadcn/tooltip.rb +74 -0
  105. data/config/importmap.rb +5 -0
  106. data/lib/generators/shadcn_view_components/install_generator.rb +182 -0
  107. data/lib/shadcn_view_components/classes.rb +89 -0
  108. data/lib/shadcn_view_components/component_naming.rb +21 -0
  109. data/lib/shadcn_view_components/contracts/calendar.rb +95 -0
  110. data/lib/shadcn_view_components/engine.rb +56 -0
  111. data/lib/shadcn_view_components/generated/contracts/accordion.rb +112 -0
  112. data/lib/shadcn_view_components/generated/contracts/alert-dialog.rb +300 -0
  113. data/lib/shadcn_view_components/generated/contracts/alert.rb +104 -0
  114. data/lib/shadcn_view_components/generated/contracts/aspect-ratio.rb +34 -0
  115. data/lib/shadcn_view_components/generated/contracts/attachment.rb +224 -0
  116. data/lib/shadcn_view_components/generated/contracts/avatar.rb +149 -0
  117. data/lib/shadcn_view_components/generated/contracts/badge.rb +39 -0
  118. data/lib/shadcn_view_components/generated/contracts/breadcrumb.rb +172 -0
  119. data/lib/shadcn_view_components/generated/contracts/bubble.rb +112 -0
  120. data/lib/shadcn_view_components/generated/contracts/button-group.rb +81 -0
  121. data/lib/shadcn_view_components/generated/contracts/button.rb +81 -0
  122. data/lib/shadcn_view_components/generated/contracts/card.rb +172 -0
  123. data/lib/shadcn_view_components/generated/contracts/carousel.rb +133 -0
  124. data/lib/shadcn_view_components/generated/contracts/chart.rb +109 -0
  125. data/lib/shadcn_view_components/generated/contracts/checkbox.rb +35 -0
  126. data/lib/shadcn_view_components/generated/contracts/collapsible.rb +89 -0
  127. data/lib/shadcn_view_components/generated/contracts/combobox.rb +368 -0
  128. data/lib/shadcn_view_components/generated/contracts/command.rb +222 -0
  129. data/lib/shadcn_view_components/generated/contracts/context-menu.rb +378 -0
  130. data/lib/shadcn_view_components/generated/contracts/dialog.rb +258 -0
  131. data/lib/shadcn_view_components/generated/contracts/direction.rb +34 -0
  132. data/lib/shadcn_view_components/generated/contracts/drawer.rb +280 -0
  133. data/lib/shadcn_view_components/generated/contracts/dropdown-menu.rb +380 -0
  134. data/lib/shadcn_view_components/generated/contracts/empty.rb +150 -0
  135. data/lib/shadcn_view_components/generated/contracts/field.rb +244 -0
  136. data/lib/shadcn_view_components/generated/contracts/form.rb +62 -0
  137. data/lib/shadcn_view_components/generated/contracts/hover-card.rb +90 -0
  138. data/lib/shadcn_view_components/generated/contracts/input-group.rb +155 -0
  139. data/lib/shadcn_view_components/generated/contracts/input-otp.rb +106 -0
  140. data/lib/shadcn_view_components/generated/contracts/input.rb +34 -0
  141. data/lib/shadcn_view_components/generated/contracts/item.rb +251 -0
  142. data/lib/shadcn_view_components/generated/contracts/kbd.rb +57 -0
  143. data/lib/shadcn_view_components/generated/contracts/label.rb +34 -0
  144. data/lib/shadcn_view_components/generated/contracts/marker.rb +82 -0
  145. data/lib/shadcn_view_components/generated/contracts/menubar.rb +394 -0
  146. data/lib/shadcn_view_components/generated/contracts/message-scroller.rb +149 -0
  147. data/lib/shadcn_view_components/generated/contracts/message.rb +149 -0
  148. data/lib/shadcn_view_components/generated/contracts/native-select.rb +82 -0
  149. data/lib/shadcn_view_components/generated/contracts/navigation-menu.rb +195 -0
  150. data/lib/shadcn_view_components/generated/contracts/pagination.rb +176 -0
  151. data/lib/shadcn_view_components/generated/contracts/popover.rb +159 -0
  152. data/lib/shadcn_view_components/generated/contracts/progress.rb +126 -0
  153. data/lib/shadcn_view_components/generated/contracts/radio-group.rb +58 -0
  154. data/lib/shadcn_view_components/generated/contracts/resizable.rb +85 -0
  155. data/lib/shadcn_view_components/generated/contracts/scroll-area.rb +59 -0
  156. data/lib/shadcn_view_components/generated/contracts/select.rb +245 -0
  157. data/lib/shadcn_view_components/generated/contracts/separator.rb +34 -0
  158. data/lib/shadcn_view_components/generated/contracts/sheet.rb +209 -0
  159. data/lib/shadcn_view_components/generated/contracts/sidebar.rb +558 -0
  160. data/lib/shadcn_view_components/generated/contracts/skeleton.rb +34 -0
  161. data/lib/shadcn_view_components/generated/contracts/slider.rb +38 -0
  162. data/lib/shadcn_view_components/generated/contracts/sonner.rb +36 -0
  163. data/lib/shadcn_view_components/generated/contracts/spinner.rb +34 -0
  164. data/lib/shadcn_view_components/generated/contracts/switch.rb +35 -0
  165. data/lib/shadcn_view_components/generated/contracts/table.rb +199 -0
  166. data/lib/shadcn_view_components/generated/contracts/tabs.rb +104 -0
  167. data/lib/shadcn_view_components/generated/contracts/textarea.rb +34 -0
  168. data/lib/shadcn_view_components/generated/contracts/toggle-group.rb +62 -0
  169. data/lib/shadcn_view_components/generated/contracts/toggle.rb +39 -0
  170. data/lib/shadcn_view_components/generated/contracts/tooltip.rb +116 -0
  171. data/lib/shadcn_view_components/numeric_property_validation.rb +124 -0
  172. data/lib/shadcn_view_components/property_contract_definitions.rb +92 -0
  173. data/lib/shadcn_view_components/property_contracts.rb +42 -0
  174. data/lib/shadcn_view_components/property_validation.rb +55 -0
  175. data/lib/shadcn_view_components/version.rb +6 -0
  176. data/lib/shadcn_view_components.rb +21 -0
  177. metadata +446 -0
@@ -0,0 +1,280 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "drawer" (item sha256: 09b645c190a3211de9b2161d60621bb62644c0a9849cf30ce45b1d902f307298)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Drawer
11
+ ROOT_SLOT = T.let("", 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
+ {} => ""
20
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
21
+
22
+ SLOTS = T.let([
23
+ { name: "", tag: "DrawerContext.Provider", static_attributes: {}.freeze, dynamic_attributes: ["value"].freeze }.freeze,
24
+ { name: "drawer", tag: "DrawerPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: ["modal", "snapPoints", "swipeDirection"].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
+ module Close
34
+ ROOT_SLOT = T.let("drawer-close", String)
35
+
36
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
37
+ CLASSES_SLOT = T.let("", String)
38
+
39
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
40
+
41
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
42
+
43
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
44
+ COMBINATIONS = T.let({
45
+ {} => ""
46
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
47
+
48
+ SLOTS = T.let([
49
+ { name: "drawer-close", tag: "DrawerPrimitive.Close", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
50
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
51
+
52
+ extend T::Sig
53
+
54
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
55
+ module_function def combination(options)
56
+ COMBINATIONS.fetch(options)
57
+ end
58
+ end
59
+ module Content
60
+ ROOT_SLOT = T.let("drawer-portal", String)
61
+
62
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
63
+ CLASSES_SLOT = T.let("drawer-popup", String)
64
+
65
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
66
+
67
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
68
+
69
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
70
+ COMBINATIONS = T.let({
71
+ {} => "group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95 after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full [--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem] [--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05] data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height) data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))] data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))] data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))] data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]"
72
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
73
+
74
+ SLOTS = T.let([
75
+ { name: "drawer-portal", tag: "DrawerPortal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
76
+ { name: "drawer-viewport", tag: "DrawerPrimitive.Viewport", static_attributes: { class: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto" }.freeze, dynamic_attributes: ["data-modal"].freeze }.freeze,
77
+ { name: "drawer-popup", tag: "DrawerPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: ["data-snap-points", "data-swipe-axis"].freeze }.freeze,
78
+ { name: "drawer-content", tag: "DrawerPrimitive.Content", static_attributes: { class: "flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none" }.freeze, dynamic_attributes: [].freeze }.freeze
79
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
80
+
81
+ extend T::Sig
82
+
83
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
84
+ module_function def combination(options)
85
+ COMBINATIONS.fetch(options)
86
+ end
87
+ end
88
+ module Description
89
+ ROOT_SLOT = T.let("drawer-description", String)
90
+
91
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
92
+
93
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
94
+
95
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
96
+ COMBINATIONS = T.let({
97
+ {} => "text-sm text-balance text-muted-foreground"
98
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
99
+
100
+ SLOTS = T.let([
101
+ { name: "drawer-description", tag: "DrawerPrimitive.Description", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
102
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
103
+
104
+ extend T::Sig
105
+
106
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
107
+ module_function def combination(options)
108
+ COMBINATIONS.fetch(options)
109
+ end
110
+ end
111
+ module Footer
112
+ ROOT_SLOT = T.let("drawer-footer", String)
113
+
114
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
115
+
116
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
117
+
118
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
119
+ COMBINATIONS = T.let({
120
+ {} => "mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0"
121
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
122
+
123
+ SLOTS = T.let([
124
+ { name: "drawer-footer", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
125
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
126
+
127
+ extend T::Sig
128
+
129
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
130
+ module_function def combination(options)
131
+ COMBINATIONS.fetch(options)
132
+ end
133
+ end
134
+ module Header
135
+ ROOT_SLOT = T.let("drawer-header", String)
136
+
137
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
138
+
139
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
140
+
141
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
142
+ COMBINATIONS = T.let({
143
+ {} => "flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left"
144
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
145
+
146
+ SLOTS = T.let([
147
+ { name: "drawer-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
148
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
149
+
150
+ extend T::Sig
151
+
152
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
153
+ module_function def combination(options)
154
+ COMBINATIONS.fetch(options)
155
+ end
156
+ end
157
+ module Overlay
158
+ ROOT_SLOT = T.let("drawer-overlay", String)
159
+
160
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
161
+
162
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
163
+
164
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
165
+ COMBINATIONS = T.let({
166
+ {} => "fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute"
167
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
168
+
169
+ SLOTS = T.let([
170
+ { name: "drawer-overlay", tag: "DrawerPrimitive.Backdrop", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
171
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
172
+
173
+ extend T::Sig
174
+
175
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
176
+ module_function def combination(options)
177
+ COMBINATIONS.fetch(options)
178
+ end
179
+ end
180
+ module Portal
181
+ ROOT_SLOT = T.let("drawer-portal", String)
182
+
183
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
184
+ CLASSES_SLOT = T.let("", String)
185
+
186
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
187
+
188
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
189
+
190
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
191
+ COMBINATIONS = T.let({
192
+ {} => ""
193
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
194
+
195
+ SLOTS = T.let([
196
+ { name: "drawer-portal", tag: "DrawerPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
197
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
198
+
199
+ extend T::Sig
200
+
201
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
202
+ module_function def combination(options)
203
+ COMBINATIONS.fetch(options)
204
+ end
205
+ end
206
+ module Title
207
+ ROOT_SLOT = T.let("drawer-title", String)
208
+
209
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
210
+
211
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
212
+
213
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
214
+ COMBINATIONS = T.let({
215
+ {} => "cn-font-heading text-base font-medium text-foreground"
216
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
217
+
218
+ SLOTS = T.let([
219
+ { name: "drawer-title", tag: "DrawerPrimitive.Title", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
220
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
221
+
222
+ extend T::Sig
223
+
224
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
225
+ module_function def combination(options)
226
+ COMBINATIONS.fetch(options)
227
+ end
228
+ end
229
+ module Trigger
230
+ ROOT_SLOT = T.let("drawer-trigger", String)
231
+
232
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
233
+ CLASSES_SLOT = T.let("", String)
234
+
235
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
236
+
237
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
238
+
239
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
240
+ COMBINATIONS = T.let({
241
+ {} => ""
242
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
243
+
244
+ SLOTS = T.let([
245
+ { name: "drawer-trigger", tag: "DrawerPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
246
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
247
+
248
+ extend T::Sig
249
+
250
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
251
+ module_function def combination(options)
252
+ COMBINATIONS.fetch(options)
253
+ end
254
+ end
255
+ end
256
+ module DrawerSwipeHandle
257
+ ROOT_SLOT = T.let("drawer-swipe-handle", String)
258
+
259
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
260
+
261
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
262
+
263
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
264
+ COMBINATIONS = T.let({
265
+ {} => "relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing"
266
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
267
+
268
+ SLOTS = T.let([
269
+ { name: "drawer-swipe-handle", tag: "div", static_attributes: { "aria-hidden" => "true" }.freeze, dynamic_attributes: [].freeze }.freeze
270
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
271
+
272
+ extend T::Sig
273
+
274
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
275
+ module_function def combination(options)
276
+ COMBINATIONS.fetch(options)
277
+ end
278
+ end
279
+ end
280
+ end
@@ -0,0 +1,380 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "dropdown-menu" (item sha256: 1904bd0ff0fe2e5bbfacf83b5b31d580e88eca799b8445cadae779cbabec1edd)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module DropdownMenu
11
+ ROOT_SLOT = T.let("dropdown-menu", String)
12
+
13
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
14
+ CLASSES_SLOT = T.let("", String)
15
+
16
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
17
+
18
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
19
+
20
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
21
+ COMBINATIONS = T.let({
22
+ {} => ""
23
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
24
+
25
+ SLOTS = T.let([
26
+ { name: "dropdown-menu", tag: "MenuPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
27
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
28
+
29
+ extend T::Sig
30
+
31
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
32
+ module_function def combination(options)
33
+ COMBINATIONS.fetch(options)
34
+ end
35
+ module CheckboxItem
36
+ ROOT_SLOT = T.let("dropdown-menu-checkbox-item", String)
37
+
38
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
39
+
40
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
41
+
42
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
43
+ COMBINATIONS = T.let({
44
+ {} => "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
45
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
46
+
47
+ SLOTS = T.let([
48
+ { name: "dropdown-menu-checkbox-item", tag: "MenuPrimitive.CheckboxItem", static_attributes: {}.freeze, dynamic_attributes: ["checked", "data-inset"].freeze }.freeze,
49
+ { name: "dropdown-menu-checkbox-item-indicator", tag: "span", static_attributes: { class: "pointer-events-none absolute right-2 flex items-center justify-center" }.freeze, dynamic_attributes: [].freeze }.freeze
50
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
51
+
52
+ extend T::Sig
53
+
54
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
55
+ module_function def combination(options)
56
+ COMBINATIONS.fetch(options)
57
+ end
58
+ end
59
+ module Content
60
+ ROOT_SLOT = T.let("", String)
61
+
62
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
63
+ CLASSES_SLOT = T.let("dropdown-menu-content", String)
64
+
65
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
66
+
67
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
68
+
69
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
70
+ COMBINATIONS = T.let({
71
+ {} => "cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95"
72
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
73
+
74
+ SLOTS = T.let([
75
+ { name: "", tag: "MenuPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
76
+ { name: "dropdown-menu-content", tag: "MenuPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
77
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
78
+
79
+ extend T::Sig
80
+
81
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
82
+ module_function def combination(options)
83
+ COMBINATIONS.fetch(options)
84
+ end
85
+ end
86
+ module Group
87
+ ROOT_SLOT = T.let("dropdown-menu-group", String)
88
+
89
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
90
+ CLASSES_SLOT = T.let("", String)
91
+
92
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
93
+
94
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
95
+
96
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
97
+ COMBINATIONS = T.let({
98
+ {} => ""
99
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
100
+
101
+ SLOTS = T.let([
102
+ { name: "dropdown-menu-group", tag: "MenuPrimitive.Group", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
103
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
104
+
105
+ extend T::Sig
106
+
107
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
108
+ module_function def combination(options)
109
+ COMBINATIONS.fetch(options)
110
+ end
111
+ end
112
+ module Item
113
+ ROOT_SLOT = T.let("dropdown-menu-item", String)
114
+
115
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
116
+
117
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
118
+
119
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
120
+ COMBINATIONS = T.let({
121
+ {} => "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive"
122
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
123
+
124
+ SLOTS = T.let([
125
+ { name: "dropdown-menu-item", tag: "MenuPrimitive.Item", static_attributes: {}.freeze, dynamic_attributes: ["data-inset", "data-variant"].freeze }.freeze
126
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
127
+
128
+ extend T::Sig
129
+
130
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
131
+ module_function def combination(options)
132
+ COMBINATIONS.fetch(options)
133
+ end
134
+ end
135
+ module Label
136
+ ROOT_SLOT = T.let("dropdown-menu-label", String)
137
+
138
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
139
+
140
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
141
+
142
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
143
+ COMBINATIONS = T.let({
144
+ {} => "px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7"
145
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
146
+
147
+ SLOTS = T.let([
148
+ { name: "dropdown-menu-label", tag: "MenuPrimitive.GroupLabel", static_attributes: {}.freeze, dynamic_attributes: ["data-inset"].freeze }.freeze
149
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
150
+
151
+ extend T::Sig
152
+
153
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
154
+ module_function def combination(options)
155
+ COMBINATIONS.fetch(options)
156
+ end
157
+ end
158
+ module Portal
159
+ ROOT_SLOT = T.let("dropdown-menu-portal", String)
160
+
161
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
162
+ CLASSES_SLOT = T.let("", String)
163
+
164
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
165
+
166
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
167
+
168
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
169
+ COMBINATIONS = T.let({
170
+ {} => ""
171
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
172
+
173
+ SLOTS = T.let([
174
+ { name: "dropdown-menu-portal", tag: "MenuPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
175
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
176
+
177
+ extend T::Sig
178
+
179
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
180
+ module_function def combination(options)
181
+ COMBINATIONS.fetch(options)
182
+ end
183
+ end
184
+ module RadioGroup
185
+ ROOT_SLOT = T.let("dropdown-menu-radio-group", String)
186
+
187
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
188
+ CLASSES_SLOT = T.let("", String)
189
+
190
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
191
+
192
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
193
+
194
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
195
+ COMBINATIONS = T.let({
196
+ {} => ""
197
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
198
+
199
+ SLOTS = T.let([
200
+ { name: "dropdown-menu-radio-group", tag: "MenuPrimitive.RadioGroup", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
201
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
202
+
203
+ extend T::Sig
204
+
205
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
206
+ module_function def combination(options)
207
+ COMBINATIONS.fetch(options)
208
+ end
209
+ end
210
+ module RadioItem
211
+ ROOT_SLOT = T.let("dropdown-menu-radio-item", String)
212
+
213
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
214
+
215
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
216
+
217
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
218
+ COMBINATIONS = T.let({
219
+ {} => "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
220
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
221
+
222
+ SLOTS = T.let([
223
+ { name: "dropdown-menu-radio-item", tag: "MenuPrimitive.RadioItem", static_attributes: {}.freeze, dynamic_attributes: ["data-inset"].freeze }.freeze,
224
+ { name: "dropdown-menu-radio-item-indicator", tag: "span", static_attributes: { class: "pointer-events-none absolute right-2 flex items-center justify-center" }.freeze, dynamic_attributes: [].freeze }.freeze
225
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
226
+
227
+ extend T::Sig
228
+
229
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
230
+ module_function def combination(options)
231
+ COMBINATIONS.fetch(options)
232
+ end
233
+ end
234
+ module Separator
235
+ ROOT_SLOT = T.let("dropdown-menu-separator", String)
236
+
237
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
238
+
239
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
240
+
241
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
242
+ COMBINATIONS = T.let({
243
+ {} => "-mx-1 my-1 h-px bg-border"
244
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
245
+
246
+ SLOTS = T.let([
247
+ { name: "dropdown-menu-separator", tag: "MenuPrimitive.Separator", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
248
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
249
+
250
+ extend T::Sig
251
+
252
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
253
+ module_function def combination(options)
254
+ COMBINATIONS.fetch(options)
255
+ end
256
+ end
257
+ module Shortcut
258
+ ROOT_SLOT = T.let("dropdown-menu-shortcut", String)
259
+
260
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
261
+
262
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
263
+
264
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
265
+ COMBINATIONS = T.let({
266
+ {} => "ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground"
267
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
268
+
269
+ SLOTS = T.let([
270
+ { name: "dropdown-menu-shortcut", tag: "span", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
271
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
272
+
273
+ extend T::Sig
274
+
275
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
276
+ module_function def combination(options)
277
+ COMBINATIONS.fetch(options)
278
+ end
279
+ end
280
+ module Sub
281
+ ROOT_SLOT = T.let("dropdown-menu-sub", String)
282
+
283
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
284
+ CLASSES_SLOT = T.let("", String)
285
+
286
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
287
+
288
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
289
+
290
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
291
+ COMBINATIONS = T.let({
292
+ {} => ""
293
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
294
+
295
+ SLOTS = T.let([
296
+ { name: "dropdown-menu-sub", tag: "MenuPrimitive.SubmenuRoot", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
297
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
298
+
299
+ extend T::Sig
300
+
301
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
302
+ module_function def combination(options)
303
+ COMBINATIONS.fetch(options)
304
+ end
305
+ end
306
+ module SubContent
307
+ ROOT_SLOT = T.let("dropdown-menu-sub-content", String)
308
+
309
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
310
+
311
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
312
+
313
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
314
+ COMBINATIONS = T.let({
315
+ {} => "cn-menu-target cn-menu-translucent w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95"
316
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
317
+
318
+ SLOTS = T.let([
319
+ { name: "dropdown-menu-sub-content", tag: "DropdownMenuContent", static_attributes: {}.freeze, dynamic_attributes: ["align", "alignOffset", "side", "sideOffset"].freeze }.freeze
320
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
321
+
322
+ extend T::Sig
323
+
324
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
325
+ module_function def combination(options)
326
+ COMBINATIONS.fetch(options)
327
+ end
328
+ end
329
+ module SubTrigger
330
+ ROOT_SLOT = T.let("dropdown-menu-sub-trigger", String)
331
+
332
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
333
+
334
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
335
+
336
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
337
+ COMBINATIONS = T.let({
338
+ {} => "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
339
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
340
+
341
+ SLOTS = T.let([
342
+ { name: "dropdown-menu-sub-trigger", tag: "MenuPrimitive.SubmenuTrigger", static_attributes: {}.freeze, dynamic_attributes: ["data-inset"].freeze }.freeze
343
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
344
+
345
+ extend T::Sig
346
+
347
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
348
+ module_function def combination(options)
349
+ COMBINATIONS.fetch(options)
350
+ end
351
+ end
352
+ module Trigger
353
+ ROOT_SLOT = T.let("dropdown-menu-trigger", String)
354
+
355
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
356
+ CLASSES_SLOT = T.let("", String)
357
+
358
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
359
+
360
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
361
+
362
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
363
+ COMBINATIONS = T.let({
364
+ {} => ""
365
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
366
+
367
+ SLOTS = T.let([
368
+ { name: "dropdown-menu-trigger", tag: "MenuPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
369
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
370
+
371
+ extend T::Sig
372
+
373
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
374
+ module_function def combination(options)
375
+ COMBINATIONS.fetch(options)
376
+ end
377
+ end
378
+ end
379
+ end
380
+ end