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,150 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "empty" (item sha256: cc4d405e4a6f626a0d3ff683edb5cf2d6c7855874fcef9e72750aaaa0b9f28d3)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Empty
11
+ ROOT_SLOT = T.let("empty", 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 w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance"
20
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
21
+
22
+ SLOTS = T.let([
23
+ { name: "empty", 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
+ module Content
33
+ ROOT_SLOT = T.let("empty-content", String)
34
+
35
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
36
+
37
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
38
+
39
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
40
+ COMBINATIONS = T.let({
41
+ {} => "flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance"
42
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
43
+
44
+ SLOTS = T.let([
45
+ { name: "empty-content", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
46
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
47
+
48
+ extend T::Sig
49
+
50
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
51
+ module_function def combination(options)
52
+ COMBINATIONS.fetch(options)
53
+ end
54
+ end
55
+ module Description
56
+ ROOT_SLOT = T.let("empty-description", String)
57
+
58
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
59
+
60
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
61
+
62
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
63
+ COMBINATIONS = T.let({
64
+ {} => "text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary"
65
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
66
+
67
+ SLOTS = T.let([
68
+ { name: "empty-description", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
69
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
70
+
71
+ extend T::Sig
72
+
73
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
74
+ module_function def combination(options)
75
+ COMBINATIONS.fetch(options)
76
+ end
77
+ end
78
+ module Header
79
+ ROOT_SLOT = T.let("empty-header", String)
80
+
81
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
82
+
83
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
84
+
85
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
86
+ COMBINATIONS = T.let({
87
+ {} => "flex max-w-sm flex-col items-center gap-2"
88
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
89
+
90
+ SLOTS = T.let([
91
+ { name: "empty-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
92
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
93
+
94
+ extend T::Sig
95
+
96
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
97
+ module_function def combination(options)
98
+ COMBINATIONS.fetch(options)
99
+ end
100
+ end
101
+ module Media
102
+ ROOT_SLOT = T.let("empty-icon", String)
103
+
104
+ DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
105
+
106
+ VARIANTS = T.let({ variant: [:default, :icon] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
107
+
108
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
109
+ COMBINATIONS = T.let({
110
+ { variant: :default } => "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-transparent",
111
+ { variant: :icon } => "mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
112
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
113
+
114
+ SLOTS = T.let([
115
+ { name: "empty-icon", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].freeze }.freeze
116
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
117
+
118
+ extend T::Sig
119
+
120
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
121
+ module_function def combination(options)
122
+ COMBINATIONS.fetch(options)
123
+ end
124
+ end
125
+ module Title
126
+ ROOT_SLOT = T.let("empty-title", String)
127
+
128
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
129
+
130
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
131
+
132
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
133
+ COMBINATIONS = T.let({
134
+ {} => "cn-font-heading text-sm font-medium tracking-tight"
135
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
136
+
137
+ SLOTS = T.let([
138
+ { name: "empty-title", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
139
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
140
+
141
+ extend T::Sig
142
+
143
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
144
+ module_function def combination(options)
145
+ COMBINATIONS.fetch(options)
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,244 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "field" (item sha256: 95e4aead3891cfe4c791d6f1a732bd1f8e5a1d9c2884992096d348abb7e71948)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Field
11
+ ROOT_SLOT = T.let("field", String)
12
+
13
+ DEFAULTS = T.let({ orientation: :vertical }.freeze, T::Hash[Symbol, Symbol])
14
+
15
+ VARIANTS = T.let({ orientation: [:horizontal, :responsive, :vertical] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
16
+
17
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
18
+ COMBINATIONS = T.let({
19
+ { orientation: :horizontal } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
20
+ { orientation: :responsive } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
21
+ { orientation: :vertical } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-col *:w-full [&>.sr-only]:w-auto"
22
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
23
+
24
+ SLOTS = T.let([
25
+ { name: "field", tag: "div", static_attributes: { role: "group" }.freeze, dynamic_attributes: ["data-orientation"].freeze }.freeze
26
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
27
+
28
+ extend T::Sig
29
+
30
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
31
+ module_function def combination(options)
32
+ COMBINATIONS.fetch(options)
33
+ end
34
+ module Content
35
+ ROOT_SLOT = T.let("field-content", String)
36
+
37
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
38
+
39
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
40
+
41
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
42
+ COMBINATIONS = T.let({
43
+ {} => "group/field-content flex flex-1 flex-col gap-0.5 leading-snug"
44
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
45
+
46
+ SLOTS = T.let([
47
+ { name: "field-content", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
48
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
49
+
50
+ extend T::Sig
51
+
52
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
53
+ module_function def combination(options)
54
+ COMBINATIONS.fetch(options)
55
+ end
56
+ end
57
+ module Description
58
+ ROOT_SLOT = T.let("field-description", String)
59
+
60
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
61
+
62
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
63
+
64
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
65
+ COMBINATIONS = T.let({
66
+ {} => "text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5 last:mt-0 nth-last-2:-mt-1 [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary"
67
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
68
+
69
+ SLOTS = T.let([
70
+ { name: "field-description", tag: "p", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
71
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
72
+
73
+ extend T::Sig
74
+
75
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
76
+ module_function def combination(options)
77
+ COMBINATIONS.fetch(options)
78
+ end
79
+ end
80
+ module Error
81
+ ROOT_SLOT = T.let("field-error", String)
82
+
83
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
84
+
85
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
86
+
87
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
88
+ COMBINATIONS = T.let({
89
+ {} => "text-sm font-normal text-destructive"
90
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
91
+
92
+ SLOTS = T.let([
93
+ { name: "field-error", tag: "div", static_attributes: { role: "alert" }.freeze, dynamic_attributes: [].freeze }.freeze
94
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
95
+
96
+ extend T::Sig
97
+
98
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
99
+ module_function def combination(options)
100
+ COMBINATIONS.fetch(options)
101
+ end
102
+ end
103
+ module Group
104
+ ROOT_SLOT = T.let("field-group", String)
105
+
106
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
107
+
108
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
109
+
110
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
111
+ COMBINATIONS = T.let({
112
+ {} => "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4"
113
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
114
+
115
+ SLOTS = T.let([
116
+ { name: "field-group", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
117
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
118
+
119
+ extend T::Sig
120
+
121
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
122
+ module_function def combination(options)
123
+ COMBINATIONS.fetch(options)
124
+ end
125
+ end
126
+ module Label
127
+ ROOT_SLOT = T.let("field-label", String)
128
+
129
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
130
+
131
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
132
+
133
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
134
+ COMBINATIONS = T.let({
135
+ {} => "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col"
136
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
137
+
138
+ SLOTS = T.let([
139
+ { name: "field-label", tag: "Label", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
140
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
141
+
142
+ extend T::Sig
143
+
144
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
145
+ module_function def combination(options)
146
+ COMBINATIONS.fetch(options)
147
+ end
148
+ end
149
+ module Legend
150
+ ROOT_SLOT = T.let("field-legend", String)
151
+
152
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
153
+
154
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
155
+
156
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
157
+ COMBINATIONS = T.let({
158
+ {} => "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base"
159
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
160
+
161
+ SLOTS = T.let([
162
+ { name: "field-legend", tag: "legend", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].freeze }.freeze
163
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
164
+
165
+ extend T::Sig
166
+
167
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
168
+ module_function def combination(options)
169
+ COMBINATIONS.fetch(options)
170
+ end
171
+ end
172
+ module Separator
173
+ ROOT_SLOT = T.let("field-separator", String)
174
+
175
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
176
+
177
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
178
+
179
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
180
+ COMBINATIONS = T.let({
181
+ {} => "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2"
182
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
183
+
184
+ SLOTS = T.let([
185
+ { name: "field-separator", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-content"].freeze }.freeze,
186
+ { name: "field-separator-content", tag: "span", static_attributes: { class: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground" }.freeze, dynamic_attributes: [].freeze }.freeze
187
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
188
+
189
+ extend T::Sig
190
+
191
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
192
+ module_function def combination(options)
193
+ COMBINATIONS.fetch(options)
194
+ end
195
+ end
196
+ module Set
197
+ ROOT_SLOT = T.let("field-set", String)
198
+
199
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
200
+
201
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
202
+
203
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
204
+ COMBINATIONS = T.let({
205
+ {} => "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3"
206
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
207
+
208
+ SLOTS = T.let([
209
+ { name: "field-set", tag: "fieldset", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
210
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
211
+
212
+ extend T::Sig
213
+
214
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
215
+ module_function def combination(options)
216
+ COMBINATIONS.fetch(options)
217
+ end
218
+ end
219
+ module Title
220
+ ROOT_SLOT = T.let("field-label", String)
221
+
222
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
223
+
224
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
225
+
226
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
227
+ COMBINATIONS = T.let({
228
+ {} => "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50"
229
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
230
+
231
+ SLOTS = T.let([
232
+ { name: "field-label", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
233
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
234
+
235
+ extend T::Sig
236
+
237
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
238
+ module_function def combination(options)
239
+ COMBINATIONS.fetch(options)
240
+ end
241
+ end
242
+ end
243
+ end
244
+ end
@@ -0,0 +1,62 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "form" (item sha256: 449d8b022868fff90102143dc84f1e551487aed8cd69847f8624c9730cf92c12)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Form
11
+ module Error
12
+ ROOT_SLOT = T.let("field-error", 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
+ {} => "text-sm font-normal text-destructive"
21
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
22
+
23
+ SLOTS = T.let([
24
+ { name: "field-error", tag: "div", static_attributes: { role: "alert" }.freeze, dynamic_attributes: [].freeze }.freeze,
25
+ { name: "", tag: "ul", static_attributes: { class: "ml-4 flex list-disc flex-col gap-1" }.freeze, dynamic_attributes: [].freeze }.freeze
26
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
27
+
28
+ extend T::Sig
29
+
30
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
31
+ module_function def combination(options)
32
+ COMBINATIONS.fetch(options)
33
+ end
34
+ end
35
+ module Item
36
+ ROOT_SLOT = T.let("field", String)
37
+
38
+ DEFAULTS = T.let({ orientation: :vertical }.freeze, T::Hash[Symbol, Symbol])
39
+
40
+ VARIANTS = T.let({ orientation: [:horizontal, :responsive, :vertical] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
41
+
42
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
43
+ COMBINATIONS = T.let({
44
+ { orientation: :horizontal } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
45
+ { orientation: :responsive } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
46
+ { orientation: :vertical } => "group/field flex w-full gap-2 data-[invalid=true]:text-destructive flex-col *:w-full [&>.sr-only]:w-auto"
47
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
48
+
49
+ SLOTS = T.let([
50
+ { name: "field", tag: "div", static_attributes: { role: "group" }.freeze, dynamic_attributes: ["data-invalid", "data-orientation"].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
+ end
61
+ end
62
+ end
@@ -0,0 +1,90 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "hover-card" (item sha256: 2ac3a753e0b083c0d5fadeabc294dd889b743925c7abd1c52971e527908fbdcc)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module HoverCard
11
+ ROOT_SLOT = T.let("hover-card", 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: "hover-card", tag: "PreviewCardPrimitive.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 Content
36
+ ROOT_SLOT = T.let("hover-card-portal", String)
37
+
38
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
39
+ CLASSES_SLOT = T.let("hover-card-content", 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
+ {} => "z-50 w-64 origin-(--transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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"
48
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
49
+
50
+ SLOTS = T.let([
51
+ { name: "hover-card-portal", tag: "PreviewCardPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
52
+ { name: "hover-card-content", tag: "PreviewCardPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
53
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
54
+
55
+ extend T::Sig
56
+
57
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
58
+ module_function def combination(options)
59
+ COMBINATIONS.fetch(options)
60
+ end
61
+ end
62
+ module Trigger
63
+ ROOT_SLOT = T.let("hover-card-trigger", String)
64
+
65
+ # 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
66
+ CLASSES_SLOT = T.let("", String)
67
+
68
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
69
+
70
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
71
+
72
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
73
+ COMBINATIONS = T.let({
74
+ {} => ""
75
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
76
+
77
+ SLOTS = T.let([
78
+ { name: "hover-card-trigger", tag: "PreviewCardPrimitive.Trigger", static_attributes: {}.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
+ end
89
+ end
90
+ end