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,155 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "input-group" (item sha256: 5eb332305c27d037da9b99358c4384e9206dfa1e08b2e3a6e683d525223ffc0a)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module InputGroup
|
|
11
|
+
ROOT_SLOT = T.let("input-group", 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/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "input-group", tag: "div", static_attributes: { role: "group" }.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 Addon
|
|
33
|
+
ROOT_SLOT = T.let("input-group-addon", String)
|
|
34
|
+
|
|
35
|
+
DEFAULTS = T.let({ align: :"inline-start" }.freeze, T::Hash[Symbol, Symbol])
|
|
36
|
+
|
|
37
|
+
VARIANTS = T.let({ align: [:"block-end", :"block-start", :"inline-end", :"inline-start"] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
38
|
+
|
|
39
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
40
|
+
COMBINATIONS = T.let({
|
|
41
|
+
{ align: :"block-end" } => "flex h-auto cursor-text items-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2",
|
|
42
|
+
{ align: :"block-start" } => "flex h-auto cursor-text items-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
43
|
+
{ align: :"inline-end" } => "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
44
|
+
{ align: :"inline-start" } => "flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]"
|
|
45
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
46
|
+
|
|
47
|
+
SLOTS = T.let([
|
|
48
|
+
{ name: "input-group-addon", tag: "div", static_attributes: { role: "group" }.freeze, dynamic_attributes: ["data-align", "onClick"].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 Button
|
|
59
|
+
ROOT_SLOT = T.let("", String)
|
|
60
|
+
|
|
61
|
+
DEFAULTS = T.let({ size: :xs }.freeze, T::Hash[Symbol, Symbol])
|
|
62
|
+
|
|
63
|
+
VARIANTS = T.let({ size: [:"icon-sm", :"icon-xs", :sm, :xs] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
64
|
+
|
|
65
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
66
|
+
COMBINATIONS = T.let({
|
|
67
|
+
{ size: :"icon-sm" } => "flex items-center gap-2 text-sm shadow-none size-8 p-0 has-[>svg]:p-0",
|
|
68
|
+
{ size: :"icon-xs" } => "flex items-center gap-2 text-sm shadow-none size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
69
|
+
{ size: :sm } => "flex items-center gap-2 text-sm shadow-none",
|
|
70
|
+
{ size: :xs } => "flex items-center text-sm shadow-none h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5"
|
|
71
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
72
|
+
|
|
73
|
+
SLOTS = T.let([
|
|
74
|
+
{ name: "", tag: "Button", static_attributes: {}.freeze, dynamic_attributes: ["data-size", "type", "variant"].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 Input
|
|
85
|
+
ROOT_SLOT = T.let("input-group-control", 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
|
+
{} => "flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent"
|
|
94
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
95
|
+
|
|
96
|
+
SLOTS = T.let([
|
|
97
|
+
{ name: "input-group-control", tag: "Input", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
98
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
99
|
+
|
|
100
|
+
extend T::Sig
|
|
101
|
+
|
|
102
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
103
|
+
module_function def combination(options)
|
|
104
|
+
COMBINATIONS.fetch(options)
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
module Text
|
|
108
|
+
ROOT_SLOT = T.let("", String)
|
|
109
|
+
|
|
110
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
111
|
+
|
|
112
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
113
|
+
|
|
114
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
115
|
+
COMBINATIONS = T.let({
|
|
116
|
+
{} => "flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4"
|
|
117
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
118
|
+
|
|
119
|
+
SLOTS = T.let([
|
|
120
|
+
{ name: "", tag: "span", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
121
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
122
|
+
|
|
123
|
+
extend T::Sig
|
|
124
|
+
|
|
125
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
126
|
+
module_function def combination(options)
|
|
127
|
+
COMBINATIONS.fetch(options)
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
module Textarea
|
|
131
|
+
ROOT_SLOT = T.let("input-group-control", String)
|
|
132
|
+
|
|
133
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
134
|
+
|
|
135
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
136
|
+
|
|
137
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
138
|
+
COMBINATIONS = T.let({
|
|
139
|
+
{} => "flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent"
|
|
140
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
141
|
+
|
|
142
|
+
SLOTS = T.let([
|
|
143
|
+
{ name: "input-group-control", tag: "Textarea", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
144
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
145
|
+
|
|
146
|
+
extend T::Sig
|
|
147
|
+
|
|
148
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
149
|
+
module_function def combination(options)
|
|
150
|
+
COMBINATIONS.fetch(options)
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "input-otp" (item sha256: 79854188a7a1f9413ccd906b528ec57d8cd113f586ffc12b6b25d6aa9c9ab0ae)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module InputOTP
|
|
11
|
+
ROOT_SLOT = T.let("input-otp", 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
|
+
{} => "disabled:cursor-not-allowed"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "input-otp", tag: "OTPInput", static_attributes: {}.freeze, dynamic_attributes: ["containerClassName", "spellCheck"].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 Group
|
|
33
|
+
ROOT_SLOT = T.let("input-otp-group", 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 items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "input-otp-group", 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 Separator
|
|
56
|
+
ROOT_SLOT = T.let("input-otp-separator", String)
|
|
57
|
+
|
|
58
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
59
|
+
CLASSES_SLOT = T.let("", 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: "input-otp-separator", tag: "div", static_attributes: { class: "flex items-center [&_svg:not([class*='size-'])]:size-4", role: "separator" }.freeze, dynamic_attributes: [].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 Slot
|
|
82
|
+
ROOT_SLOT = T.let("input-otp-slot", String)
|
|
83
|
+
|
|
84
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
85
|
+
|
|
86
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
87
|
+
|
|
88
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
89
|
+
COMBINATIONS = T.let({
|
|
90
|
+
{} => "relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40"
|
|
91
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
92
|
+
|
|
93
|
+
SLOTS = T.let([
|
|
94
|
+
{ name: "input-otp-slot", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-active"].freeze }.freeze
|
|
95
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
96
|
+
|
|
97
|
+
extend T::Sig
|
|
98
|
+
|
|
99
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
100
|
+
module_function def combination(options)
|
|
101
|
+
COMBINATIONS.fetch(options)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
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 "input" (item sha256: ffa0dd4bbfe19118aed68878f9677835bbdb857ad1494e2570ad981fce6f9f73)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Input
|
|
11
|
+
ROOT_SLOT = T.let("input", 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
|
+
{} => "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "input", tag: "InputPrimitive", static_attributes: {}.freeze, dynamic_attributes: ["type"].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,251 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "item" (item sha256: 567e179372af0b2d1b52c64b4853b63b43e803d6e29b0cb593523cb685ef4c34)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Item
|
|
11
|
+
ROOT_SLOT = T.let("item", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({ size: :default, variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({ size: [:default, :sm, :xs], variant: [:default, :muted, :outline] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{ size: :default, variant: :default } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent gap-2.5 px-3 py-2.5",
|
|
20
|
+
{ size: :default, variant: :muted } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent bg-muted/50 gap-2.5 px-3 py-2.5",
|
|
21
|
+
{ size: :default, variant: :outline } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-border gap-2.5 px-3 py-2.5",
|
|
22
|
+
{ size: :sm, variant: :default } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent gap-2.5 px-3 py-2.5",
|
|
23
|
+
{ size: :sm, variant: :muted } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent bg-muted/50 gap-2.5 px-3 py-2.5",
|
|
24
|
+
{ size: :sm, variant: :outline } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-border gap-2.5 px-3 py-2.5",
|
|
25
|
+
{ size: :xs, variant: :default } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
|
|
26
|
+
{ size: :xs, variant: :muted } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-transparent bg-muted/50 gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
|
|
27
|
+
{ size: :xs, variant: :outline } => "group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted border-border gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
28
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
29
|
+
|
|
30
|
+
SLOTS = T.let([
|
|
31
|
+
{ name: "item", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-size", "data-variant"].freeze }.freeze
|
|
32
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
33
|
+
|
|
34
|
+
extend T::Sig
|
|
35
|
+
|
|
36
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
37
|
+
module_function def combination(options)
|
|
38
|
+
COMBINATIONS.fetch(options)
|
|
39
|
+
end
|
|
40
|
+
module Actions
|
|
41
|
+
ROOT_SLOT = T.let("item-actions", String)
|
|
42
|
+
|
|
43
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
44
|
+
|
|
45
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
46
|
+
|
|
47
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
48
|
+
COMBINATIONS = T.let({
|
|
49
|
+
{} => "flex items-center gap-2"
|
|
50
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
51
|
+
|
|
52
|
+
SLOTS = T.let([
|
|
53
|
+
{ name: "item-actions", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
54
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
55
|
+
|
|
56
|
+
extend T::Sig
|
|
57
|
+
|
|
58
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
59
|
+
module_function def combination(options)
|
|
60
|
+
COMBINATIONS.fetch(options)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
module Content
|
|
64
|
+
ROOT_SLOT = T.let("item-content", String)
|
|
65
|
+
|
|
66
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
67
|
+
|
|
68
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
69
|
+
|
|
70
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
71
|
+
COMBINATIONS = T.let({
|
|
72
|
+
{} => "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none"
|
|
73
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
74
|
+
|
|
75
|
+
SLOTS = T.let([
|
|
76
|
+
{ name: "item-content", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
77
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
78
|
+
|
|
79
|
+
extend T::Sig
|
|
80
|
+
|
|
81
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
82
|
+
module_function def combination(options)
|
|
83
|
+
COMBINATIONS.fetch(options)
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
module Description
|
|
87
|
+
ROOT_SLOT = T.let("item-description", String)
|
|
88
|
+
|
|
89
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
90
|
+
|
|
91
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
92
|
+
|
|
93
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
94
|
+
COMBINATIONS = T.let({
|
|
95
|
+
{} => "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary"
|
|
96
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
97
|
+
|
|
98
|
+
SLOTS = T.let([
|
|
99
|
+
{ name: "item-description", tag: "p", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
100
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
101
|
+
|
|
102
|
+
extend T::Sig
|
|
103
|
+
|
|
104
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
105
|
+
module_function def combination(options)
|
|
106
|
+
COMBINATIONS.fetch(options)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
module Footer
|
|
110
|
+
ROOT_SLOT = T.let("item-footer", String)
|
|
111
|
+
|
|
112
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
113
|
+
|
|
114
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
115
|
+
|
|
116
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
117
|
+
COMBINATIONS = T.let({
|
|
118
|
+
{} => "flex basis-full items-center justify-between gap-2"
|
|
119
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
120
|
+
|
|
121
|
+
SLOTS = T.let([
|
|
122
|
+
{ name: "item-footer", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
123
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
124
|
+
|
|
125
|
+
extend T::Sig
|
|
126
|
+
|
|
127
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
128
|
+
module_function def combination(options)
|
|
129
|
+
COMBINATIONS.fetch(options)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
module Group
|
|
133
|
+
ROOT_SLOT = T.let("item-group", String)
|
|
134
|
+
|
|
135
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
136
|
+
|
|
137
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
138
|
+
|
|
139
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
140
|
+
COMBINATIONS = T.let({
|
|
141
|
+
{} => "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2"
|
|
142
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
143
|
+
|
|
144
|
+
SLOTS = T.let([
|
|
145
|
+
{ name: "item-group", tag: "div", static_attributes: { role: "list" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
146
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
147
|
+
|
|
148
|
+
extend T::Sig
|
|
149
|
+
|
|
150
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
151
|
+
module_function def combination(options)
|
|
152
|
+
COMBINATIONS.fetch(options)
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
module Header
|
|
156
|
+
ROOT_SLOT = T.let("item-header", String)
|
|
157
|
+
|
|
158
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
159
|
+
|
|
160
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
161
|
+
|
|
162
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
163
|
+
COMBINATIONS = T.let({
|
|
164
|
+
{} => "flex basis-full items-center justify-between gap-2"
|
|
165
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
166
|
+
|
|
167
|
+
SLOTS = T.let([
|
|
168
|
+
{ name: "item-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
169
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
170
|
+
|
|
171
|
+
extend T::Sig
|
|
172
|
+
|
|
173
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
174
|
+
module_function def combination(options)
|
|
175
|
+
COMBINATIONS.fetch(options)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
module Media
|
|
179
|
+
ROOT_SLOT = T.let("item-media", String)
|
|
180
|
+
|
|
181
|
+
DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
182
|
+
|
|
183
|
+
VARIANTS = T.let({ variant: [:default, :icon, :image] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
184
|
+
|
|
185
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
186
|
+
COMBINATIONS = T.let({
|
|
187
|
+
{ variant: :default } => "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none bg-transparent",
|
|
188
|
+
{ variant: :icon } => "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
189
|
+
{ variant: :image } => "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
190
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
191
|
+
|
|
192
|
+
SLOTS = T.let([
|
|
193
|
+
{ name: "item-media", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].freeze }.freeze
|
|
194
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
195
|
+
|
|
196
|
+
extend T::Sig
|
|
197
|
+
|
|
198
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
199
|
+
module_function def combination(options)
|
|
200
|
+
COMBINATIONS.fetch(options)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
module Separator
|
|
204
|
+
ROOT_SLOT = T.let("item-separator", String)
|
|
205
|
+
|
|
206
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
207
|
+
|
|
208
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
209
|
+
|
|
210
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
211
|
+
COMBINATIONS = T.let({
|
|
212
|
+
{} => "my-2"
|
|
213
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
214
|
+
|
|
215
|
+
SLOTS = T.let([
|
|
216
|
+
{ name: "item-separator", tag: "Separator", static_attributes: { orientation: "horizontal" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
217
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
218
|
+
|
|
219
|
+
extend T::Sig
|
|
220
|
+
|
|
221
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
222
|
+
module_function def combination(options)
|
|
223
|
+
COMBINATIONS.fetch(options)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
module Title
|
|
227
|
+
ROOT_SLOT = T.let("item-title", 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
|
+
{} => "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4"
|
|
236
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
237
|
+
|
|
238
|
+
SLOTS = T.let([
|
|
239
|
+
{ name: "item-title", tag: "div", 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
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "kbd" (item sha256: e8e0f3cef91bb77d6aad8ed02969f9674c7855b16646d0b4553988e44a303668)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Kbd
|
|
11
|
+
ROOT_SLOT = T.let("kbd", 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
|
+
{} => "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "kbd", tag: "kbd", 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 Group
|
|
33
|
+
ROOT_SLOT = T.let("kbd-group", 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
|
+
{} => "inline-flex items-center gap-1"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "kbd-group", tag: "kbd", 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
|
+
end
|
|
56
|
+
end
|
|
57
|
+
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 "label" (item sha256: 7fbe4e76e397d4934c4c6426c44cfa1e2e16bfb6f8fddd9c68a299ef0c4583e1)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Label
|
|
11
|
+
ROOT_SLOT = T.let("label", 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 items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "label", tag: "label", 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
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|