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,245 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "select" (item sha256: a3f9e9486195651b70fa500361c9d61d839a3fe4d650ffdda2f7e2ce1c03b780)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Select
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: "SelectPrimitive.Root", 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
+ module Content
33
+ ROOT_SLOT = T.let("", String)
34
+
35
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
36
+ CLASSES_SLOT = T.let("select-content", 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
+ {} => "cn-menu-target cn-menu-translucent relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-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:fade-out-0 data-closed:zoom-out-95"
45
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
46
+
47
+ SLOTS = T.let([
48
+ { name: "", tag: "SelectPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
49
+ { name: "select-content", tag: "SelectPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: ["data-align-trigger"].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 Group
60
+ ROOT_SLOT = T.let("select-group", String)
61
+
62
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
63
+
64
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
65
+
66
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
67
+ COMBINATIONS = T.let({
68
+ {} => "scroll-my-1 p-1"
69
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
70
+
71
+ SLOTS = T.let([
72
+ { name: "select-group", tag: "SelectPrimitive.Group", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
73
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
74
+
75
+ extend T::Sig
76
+
77
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
78
+ module_function def combination(options)
79
+ COMBINATIONS.fetch(options)
80
+ end
81
+ end
82
+ module Item
83
+ ROOT_SLOT = T.let("select-item", String)
84
+
85
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
86
+
87
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
88
+
89
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
90
+ COMBINATIONS = T.let({
91
+ {} => "relative flex w-full 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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2"
92
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
93
+
94
+ SLOTS = T.let([
95
+ { name: "select-item", tag: "SelectPrimitive.Item", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
96
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
97
+
98
+ extend T::Sig
99
+
100
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
101
+ module_function def combination(options)
102
+ COMBINATIONS.fetch(options)
103
+ end
104
+ end
105
+ module Label
106
+ ROOT_SLOT = T.let("select-label", String)
107
+
108
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
109
+
110
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
111
+
112
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
113
+ COMBINATIONS = T.let({
114
+ {} => "px-1.5 py-1 text-xs text-muted-foreground"
115
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
116
+
117
+ SLOTS = T.let([
118
+ { name: "select-label", tag: "SelectPrimitive.GroupLabel", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
119
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
120
+
121
+ extend T::Sig
122
+
123
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
124
+ module_function def combination(options)
125
+ COMBINATIONS.fetch(options)
126
+ end
127
+ end
128
+ module ScrollDownButton
129
+ ROOT_SLOT = T.let("select-scroll-down-button", String)
130
+
131
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
132
+
133
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
134
+
135
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
136
+ COMBINATIONS = T.let({
137
+ {} => "bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4"
138
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
139
+
140
+ SLOTS = T.let([
141
+ { name: "select-scroll-down-button", tag: "SelectPrimitive.ScrollDownArrow", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
142
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
143
+
144
+ extend T::Sig
145
+
146
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
147
+ module_function def combination(options)
148
+ COMBINATIONS.fetch(options)
149
+ end
150
+ end
151
+ module ScrollUpButton
152
+ ROOT_SLOT = T.let("select-scroll-up-button", String)
153
+
154
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
155
+
156
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
157
+
158
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
159
+ COMBINATIONS = T.let({
160
+ {} => "top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4"
161
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
162
+
163
+ SLOTS = T.let([
164
+ { name: "select-scroll-up-button", tag: "SelectPrimitive.ScrollUpArrow", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
165
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
166
+
167
+ extend T::Sig
168
+
169
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
170
+ module_function def combination(options)
171
+ COMBINATIONS.fetch(options)
172
+ end
173
+ end
174
+ module Separator
175
+ ROOT_SLOT = T.let("select-separator", String)
176
+
177
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
178
+
179
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
180
+
181
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
182
+ COMBINATIONS = T.let({
183
+ {} => "pointer-events-none -mx-1 my-1 h-px bg-border"
184
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
185
+
186
+ SLOTS = T.let([
187
+ { name: "select-separator", tag: "SelectPrimitive.Separator", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
188
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
189
+
190
+ extend T::Sig
191
+
192
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
193
+ module_function def combination(options)
194
+ COMBINATIONS.fetch(options)
195
+ end
196
+ end
197
+ module Trigger
198
+ ROOT_SLOT = T.let("select-trigger", String)
199
+
200
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
201
+
202
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
203
+
204
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
205
+ COMBINATIONS = T.let({
206
+ {} => "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
207
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
208
+
209
+ SLOTS = T.let([
210
+ { name: "select-trigger", tag: "SelectPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: ["data-size"].freeze }.freeze
211
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
212
+
213
+ extend T::Sig
214
+
215
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
216
+ module_function def combination(options)
217
+ COMBINATIONS.fetch(options)
218
+ end
219
+ end
220
+ module Value
221
+ ROOT_SLOT = T.let("select-value", String)
222
+
223
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
224
+
225
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
226
+
227
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
228
+ COMBINATIONS = T.let({
229
+ {} => "flex flex-1 text-left"
230
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
231
+
232
+ SLOTS = T.let([
233
+ { name: "select-value", tag: "SelectPrimitive.Value", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
234
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
235
+
236
+ extend T::Sig
237
+
238
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
239
+ module_function def combination(options)
240
+ COMBINATIONS.fetch(options)
241
+ end
242
+ end
243
+ end
244
+ end
245
+ 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 "separator" (item sha256: 622a7a1ae42cc52999b23db02943dbc52311efb07527f45d54784eec7af3945b)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Separator
11
+ ROOT_SLOT = T.let("separator", 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
+ {} => "shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch"
20
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
21
+
22
+ SLOTS = T.let([
23
+ { name: "separator", tag: "SeparatorPrimitive", static_attributes: {}.freeze, dynamic_attributes: ["orientation"].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,209 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "sheet" (item sha256: 32f0d7cd47932e1b3f44abffa9d2aad4d0e7eded0ab109c5b4f4e45150f59585)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Sheet
11
+ ROOT_SLOT = T.let("sheet", 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: "sheet", tag: "SheetPrimitive.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 Close
36
+ ROOT_SLOT = T.let("sheet-close", String)
37
+
38
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
39
+ CLASSES_SLOT = T.let("", String)
40
+
41
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
42
+
43
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
44
+
45
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
46
+ COMBINATIONS = T.let({
47
+ {} => ""
48
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
49
+
50
+ SLOTS = T.let([
51
+ { name: "sheet-close", tag: "SheetPrimitive.Close", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
52
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
53
+
54
+ extend T::Sig
55
+
56
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
57
+ module_function def combination(options)
58
+ COMBINATIONS.fetch(options)
59
+ end
60
+ end
61
+ module Content
62
+ ROOT_SLOT = T.let("", String)
63
+
64
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
65
+ CLASSES_SLOT = T.let("sheet-content", String)
66
+
67
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
68
+
69
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
70
+
71
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
72
+ COMBINATIONS = T.let({
73
+ {} => "fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm"
74
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
75
+
76
+ SLOTS = T.let([
77
+ { name: "", tag: "SheetPortal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
78
+ { name: "sheet-content", tag: "SheetPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: ["data-side"].freeze }.freeze,
79
+ { name: "sheet-close", tag: "SheetPrimitive.Close", static_attributes: {}.freeze, dynamic_attributes: ["render"].freeze }.freeze
80
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
81
+
82
+ extend T::Sig
83
+
84
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
85
+ module_function def combination(options)
86
+ COMBINATIONS.fetch(options)
87
+ end
88
+ end
89
+ module Description
90
+ ROOT_SLOT = T.let("sheet-description", 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
+ {} => "text-sm text-muted-foreground"
99
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
100
+
101
+ SLOTS = T.let([
102
+ { name: "sheet-description", tag: "SheetPrimitive.Description", 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 Footer
113
+ ROOT_SLOT = T.let("sheet-footer", 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
+ {} => "mt-auto flex flex-col gap-2 p-4"
122
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
123
+
124
+ SLOTS = T.let([
125
+ { name: "sheet-footer", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].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 Header
136
+ ROOT_SLOT = T.let("sheet-header", 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
+ {} => "flex flex-col gap-0.5 p-4"
145
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
146
+
147
+ SLOTS = T.let([
148
+ { name: "sheet-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].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 Title
159
+ ROOT_SLOT = T.let("sheet-title", String)
160
+
161
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
162
+
163
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
164
+
165
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
166
+ COMBINATIONS = T.let({
167
+ {} => "cn-font-heading text-base font-medium text-foreground"
168
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
169
+
170
+ SLOTS = T.let([
171
+ { name: "sheet-title", tag: "SheetPrimitive.Title", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
172
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
173
+
174
+ extend T::Sig
175
+
176
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
177
+ module_function def combination(options)
178
+ COMBINATIONS.fetch(options)
179
+ end
180
+ end
181
+ module Trigger
182
+ ROOT_SLOT = T.let("sheet-trigger", String)
183
+
184
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
185
+ CLASSES_SLOT = T.let("", String)
186
+
187
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
188
+
189
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
190
+
191
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
192
+ COMBINATIONS = T.let({
193
+ {} => ""
194
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
195
+
196
+ SLOTS = T.let([
197
+ { name: "sheet-trigger", tag: "SheetPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
198
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
199
+
200
+ extend T::Sig
201
+
202
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
203
+ module_function def combination(options)
204
+ COMBINATIONS.fetch(options)
205
+ end
206
+ end
207
+ end
208
+ end
209
+ end