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,149 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "avatar" (item sha256: d56a59eb6b929369da8c8303c20e87a4df17c54df04dbb263d983398c7de8cb0)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Avatar
11
+ ROOT_SLOT = T.let("avatar", 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
+ {} => "group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten"
20
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
21
+
22
+ SLOTS = T.let([
23
+ { name: "avatar", tag: "AvatarPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: ["data-size"].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 Badge
33
+ ROOT_SLOT = T.let("avatar-badge", 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
+ {} => "absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2 group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2"
42
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
43
+
44
+ SLOTS = T.let([
45
+ { name: "avatar-badge", tag: "span", 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 Fallback
56
+ ROOT_SLOT = T.let("avatar-fallback", 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
+ {} => "flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs"
65
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
66
+
67
+ SLOTS = T.let([
68
+ { name: "avatar-fallback", tag: "AvatarPrimitive.Fallback", 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 Group
79
+ ROOT_SLOT = T.let("avatar-group", 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
+ {} => "group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background"
88
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
89
+
90
+ SLOTS = T.let([
91
+ { name: "avatar-group", 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
+ module Count
101
+ ROOT_SLOT = T.let("avatar-group-count", String)
102
+
103
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
104
+
105
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
106
+
107
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
108
+ COMBINATIONS = T.let({
109
+ {} => "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3"
110
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
111
+
112
+ SLOTS = T.let([
113
+ { name: "avatar-group-count", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
114
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
115
+
116
+ extend T::Sig
117
+
118
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
119
+ module_function def combination(options)
120
+ COMBINATIONS.fetch(options)
121
+ end
122
+ end
123
+ end
124
+ module Image
125
+ ROOT_SLOT = T.let("avatar-image", String)
126
+
127
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
128
+
129
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
130
+
131
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
132
+ COMBINATIONS = T.let({
133
+ {} => "aspect-square size-full rounded-full object-cover"
134
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
135
+
136
+ SLOTS = T.let([
137
+ { name: "avatar-image", tag: "AvatarPrimitive.Image", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
138
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
139
+
140
+ extend T::Sig
141
+
142
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
143
+ module_function def combination(options)
144
+ COMBINATIONS.fetch(options)
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,39 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "badge" (item sha256: 09acaf7357a14ce7422f4bd786df48bb69630dad019d9e4bc56b684d55a6cf08)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Badge
11
+ ROOT_SLOT = T.let("badge", String)
12
+
13
+ DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
14
+
15
+ VARIANTS = T.let({ variant: [:default, :destructive, :ghost, :link, :outline, :secondary] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
16
+
17
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
18
+ COMBINATIONS = T.let({
19
+ { variant: :default } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! bg-primary text-primary-foreground [a]:hover:bg-primary/80",
20
+ { variant: :destructive } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
21
+ { variant: :ghost } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
22
+ { variant: :link } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! text-primary underline-offset-4 hover:underline",
23
+ { variant: :outline } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
24
+ { variant: :secondary } => "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3! bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80"
25
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
26
+
27
+ SLOTS = T.let([
28
+ { name: "badge", tag: "span", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].freeze }.freeze
29
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
30
+
31
+ extend T::Sig
32
+
33
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
34
+ module_function def combination(options)
35
+ COMBINATIONS.fetch(options)
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,172 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "breadcrumb" (item sha256: 96a1a8a86552a433d94581fbf6a87224a1db32da57007b7739d0bfe08bfaddbd)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Breadcrumb
11
+ ROOT_SLOT = T.let("breadcrumb", 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: "breadcrumb", tag: "nav", static_attributes: { "aria-label" => "breadcrumb" }.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 Ellipsis
33
+ ROOT_SLOT = T.let("breadcrumb-ellipsis", 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 size-5 items-center justify-center [&>svg]:size-4"
42
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
43
+
44
+ SLOTS = T.let([
45
+ { name: "breadcrumb-ellipsis", tag: "span", static_attributes: { "aria-hidden" => "true", role: "presentation" }.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 Item
56
+ ROOT_SLOT = T.let("breadcrumb-item", 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
+ {} => "inline-flex items-center gap-1"
65
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
66
+
67
+ SLOTS = T.let([
68
+ { name: "breadcrumb-item", tag: "li", 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 Link
79
+ ROOT_SLOT = T.let("breadcrumb-link", 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
+ {} => "transition-colors hover:text-foreground"
88
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
89
+
90
+ SLOTS = T.let([
91
+ { name: "breadcrumb-link", tag: "a", 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 List
102
+ ROOT_SLOT = T.let("breadcrumb-list", String)
103
+
104
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
105
+
106
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
107
+
108
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
109
+ COMBINATIONS = T.let({
110
+ {} => "flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground"
111
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
112
+
113
+ SLOTS = T.let([
114
+ { name: "breadcrumb-list", tag: "ol", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
115
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
116
+
117
+ extend T::Sig
118
+
119
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
120
+ module_function def combination(options)
121
+ COMBINATIONS.fetch(options)
122
+ end
123
+ end
124
+ module Page
125
+ ROOT_SLOT = T.let("breadcrumb-page", String)
126
+
127
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
128
+
129
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
130
+
131
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
132
+ COMBINATIONS = T.let({
133
+ {} => "font-normal text-foreground"
134
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
135
+
136
+ SLOTS = T.let([
137
+ { name: "breadcrumb-page", tag: "span", static_attributes: { "aria-current" => "page", "aria-disabled" => "true", role: "link" }.freeze, dynamic_attributes: [].freeze }.freeze
138
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
139
+
140
+ extend T::Sig
141
+
142
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
143
+ module_function def combination(options)
144
+ COMBINATIONS.fetch(options)
145
+ end
146
+ end
147
+ module Separator
148
+ ROOT_SLOT = T.let("breadcrumb-separator", String)
149
+
150
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
151
+
152
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
153
+
154
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
155
+ COMBINATIONS = T.let({
156
+ {} => "[&>svg]:size-3.5"
157
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
158
+
159
+ SLOTS = T.let([
160
+ { name: "breadcrumb-separator", tag: "li", static_attributes: { "aria-hidden" => "true", role: "presentation" }.freeze, dynamic_attributes: [].freeze }.freeze
161
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
162
+
163
+ extend T::Sig
164
+
165
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
166
+ module_function def combination(options)
167
+ COMBINATIONS.fetch(options)
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
@@ -0,0 +1,112 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "bubble" (item sha256: 87f543f90b32557f7c0d1b852d945b15f73fb936497ebeff26f4d75b0b0acac9)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module Bubble
11
+ ROOT_SLOT = T.let("bubble", String)
12
+
13
+ DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
14
+
15
+ VARIANTS = T.let({ variant: [:default, :destructive, :ghost, :muted, :outline, :secondary, :tinted] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
16
+
17
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
18
+ COMBINATIONS = T.let({
19
+ { variant: :default } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
20
+ { variant: :destructive } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
21
+ { variant: :ghost } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
22
+ { variant: :muted } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
23
+ { variant: :outline } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
24
+ { variant: :secondary } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
25
+ { variant: :tinted } => "group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full *:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]"
26
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
27
+
28
+ SLOTS = T.let([
29
+ { name: "bubble", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-align", "data-variant"].freeze }.freeze
30
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
31
+
32
+ extend T::Sig
33
+
34
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
35
+ module_function def combination(options)
36
+ COMBINATIONS.fetch(options)
37
+ end
38
+ module Content
39
+ ROOT_SLOT = T.let("bubble-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
+ {} => "w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50"
48
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
49
+
50
+ SLOTS = T.let([
51
+ { name: "bubble-content", tag: "div", 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 Group
62
+ ROOT_SLOT = T.let("bubble-group", String)
63
+
64
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
65
+
66
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
67
+
68
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
69
+ COMBINATIONS = T.let({
70
+ {} => "flex min-w-0 flex-col gap-2"
71
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
72
+
73
+ SLOTS = T.let([
74
+ { name: "bubble-group", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
75
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
76
+
77
+ extend T::Sig
78
+
79
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
80
+ module_function def combination(options)
81
+ COMBINATIONS.fetch(options)
82
+ end
83
+ end
84
+ module Reactions
85
+ ROOT_SLOT = T.let("bubble-reactions", String)
86
+
87
+ DEFAULTS = T.let({ align: :end, side: :bottom }.freeze, T::Hash[Symbol, Symbol])
88
+
89
+ VARIANTS = T.let({ align: [:end, :start], side: [:bottom, :top] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
90
+
91
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
92
+ COMBINATIONS = T.let({
93
+ { align: :end, side: :bottom } => "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0 bottom-0 translate-y-3/4 right-3",
94
+ { align: :end, side: :top } => "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0 top-0 -translate-y-3/4 right-3",
95
+ { align: :start, side: :bottom } => "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0 bottom-0 translate-y-3/4 left-3",
96
+ { align: :start, side: :top } => "absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0 top-0 -translate-y-3/4 left-3"
97
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
98
+
99
+ SLOTS = T.let([
100
+ { name: "bubble-reactions", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-align", "data-side"].freeze }.freeze
101
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
102
+
103
+ extend T::Sig
104
+
105
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
106
+ module_function def combination(options)
107
+ COMBINATIONS.fetch(options)
108
+ end
109
+ end
110
+ end
111
+ end
112
+ end
@@ -0,0 +1,81 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ # !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
5
+ # Source: shadcn/ui base-nova "button-group" (item sha256: d0e2b89590b3ddce4f4c03c62a5db62a6e430dc586b9b8ad9466fb06f6b2a5ab)
6
+ # Regenerate with: rake shadcn:generate
7
+
8
+ module ShadcnViewComponents
9
+ module Contracts
10
+ module ButtonGroup
11
+ ROOT_SLOT = T.let("button-group", String)
12
+
13
+ DEFAULTS = T.let({ orientation: :horizontal }.freeze, T::Hash[Symbol, Symbol])
14
+
15
+ VARIANTS = T.let({ orientation: [:horizontal, :vertical] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
16
+
17
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
18
+ COMBINATIONS = T.let({
19
+ { orientation: :horizontal } => "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 *:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
20
+ { orientation: :vertical } => "flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
21
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
22
+
23
+ SLOTS = T.let([
24
+ { name: "button-group", tag: "div", static_attributes: { role: "group" }.freeze, dynamic_attributes: ["data-orientation"].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 Separator
34
+ ROOT_SLOT = T.let("button-group-separator", String)
35
+
36
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
37
+
38
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
39
+
40
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
41
+ COMBINATIONS = T.let({
42
+ {} => "relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto"
43
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
44
+
45
+ SLOTS = T.let([
46
+ { name: "button-group-separator", tag: "Separator", static_attributes: {}.freeze, dynamic_attributes: ["orientation"].freeze }.freeze
47
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
48
+
49
+ extend T::Sig
50
+
51
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
52
+ module_function def combination(options)
53
+ COMBINATIONS.fetch(options)
54
+ end
55
+ end
56
+ module Text
57
+ ROOT_SLOT = T.let("button-group-text", String)
58
+
59
+ DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
60
+
61
+ VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
62
+
63
+ # キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
64
+ COMBINATIONS = T.let({
65
+ {} => "flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
66
+ }.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
67
+
68
+ SLOTS = T.let([
69
+ { name: "button-group-text", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
70
+ ].freeze, T::Array[T::Hash[Symbol, T.untyped]])
71
+
72
+ extend T::Sig
73
+
74
+ sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
75
+ module_function def combination(options)
76
+ COMBINATIONS.fetch(options)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end