shadcn_view_components 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +590 -0
- data/LICENSE +49 -0
- data/README.md +542 -0
- data/app/assets/javascripts/shadcn/aria_relationships.js +88 -0
- data/app/assets/javascripts/shadcn/controllers/accordion_controller.js +241 -0
- data/app/assets/javascripts/shadcn/controllers/calendar_controller.js +98 -0
- data/app/assets/javascripts/shadcn/controllers/carousel_controller.js +305 -0
- data/app/assets/javascripts/shadcn/controllers/checked_state_controller.js +121 -0
- data/app/assets/javascripts/shadcn/controllers/combobox_controller.js +613 -0
- data/app/assets/javascripts/shadcn/controllers/command_controller.js +87 -0
- data/app/assets/javascripts/shadcn/controllers/dialog_controller.js +208 -0
- data/app/assets/javascripts/shadcn/controllers/hover_card_controller.js +145 -0
- data/app/assets/javascripts/shadcn/controllers/input_otp_controller.js +416 -0
- data/app/assets/javascripts/shadcn/controllers/menu_controller.js +286 -0
- data/app/assets/javascripts/shadcn/controllers/menubar_controller.js +430 -0
- data/app/assets/javascripts/shadcn/controllers/message_scroller_controller.js +37 -0
- data/app/assets/javascripts/shadcn/controllers/navigation_menu_controller.js +254 -0
- data/app/assets/javascripts/shadcn/controllers/popover_controller.js +117 -0
- data/app/assets/javascripts/shadcn/controllers/resizable_controller.js +256 -0
- data/app/assets/javascripts/shadcn/controllers/select_controller.js +491 -0
- data/app/assets/javascripts/shadcn/controllers/sidebar_controller.js +30 -0
- data/app/assets/javascripts/shadcn/controllers/slider_controller.js +74 -0
- data/app/assets/javascripts/shadcn/controllers/tabs_controller.js +146 -0
- data/app/assets/javascripts/shadcn/controllers/toast_controller.js +81 -0
- data/app/assets/javascripts/shadcn/controllers/toggle_controller.js +21 -0
- data/app/assets/javascripts/shadcn/controllers/toggle_group_controller.js +37 -0
- data/app/assets/javascripts/shadcn/controllers/tooltip_controller.js +123 -0
- data/app/assets/javascripts/shadcn/floating_position.js +660 -0
- data/app/assets/javascripts/shadcn/hide_after_exit.js +53 -0
- data/app/assets/javascripts/shadcn/index.js +65 -0
- data/app/assets/javascripts/shadcn/menu_popover.js +352 -0
- data/app/assets/javascripts/shadcn/package.json +17 -0
- data/app/assets/javascripts/shadcn/state_attrs.js +13 -0
- data/app/assets/stylesheets/shadcn/shadcn.css +766 -0
- data/app/assets/tailwind/shadcn_view_components/engine.css +11 -0
- data/app/components/shadcn/accordion.rb +121 -0
- data/app/components/shadcn/alert.rb +31 -0
- data/app/components/shadcn/alert_dialog.rb +165 -0
- data/app/components/shadcn/aspect_ratio.rb +34 -0
- data/app/components/shadcn/attachment.rb +86 -0
- data/app/components/shadcn/avatar.rb +55 -0
- data/app/components/shadcn/badge.rb +32 -0
- data/app/components/shadcn/base_component.rb +239 -0
- data/app/components/shadcn/breadcrumb.rb +70 -0
- data/app/components/shadcn/bubble.rb +48 -0
- data/app/components/shadcn/button.html.erb +1 -0
- data/app/components/shadcn/button.rb +41 -0
- data/app/components/shadcn/button_group.rb +41 -0
- data/app/components/shadcn/button_styled.rb +51 -0
- data/app/components/shadcn/calendar.rb +276 -0
- data/app/components/shadcn/card.rb +18 -0
- data/app/components/shadcn/carousel.rb +236 -0
- data/app/components/shadcn/chart.rb +57 -0
- data/app/components/shadcn/checkbox.rb +64 -0
- data/app/components/shadcn/collapsible.rb +25 -0
- data/app/components/shadcn/combobox.rb +552 -0
- data/app/components/shadcn/command.rb +149 -0
- data/app/components/shadcn/context_menu.rb +79 -0
- data/app/components/shadcn/dialog.rb +180 -0
- data/app/components/shadcn/direction_provider.rb +18 -0
- data/app/components/shadcn/drawer.rb +150 -0
- data/app/components/shadcn/dropdown_menu.rb +242 -0
- data/app/components/shadcn/empty.rb +40 -0
- data/app/components/shadcn/field.rb +106 -0
- data/app/components/shadcn/floating_position_options.rb +132 -0
- data/app/components/shadcn/form.rb +105 -0
- data/app/components/shadcn/hover_card.rb +66 -0
- data/app/components/shadcn/input.rb +13 -0
- data/app/components/shadcn/input_group/button.rb +48 -0
- data/app/components/shadcn/input_group.rb +51 -0
- data/app/components/shadcn/input_otp.rb +265 -0
- data/app/components/shadcn/item.rb +108 -0
- data/app/components/shadcn/kbd.rb +9 -0
- data/app/components/shadcn/label.rb +12 -0
- data/app/components/shadcn/marker.rb +37 -0
- data/app/components/shadcn/menubar.rb +110 -0
- data/app/components/shadcn/message.rb +29 -0
- data/app/components/shadcn/message_scroller.rb +52 -0
- data/app/components/shadcn/native_checked_state.rb +74 -0
- data/app/components/shadcn/native_select.rb +78 -0
- data/app/components/shadcn/navigation_menu.rb +122 -0
- data/app/components/shadcn/pagination.rb +160 -0
- data/app/components/shadcn/popover.rb +68 -0
- data/app/components/shadcn/preview_base.rb +107 -0
- data/app/components/shadcn/progress.rb +49 -0
- data/app/components/shadcn/radio_group.rb +74 -0
- data/app/components/shadcn/resizable.rb +77 -0
- data/app/components/shadcn/scroll_area.rb +59 -0
- data/app/components/shadcn/select.rb +356 -0
- data/app/components/shadcn/separator.rb +42 -0
- data/app/components/shadcn/sheet.rb +157 -0
- data/app/components/shadcn/sidebar.rb +332 -0
- data/app/components/shadcn/skeleton.rb +13 -0
- data/app/components/shadcn/slider.rb +279 -0
- data/app/components/shadcn/sonner.rb +30 -0
- data/app/components/shadcn/spinner.rb +32 -0
- data/app/components/shadcn/switch.rb +79 -0
- data/app/components/shadcn/table.rb +46 -0
- data/app/components/shadcn/tabs.rb +119 -0
- data/app/components/shadcn/textarea.rb +7 -0
- data/app/components/shadcn/toggle.rb +66 -0
- data/app/components/shadcn/toggle_group.rb +127 -0
- data/app/components/shadcn/tooltip.rb +74 -0
- data/config/importmap.rb +5 -0
- data/lib/generators/shadcn_view_components/install_generator.rb +182 -0
- data/lib/shadcn_view_components/classes.rb +89 -0
- data/lib/shadcn_view_components/component_naming.rb +21 -0
- data/lib/shadcn_view_components/contracts/calendar.rb +95 -0
- data/lib/shadcn_view_components/engine.rb +56 -0
- data/lib/shadcn_view_components/generated/contracts/accordion.rb +112 -0
- data/lib/shadcn_view_components/generated/contracts/alert-dialog.rb +300 -0
- data/lib/shadcn_view_components/generated/contracts/alert.rb +104 -0
- data/lib/shadcn_view_components/generated/contracts/aspect-ratio.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/attachment.rb +224 -0
- data/lib/shadcn_view_components/generated/contracts/avatar.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/badge.rb +39 -0
- data/lib/shadcn_view_components/generated/contracts/breadcrumb.rb +172 -0
- data/lib/shadcn_view_components/generated/contracts/bubble.rb +112 -0
- data/lib/shadcn_view_components/generated/contracts/button-group.rb +81 -0
- data/lib/shadcn_view_components/generated/contracts/button.rb +81 -0
- data/lib/shadcn_view_components/generated/contracts/card.rb +172 -0
- data/lib/shadcn_view_components/generated/contracts/carousel.rb +133 -0
- data/lib/shadcn_view_components/generated/contracts/chart.rb +109 -0
- data/lib/shadcn_view_components/generated/contracts/checkbox.rb +35 -0
- data/lib/shadcn_view_components/generated/contracts/collapsible.rb +89 -0
- data/lib/shadcn_view_components/generated/contracts/combobox.rb +368 -0
- data/lib/shadcn_view_components/generated/contracts/command.rb +222 -0
- data/lib/shadcn_view_components/generated/contracts/context-menu.rb +378 -0
- data/lib/shadcn_view_components/generated/contracts/dialog.rb +258 -0
- data/lib/shadcn_view_components/generated/contracts/direction.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/drawer.rb +280 -0
- data/lib/shadcn_view_components/generated/contracts/dropdown-menu.rb +380 -0
- data/lib/shadcn_view_components/generated/contracts/empty.rb +150 -0
- data/lib/shadcn_view_components/generated/contracts/field.rb +244 -0
- data/lib/shadcn_view_components/generated/contracts/form.rb +62 -0
- data/lib/shadcn_view_components/generated/contracts/hover-card.rb +90 -0
- data/lib/shadcn_view_components/generated/contracts/input-group.rb +155 -0
- data/lib/shadcn_view_components/generated/contracts/input-otp.rb +106 -0
- data/lib/shadcn_view_components/generated/contracts/input.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/item.rb +251 -0
- data/lib/shadcn_view_components/generated/contracts/kbd.rb +57 -0
- data/lib/shadcn_view_components/generated/contracts/label.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/marker.rb +82 -0
- data/lib/shadcn_view_components/generated/contracts/menubar.rb +394 -0
- data/lib/shadcn_view_components/generated/contracts/message-scroller.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/message.rb +149 -0
- data/lib/shadcn_view_components/generated/contracts/native-select.rb +82 -0
- data/lib/shadcn_view_components/generated/contracts/navigation-menu.rb +195 -0
- data/lib/shadcn_view_components/generated/contracts/pagination.rb +176 -0
- data/lib/shadcn_view_components/generated/contracts/popover.rb +159 -0
- data/lib/shadcn_view_components/generated/contracts/progress.rb +126 -0
- data/lib/shadcn_view_components/generated/contracts/radio-group.rb +58 -0
- data/lib/shadcn_view_components/generated/contracts/resizable.rb +85 -0
- data/lib/shadcn_view_components/generated/contracts/scroll-area.rb +59 -0
- data/lib/shadcn_view_components/generated/contracts/select.rb +245 -0
- data/lib/shadcn_view_components/generated/contracts/separator.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/sheet.rb +209 -0
- data/lib/shadcn_view_components/generated/contracts/sidebar.rb +558 -0
- data/lib/shadcn_view_components/generated/contracts/skeleton.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/slider.rb +38 -0
- data/lib/shadcn_view_components/generated/contracts/sonner.rb +36 -0
- data/lib/shadcn_view_components/generated/contracts/spinner.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/switch.rb +35 -0
- data/lib/shadcn_view_components/generated/contracts/table.rb +199 -0
- data/lib/shadcn_view_components/generated/contracts/tabs.rb +104 -0
- data/lib/shadcn_view_components/generated/contracts/textarea.rb +34 -0
- data/lib/shadcn_view_components/generated/contracts/toggle-group.rb +62 -0
- data/lib/shadcn_view_components/generated/contracts/toggle.rb +39 -0
- data/lib/shadcn_view_components/generated/contracts/tooltip.rb +116 -0
- data/lib/shadcn_view_components/numeric_property_validation.rb +124 -0
- data/lib/shadcn_view_components/property_contract_definitions.rb +92 -0
- data/lib/shadcn_view_components/property_contracts.rb +42 -0
- data/lib/shadcn_view_components/property_validation.rb +55 -0
- data/lib/shadcn_view_components/version.rb +6 -0
- data/lib/shadcn_view_components.rb +21 -0
- metadata +446 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "alert-dialog" (item sha256: 5b4d7d1abc8fee4066b42616bf1f640984d500d8edde391338e192e988a8d43d)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module AlertDialog
|
|
11
|
+
ROOT_SLOT = T.let("alert-dialog", 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: "alert-dialog", tag: "AlertDialogPrimitive.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 Action
|
|
36
|
+
ROOT_SLOT = T.let("alert-dialog-action", 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
|
+
{} => ""
|
|
45
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
46
|
+
|
|
47
|
+
SLOTS = T.let([
|
|
48
|
+
{ name: "alert-dialog-action", tag: "Button", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
49
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
50
|
+
|
|
51
|
+
extend T::Sig
|
|
52
|
+
|
|
53
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
54
|
+
module_function def combination(options)
|
|
55
|
+
COMBINATIONS.fetch(options)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
module Cancel
|
|
59
|
+
ROOT_SLOT = T.let("alert-dialog-cancel", String)
|
|
60
|
+
|
|
61
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
62
|
+
|
|
63
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
64
|
+
|
|
65
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
66
|
+
COMBINATIONS = T.let({
|
|
67
|
+
{} => ""
|
|
68
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
69
|
+
|
|
70
|
+
SLOTS = T.let([
|
|
71
|
+
{ name: "alert-dialog-cancel", tag: "AlertDialogPrimitive.Close", static_attributes: {}.freeze, dynamic_attributes: ["render"].freeze }.freeze
|
|
72
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
73
|
+
|
|
74
|
+
extend T::Sig
|
|
75
|
+
|
|
76
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
77
|
+
module_function def combination(options)
|
|
78
|
+
COMBINATIONS.fetch(options)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
module Content
|
|
82
|
+
ROOT_SLOT = T.let("", String)
|
|
83
|
+
|
|
84
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
85
|
+
CLASSES_SLOT = T.let("alert-dialog-content", String)
|
|
86
|
+
|
|
87
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
88
|
+
|
|
89
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
90
|
+
|
|
91
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
92
|
+
COMBINATIONS = T.let({
|
|
93
|
+
{} => "group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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"
|
|
94
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
95
|
+
|
|
96
|
+
SLOTS = T.let([
|
|
97
|
+
{ name: "", tag: "AlertDialogPortal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
98
|
+
{ name: "alert-dialog-content", tag: "AlertDialogPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: ["data-size"].freeze }.freeze
|
|
99
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
100
|
+
|
|
101
|
+
extend T::Sig
|
|
102
|
+
|
|
103
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
104
|
+
module_function def combination(options)
|
|
105
|
+
COMBINATIONS.fetch(options)
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
module Description
|
|
109
|
+
ROOT_SLOT = T.let("alert-dialog-description", String)
|
|
110
|
+
|
|
111
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
112
|
+
|
|
113
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
114
|
+
|
|
115
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
116
|
+
COMBINATIONS = T.let({
|
|
117
|
+
{} => "text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground"
|
|
118
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
119
|
+
|
|
120
|
+
SLOTS = T.let([
|
|
121
|
+
{ name: "alert-dialog-description", tag: "AlertDialogPrimitive.Description", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
122
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
123
|
+
|
|
124
|
+
extend T::Sig
|
|
125
|
+
|
|
126
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
127
|
+
module_function def combination(options)
|
|
128
|
+
COMBINATIONS.fetch(options)
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
module Footer
|
|
132
|
+
ROOT_SLOT = T.let("alert-dialog-footer", String)
|
|
133
|
+
|
|
134
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
135
|
+
|
|
136
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
137
|
+
|
|
138
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
139
|
+
COMBINATIONS = T.let({
|
|
140
|
+
{} => "-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end"
|
|
141
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
142
|
+
|
|
143
|
+
SLOTS = T.let([
|
|
144
|
+
{ name: "alert-dialog-footer", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
145
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
146
|
+
|
|
147
|
+
extend T::Sig
|
|
148
|
+
|
|
149
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
150
|
+
module_function def combination(options)
|
|
151
|
+
COMBINATIONS.fetch(options)
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
module Header
|
|
155
|
+
ROOT_SLOT = T.let("alert-dialog-header", String)
|
|
156
|
+
|
|
157
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
158
|
+
|
|
159
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
160
|
+
|
|
161
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
162
|
+
COMBINATIONS = T.let({
|
|
163
|
+
{} => "grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]"
|
|
164
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
165
|
+
|
|
166
|
+
SLOTS = T.let([
|
|
167
|
+
{ name: "alert-dialog-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
168
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
169
|
+
|
|
170
|
+
extend T::Sig
|
|
171
|
+
|
|
172
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
173
|
+
module_function def combination(options)
|
|
174
|
+
COMBINATIONS.fetch(options)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
module Media
|
|
178
|
+
ROOT_SLOT = T.let("alert-dialog-media", String)
|
|
179
|
+
|
|
180
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
181
|
+
|
|
182
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
183
|
+
|
|
184
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
185
|
+
COMBINATIONS = T.let({
|
|
186
|
+
{} => "mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6"
|
|
187
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
188
|
+
|
|
189
|
+
SLOTS = T.let([
|
|
190
|
+
{ name: "alert-dialog-media", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
191
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
192
|
+
|
|
193
|
+
extend T::Sig
|
|
194
|
+
|
|
195
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
196
|
+
module_function def combination(options)
|
|
197
|
+
COMBINATIONS.fetch(options)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
module Overlay
|
|
201
|
+
ROOT_SLOT = T.let("alert-dialog-overlay", String)
|
|
202
|
+
|
|
203
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
204
|
+
|
|
205
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
206
|
+
|
|
207
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
208
|
+
COMBINATIONS = T.let({
|
|
209
|
+
{} => "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0"
|
|
210
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
211
|
+
|
|
212
|
+
SLOTS = T.let([
|
|
213
|
+
{ name: "alert-dialog-overlay", tag: "AlertDialogPrimitive.Backdrop", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
214
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
215
|
+
|
|
216
|
+
extend T::Sig
|
|
217
|
+
|
|
218
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
219
|
+
module_function def combination(options)
|
|
220
|
+
COMBINATIONS.fetch(options)
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
module Portal
|
|
224
|
+
ROOT_SLOT = T.let("alert-dialog-portal", String)
|
|
225
|
+
|
|
226
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
227
|
+
CLASSES_SLOT = T.let("", String)
|
|
228
|
+
|
|
229
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
230
|
+
|
|
231
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
232
|
+
|
|
233
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
234
|
+
COMBINATIONS = T.let({
|
|
235
|
+
{} => ""
|
|
236
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
237
|
+
|
|
238
|
+
SLOTS = T.let([
|
|
239
|
+
{ name: "alert-dialog-portal", tag: "AlertDialogPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
240
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
241
|
+
|
|
242
|
+
extend T::Sig
|
|
243
|
+
|
|
244
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
245
|
+
module_function def combination(options)
|
|
246
|
+
COMBINATIONS.fetch(options)
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
module Title
|
|
250
|
+
ROOT_SLOT = T.let("alert-dialog-title", String)
|
|
251
|
+
|
|
252
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
253
|
+
|
|
254
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
255
|
+
|
|
256
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
257
|
+
COMBINATIONS = T.let({
|
|
258
|
+
{} => "cn-font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2"
|
|
259
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
260
|
+
|
|
261
|
+
SLOTS = T.let([
|
|
262
|
+
{ name: "alert-dialog-title", tag: "AlertDialogPrimitive.Title", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
263
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
264
|
+
|
|
265
|
+
extend T::Sig
|
|
266
|
+
|
|
267
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
268
|
+
module_function def combination(options)
|
|
269
|
+
COMBINATIONS.fetch(options)
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
module Trigger
|
|
273
|
+
ROOT_SLOT = T.let("alert-dialog-trigger", String)
|
|
274
|
+
|
|
275
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
276
|
+
CLASSES_SLOT = T.let("", String)
|
|
277
|
+
|
|
278
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
279
|
+
|
|
280
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
281
|
+
|
|
282
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
283
|
+
COMBINATIONS = T.let({
|
|
284
|
+
{} => ""
|
|
285
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
286
|
+
|
|
287
|
+
SLOTS = T.let([
|
|
288
|
+
{ name: "alert-dialog-trigger", tag: "AlertDialogPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
289
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
290
|
+
|
|
291
|
+
extend T::Sig
|
|
292
|
+
|
|
293
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
294
|
+
module_function def combination(options)
|
|
295
|
+
COMBINATIONS.fetch(options)
|
|
296
|
+
end
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "alert" (item sha256: b02305ed71754c16fca4f29285c42205b24f0d7af59405736c0e7ef8e53af82d)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Alert
|
|
11
|
+
ROOT_SLOT = T.let("alert", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({ variant: [:default, :destructive] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{ variant: :default } => "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 bg-card text-card-foreground",
|
|
20
|
+
{ variant: :destructive } => "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg:not([class*='size-'])]:size-4 bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
21
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
22
|
+
|
|
23
|
+
SLOTS = T.let([
|
|
24
|
+
{ name: "alert", tag: "div", static_attributes: { role: "alert" }.freeze, dynamic_attributes: [].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 Description
|
|
34
|
+
ROOT_SLOT = T.let("alert-description", 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
|
+
{} => "text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4"
|
|
43
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
44
|
+
|
|
45
|
+
SLOTS = T.let([
|
|
46
|
+
{ name: "alert-description", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].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 Title
|
|
57
|
+
ROOT_SLOT = T.let("alert-title", 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
|
+
{} => "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground"
|
|
66
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
67
|
+
|
|
68
|
+
SLOTS = T.let([
|
|
69
|
+
{ name: "alert-title", 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
|
+
module AlertAction
|
|
81
|
+
ROOT_SLOT = T.let("alert-action", 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
|
+
{} => "absolute top-2 right-2"
|
|
90
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
91
|
+
|
|
92
|
+
SLOTS = T.let([
|
|
93
|
+
{ name: "alert-action", tag: "div", static_attributes: {}.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
|
+
end
|
|
104
|
+
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 "aspect-ratio" (item sha256: 8beb1cca47b75011c0688a5f7149e94c9173ca704aa9a73406295e8d31f6508c)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module AspectRatio
|
|
11
|
+
ROOT_SLOT = T.let("aspect-ratio", 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
|
+
{} => "relative aspect-(--ratio)"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "aspect-ratio", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["style"].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,224 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "attachment" (item sha256: 15ea3c8b34cf4ec6d98a79ae93335fb33cf78e8f9ea6cb12eee1cbb37614ca65)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Attachment
|
|
11
|
+
ROOT_SLOT = T.let("attachment", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({ orientation: :horizontal, size: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({ orientation: [:horizontal, :vertical], size: [:default, :sm, :xs] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{ orientation: :horizontal, size: :default } => "group/attachment relative flex w-fit max-w-full shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2 min-w-40 items-center",
|
|
20
|
+
{ orientation: :horizontal, size: :sm } => "group/attachment relative flex w-fit max-w-full shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5 min-w-40 items-center",
|
|
21
|
+
{ orientation: :horizontal, size: :xs } => "group/attachment relative flex w-fit max-w-full shrink-0 flex-wrap border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1 min-w-40 items-center",
|
|
22
|
+
{ orientation: :vertical, size: :default } => "group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2 w-24 flex-col has-data-[slot=attachment-content]:w-30",
|
|
23
|
+
{ orientation: :vertical, size: :sm } => "group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5 w-24 flex-col has-data-[slot=attachment-content]:w-30",
|
|
24
|
+
{ orientation: :vertical, size: :xs } => "group/attachment relative flex max-w-full min-w-0 shrink-0 flex-wrap border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1 w-24 flex-col has-data-[slot=attachment-content]:w-30"
|
|
25
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
26
|
+
|
|
27
|
+
SLOTS = T.let([
|
|
28
|
+
{ name: "attachment", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-orientation", "data-size", "data-state"].freeze }.freeze
|
|
29
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
30
|
+
|
|
31
|
+
extend T::Sig
|
|
32
|
+
|
|
33
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
34
|
+
module_function def combination(options)
|
|
35
|
+
COMBINATIONS.fetch(options)
|
|
36
|
+
end
|
|
37
|
+
module Action
|
|
38
|
+
ROOT_SLOT = T.let("attachment-action", String)
|
|
39
|
+
|
|
40
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
41
|
+
|
|
42
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
43
|
+
|
|
44
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
45
|
+
COMBINATIONS = T.let({
|
|
46
|
+
{} => ""
|
|
47
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
48
|
+
|
|
49
|
+
SLOTS = T.let([
|
|
50
|
+
{ name: "attachment-action", tag: "Button", static_attributes: {}.freeze, dynamic_attributes: ["size", "variant"].freeze }.freeze
|
|
51
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
52
|
+
|
|
53
|
+
extend T::Sig
|
|
54
|
+
|
|
55
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
56
|
+
module_function def combination(options)
|
|
57
|
+
COMBINATIONS.fetch(options)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
module Actions
|
|
61
|
+
ROOT_SLOT = T.let("attachment-actions", String)
|
|
62
|
+
|
|
63
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
64
|
+
|
|
65
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
66
|
+
|
|
67
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
68
|
+
COMBINATIONS = T.let({
|
|
69
|
+
{} => "relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1"
|
|
70
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
71
|
+
|
|
72
|
+
SLOTS = T.let([
|
|
73
|
+
{ name: "attachment-actions", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
74
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
75
|
+
|
|
76
|
+
extend T::Sig
|
|
77
|
+
|
|
78
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
79
|
+
module_function def combination(options)
|
|
80
|
+
COMBINATIONS.fetch(options)
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
module Content
|
|
84
|
+
ROOT_SLOT = T.let("attachment-content", String)
|
|
85
|
+
|
|
86
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
87
|
+
|
|
88
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
89
|
+
|
|
90
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
91
|
+
COMBINATIONS = T.let({
|
|
92
|
+
{} => "max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1"
|
|
93
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
94
|
+
|
|
95
|
+
SLOTS = T.let([
|
|
96
|
+
{ name: "attachment-content", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
97
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
98
|
+
|
|
99
|
+
extend T::Sig
|
|
100
|
+
|
|
101
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
102
|
+
module_function def combination(options)
|
|
103
|
+
COMBINATIONS.fetch(options)
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
module Description
|
|
107
|
+
ROOT_SLOT = T.let("attachment-description", String)
|
|
108
|
+
|
|
109
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
110
|
+
|
|
111
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
112
|
+
|
|
113
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
114
|
+
COMBINATIONS = T.let({
|
|
115
|
+
{} => "mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80 max-w-full"
|
|
116
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
117
|
+
|
|
118
|
+
SLOTS = T.let([
|
|
119
|
+
{ name: "attachment-description", tag: "span", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
120
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
121
|
+
|
|
122
|
+
extend T::Sig
|
|
123
|
+
|
|
124
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
125
|
+
module_function def combination(options)
|
|
126
|
+
COMBINATIONS.fetch(options)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
module Group
|
|
130
|
+
ROOT_SLOT = T.let("attachment-group", String)
|
|
131
|
+
|
|
132
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
133
|
+
|
|
134
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
135
|
+
|
|
136
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
137
|
+
COMBINATIONS = T.let({
|
|
138
|
+
{} => "flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start"
|
|
139
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
140
|
+
|
|
141
|
+
SLOTS = T.let([
|
|
142
|
+
{ name: "attachment-group", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
143
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
144
|
+
|
|
145
|
+
extend T::Sig
|
|
146
|
+
|
|
147
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
148
|
+
module_function def combination(options)
|
|
149
|
+
COMBINATIONS.fetch(options)
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
module Media
|
|
153
|
+
ROOT_SLOT = T.let("attachment-media", String)
|
|
154
|
+
|
|
155
|
+
DEFAULTS = T.let({ variant: :icon }.freeze, T::Hash[Symbol, Symbol])
|
|
156
|
+
|
|
157
|
+
VARIANTS = T.let({ variant: [:icon, :image] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
158
|
+
|
|
159
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
160
|
+
COMBINATIONS = T.let({
|
|
161
|
+
{ variant: :icon } => "relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5",
|
|
162
|
+
{ variant: :image } => "relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5 opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
|
|
163
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
164
|
+
|
|
165
|
+
SLOTS = T.let([
|
|
166
|
+
{ name: "attachment-media", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].freeze }.freeze
|
|
167
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
168
|
+
|
|
169
|
+
extend T::Sig
|
|
170
|
+
|
|
171
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
172
|
+
module_function def combination(options)
|
|
173
|
+
COMBINATIONS.fetch(options)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
module Title
|
|
177
|
+
ROOT_SLOT = T.let("attachment-title", String)
|
|
178
|
+
|
|
179
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
180
|
+
|
|
181
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
182
|
+
|
|
183
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
184
|
+
COMBINATIONS = T.let({
|
|
185
|
+
{} => "block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer"
|
|
186
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
187
|
+
|
|
188
|
+
SLOTS = T.let([
|
|
189
|
+
{ name: "attachment-title", tag: "span", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
190
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
191
|
+
|
|
192
|
+
extend T::Sig
|
|
193
|
+
|
|
194
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
195
|
+
module_function def combination(options)
|
|
196
|
+
COMBINATIONS.fetch(options)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
module Trigger
|
|
200
|
+
ROOT_SLOT = T.let("attachment-trigger", String)
|
|
201
|
+
|
|
202
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
203
|
+
|
|
204
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
205
|
+
|
|
206
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
207
|
+
COMBINATIONS = T.let({
|
|
208
|
+
{} => "absolute inset-0 z-10 outline-none"
|
|
209
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
210
|
+
|
|
211
|
+
SLOTS = T.let([
|
|
212
|
+
{ name: "attachment-trigger", tag: "button", static_attributes: {}.freeze, dynamic_attributes: ["type"].freeze }.freeze
|
|
213
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
214
|
+
|
|
215
|
+
extend T::Sig
|
|
216
|
+
|
|
217
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
218
|
+
module_function def combination(options)
|
|
219
|
+
COMBINATIONS.fetch(options)
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|