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,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 "spinner" (item sha256: 4d86cc971f8ff10f5d56c1a92216c3aadaa367dfcaf4ecf44a3d03b5f0ac89cf)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Spinner
|
|
11
|
+
ROOT_SLOT = T.let("spinner", 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
|
+
{} => "size-4 animate-spin"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "spinner", tag: "IconPlaceholder", static_attributes: { "aria-label" => "Loading", hugeicons: "Loading03Icon", lucide: "Loader2Icon", phosphor: "SpinnerIcon", remixicon: "RiLoaderLine", role: "status", tabler: "IconLoader" }.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
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "switch" (item sha256: 268957cecafc59e9758c241e3d2689f9985bae7ee7619602cfc8d281cb9cc1a8)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Switch
|
|
11
|
+
ROOT_SLOT = T.let("switch", 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
|
+
{} => "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "switch", tag: "SwitchPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: ["data-size"].freeze }.freeze,
|
|
24
|
+
{ name: "switch-thumb", tag: "SwitchPrimitive.Thumb", static_attributes: { class: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground" }.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
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "table" (item sha256: f57f693778242e0dc50bf58e04dda740ff734c23be28799595da14d055a367bb)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Table
|
|
11
|
+
ROOT_SLOT = T.let("table-container", String)
|
|
12
|
+
|
|
13
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
14
|
+
CLASSES_SLOT = T.let("table", 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
|
+
{} => "w-full caption-bottom text-sm"
|
|
23
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
24
|
+
|
|
25
|
+
SLOTS = T.let([
|
|
26
|
+
{ name: "table-container", tag: "div", static_attributes: { class: "relative w-full overflow-x-auto" }.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
27
|
+
{ name: "table", tag: "table", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
28
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
29
|
+
|
|
30
|
+
extend T::Sig
|
|
31
|
+
|
|
32
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
33
|
+
module_function def combination(options)
|
|
34
|
+
COMBINATIONS.fetch(options)
|
|
35
|
+
end
|
|
36
|
+
module Body
|
|
37
|
+
ROOT_SLOT = T.let("table-body", String)
|
|
38
|
+
|
|
39
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
40
|
+
|
|
41
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
42
|
+
|
|
43
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
44
|
+
COMBINATIONS = T.let({
|
|
45
|
+
{} => "[&_tr:last-child]:border-0"
|
|
46
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
47
|
+
|
|
48
|
+
SLOTS = T.let([
|
|
49
|
+
{ name: "table-body", tag: "tbody", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
50
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
51
|
+
|
|
52
|
+
extend T::Sig
|
|
53
|
+
|
|
54
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
55
|
+
module_function def combination(options)
|
|
56
|
+
COMBINATIONS.fetch(options)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
module Caption
|
|
60
|
+
ROOT_SLOT = T.let("table-caption", String)
|
|
61
|
+
|
|
62
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
63
|
+
|
|
64
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
65
|
+
|
|
66
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
67
|
+
COMBINATIONS = T.let({
|
|
68
|
+
{} => "mt-4 text-sm text-muted-foreground"
|
|
69
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
70
|
+
|
|
71
|
+
SLOTS = T.let([
|
|
72
|
+
{ name: "table-caption", tag: "caption", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
73
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
74
|
+
|
|
75
|
+
extend T::Sig
|
|
76
|
+
|
|
77
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
78
|
+
module_function def combination(options)
|
|
79
|
+
COMBINATIONS.fetch(options)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
module Cell
|
|
83
|
+
ROOT_SLOT = T.let("table-cell", String)
|
|
84
|
+
|
|
85
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
86
|
+
|
|
87
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
88
|
+
|
|
89
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
90
|
+
COMBINATIONS = T.let({
|
|
91
|
+
{} => "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0"
|
|
92
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
93
|
+
|
|
94
|
+
SLOTS = T.let([
|
|
95
|
+
{ name: "table-cell", tag: "td", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
96
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
97
|
+
|
|
98
|
+
extend T::Sig
|
|
99
|
+
|
|
100
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
101
|
+
module_function def combination(options)
|
|
102
|
+
COMBINATIONS.fetch(options)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
module Footer
|
|
106
|
+
ROOT_SLOT = T.let("table-footer", String)
|
|
107
|
+
|
|
108
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
109
|
+
|
|
110
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
111
|
+
|
|
112
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
113
|
+
COMBINATIONS = T.let({
|
|
114
|
+
{} => "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0"
|
|
115
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
116
|
+
|
|
117
|
+
SLOTS = T.let([
|
|
118
|
+
{ name: "table-footer", tag: "tfoot", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
119
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
120
|
+
|
|
121
|
+
extend T::Sig
|
|
122
|
+
|
|
123
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
124
|
+
module_function def combination(options)
|
|
125
|
+
COMBINATIONS.fetch(options)
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
module Head
|
|
129
|
+
ROOT_SLOT = T.let("table-head", String)
|
|
130
|
+
|
|
131
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
132
|
+
|
|
133
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
134
|
+
|
|
135
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
136
|
+
COMBINATIONS = T.let({
|
|
137
|
+
{} => "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0"
|
|
138
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
139
|
+
|
|
140
|
+
SLOTS = T.let([
|
|
141
|
+
{ name: "table-head", tag: "th", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
142
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
143
|
+
|
|
144
|
+
extend T::Sig
|
|
145
|
+
|
|
146
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
147
|
+
module_function def combination(options)
|
|
148
|
+
COMBINATIONS.fetch(options)
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
module Header
|
|
152
|
+
ROOT_SLOT = T.let("table-header", String)
|
|
153
|
+
|
|
154
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
155
|
+
|
|
156
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
157
|
+
|
|
158
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
159
|
+
COMBINATIONS = T.let({
|
|
160
|
+
{} => "[&_tr]:border-b"
|
|
161
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
162
|
+
|
|
163
|
+
SLOTS = T.let([
|
|
164
|
+
{ name: "table-header", tag: "thead", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
165
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
166
|
+
|
|
167
|
+
extend T::Sig
|
|
168
|
+
|
|
169
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
170
|
+
module_function def combination(options)
|
|
171
|
+
COMBINATIONS.fetch(options)
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
module Row
|
|
175
|
+
ROOT_SLOT = T.let("table-row", String)
|
|
176
|
+
|
|
177
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
178
|
+
|
|
179
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
180
|
+
|
|
181
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
182
|
+
COMBINATIONS = T.let({
|
|
183
|
+
{} => "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted"
|
|
184
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
185
|
+
|
|
186
|
+
SLOTS = T.let([
|
|
187
|
+
{ name: "table-row", tag: "tr", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
188
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
189
|
+
|
|
190
|
+
extend T::Sig
|
|
191
|
+
|
|
192
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
193
|
+
module_function def combination(options)
|
|
194
|
+
COMBINATIONS.fetch(options)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
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 "tabs" (item sha256: 23f14006144cdcaf7bc71feb6012ff4abd7a432588590f736ea52cefa87cdb44)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Tabs
|
|
11
|
+
ROOT_SLOT = T.let("tabs", 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/tabs flex gap-2 data-horizontal:flex-col"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "tabs", tag: "TabsPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: ["data-orientation"].freeze }.freeze
|
|
24
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
25
|
+
|
|
26
|
+
extend T::Sig
|
|
27
|
+
|
|
28
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
29
|
+
module_function def combination(options)
|
|
30
|
+
COMBINATIONS.fetch(options)
|
|
31
|
+
end
|
|
32
|
+
module Content
|
|
33
|
+
ROOT_SLOT = T.let("tabs-content", String)
|
|
34
|
+
|
|
35
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
36
|
+
|
|
37
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
38
|
+
|
|
39
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
40
|
+
COMBINATIONS = T.let({
|
|
41
|
+
{} => "flex-1 text-sm outline-none"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "tabs-content", tag: "TabsPrimitive.Panel", 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 List
|
|
56
|
+
ROOT_SLOT = T.let("tabs-list", String)
|
|
57
|
+
|
|
58
|
+
DEFAULTS = T.let({ variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
59
|
+
|
|
60
|
+
VARIANTS = T.let({ variant: [:default, :line] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
61
|
+
|
|
62
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
63
|
+
COMBINATIONS = T.let({
|
|
64
|
+
{ variant: :default } => "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none bg-muted",
|
|
65
|
+
{ variant: :line } => "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none gap-1 bg-transparent"
|
|
66
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
67
|
+
|
|
68
|
+
SLOTS = T.let([
|
|
69
|
+
{ name: "tabs-list", tag: "TabsPrimitive.List", static_attributes: {}.freeze, dynamic_attributes: ["data-variant"].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
|
+
module Trigger
|
|
80
|
+
ROOT_SLOT = T.let("tabs-trigger", String)
|
|
81
|
+
|
|
82
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
83
|
+
|
|
84
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
85
|
+
|
|
86
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
87
|
+
COMBINATIONS = T.let({
|
|
88
|
+
{} => "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100"
|
|
89
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
90
|
+
|
|
91
|
+
SLOTS = T.let([
|
|
92
|
+
{ name: "tabs-trigger", tag: "TabsPrimitive.Tab", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
93
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
94
|
+
|
|
95
|
+
extend T::Sig
|
|
96
|
+
|
|
97
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
98
|
+
module_function def combination(options)
|
|
99
|
+
COMBINATIONS.fetch(options)
|
|
100
|
+
end
|
|
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 "textarea" (item sha256: 04e1826237b62fe50197759ee7f1fe35ad1bf55f3940bfc1e292b0aa0f627e16)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Textarea
|
|
11
|
+
ROOT_SLOT = T.let("textarea", 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 field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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: "textarea", tag: "textarea", 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
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "toggle-group" (item sha256: b5d4b7a57c1a076c7415b7df6ef2f054e71026ef5ba2e7880d6d138c1e92e361)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module ToggleGroup
|
|
11
|
+
ROOT_SLOT = T.let("toggle-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/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "toggle-group", tag: "ToggleGroupPrimitive", static_attributes: {}.freeze, dynamic_attributes: ["data-orientation", "data-size", "data-spacing", "data-variant", "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
|
+
module Item
|
|
33
|
+
ROOT_SLOT = T.let("toggle-group-item", String)
|
|
34
|
+
|
|
35
|
+
DEFAULTS = T.let({ size: :default, variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
36
|
+
|
|
37
|
+
VARIANTS = T.let({ size: [:default, :lg, :sm], variant: [:default, :outline] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
38
|
+
|
|
39
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
40
|
+
COMBINATIONS = T.let({
|
|
41
|
+
{ size: :default, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-transparent h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
42
|
+
{ size: :default, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-transparent hover:bg-muted h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
43
|
+
{ size: :lg, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-transparent h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
44
|
+
{ size: :lg, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-transparent hover:bg-muted h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
45
|
+
{ size: :sm, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-transparent h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
|
|
46
|
+
{ size: :sm, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 border border-input bg-transparent hover:bg-muted h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5 shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t"
|
|
47
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
48
|
+
|
|
49
|
+
SLOTS = T.let([
|
|
50
|
+
{ name: "toggle-group-item", tag: "TogglePrimitive", static_attributes: {}.freeze, dynamic_attributes: ["data-size", "data-spacing", "data-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
|
+
end
|
|
61
|
+
end
|
|
62
|
+
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 "toggle" (item sha256: c124f6bacc3dbdf9f6b8b3c11a8ed3554a61c0161290b7fde8c2d1f06681a2c2)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Toggle
|
|
11
|
+
ROOT_SLOT = T.let("toggle", String)
|
|
12
|
+
|
|
13
|
+
DEFAULTS = T.let({ size: :default, variant: :default }.freeze, T::Hash[Symbol, Symbol])
|
|
14
|
+
|
|
15
|
+
VARIANTS = T.let({ size: [:default, :lg, :sm], variant: [:default, :outline] }.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
16
|
+
|
|
17
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
18
|
+
COMBINATIONS = T.let({
|
|
19
|
+
{ size: :default, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-transparent h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
{ size: :default, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-transparent hover:bg-muted h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
21
|
+
{ size: :lg, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 bg-transparent h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
22
|
+
{ size: :lg, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 border border-input bg-transparent hover:bg-muted h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
23
|
+
{ size: :sm, variant: :default } => "group/toggle inline-flex items-center justify-center gap-1 font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 bg-transparent h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
24
|
+
{ size: :sm, variant: :outline } => "group/toggle inline-flex items-center justify-center gap-1 font-medium whitespace-nowrap transition-all outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 border border-input bg-transparent hover:bg-muted h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5"
|
|
25
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
26
|
+
|
|
27
|
+
SLOTS = T.let([
|
|
28
|
+
{ name: "toggle", tag: "TogglePrimitive", static_attributes: {}.freeze, dynamic_attributes: [].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,116 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "tooltip" (item sha256: 7fdf229dfa72095b6f6c2d6c7dd0d2800be7787774eb52de2714629224590824)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Tooltip
|
|
11
|
+
ROOT_SLOT = T.let("tooltip", 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: "tooltip", tag: "TooltipPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
27
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
28
|
+
|
|
29
|
+
extend T::Sig
|
|
30
|
+
|
|
31
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
32
|
+
module_function def combination(options)
|
|
33
|
+
COMBINATIONS.fetch(options)
|
|
34
|
+
end
|
|
35
|
+
module Content
|
|
36
|
+
ROOT_SLOT = T.let("", String)
|
|
37
|
+
|
|
38
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
39
|
+
CLASSES_SLOT = T.let("tooltip-content", String)
|
|
40
|
+
|
|
41
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
42
|
+
|
|
43
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
44
|
+
|
|
45
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
46
|
+
COMBINATIONS = T.let({
|
|
47
|
+
{} => "z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95"
|
|
48
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
49
|
+
|
|
50
|
+
SLOTS = T.let([
|
|
51
|
+
{ name: "", tag: "TooltipPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze,
|
|
52
|
+
{ name: "tooltip-content", tag: "TooltipPrimitive.Popup", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
53
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
54
|
+
|
|
55
|
+
extend T::Sig
|
|
56
|
+
|
|
57
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
58
|
+
module_function def combination(options)
|
|
59
|
+
COMBINATIONS.fetch(options)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
module Provider
|
|
63
|
+
ROOT_SLOT = T.let("tooltip-provider", String)
|
|
64
|
+
|
|
65
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
66
|
+
CLASSES_SLOT = T.let("", String)
|
|
67
|
+
|
|
68
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
69
|
+
|
|
70
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
71
|
+
|
|
72
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
73
|
+
COMBINATIONS = T.let({
|
|
74
|
+
{} => ""
|
|
75
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
76
|
+
|
|
77
|
+
SLOTS = T.let([
|
|
78
|
+
{ name: "tooltip-provider", tag: "TooltipPrimitive.Provider", static_attributes: {}.freeze, dynamic_attributes: ["delay"].freeze }.freeze
|
|
79
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
80
|
+
|
|
81
|
+
extend T::Sig
|
|
82
|
+
|
|
83
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
84
|
+
module_function def combination(options)
|
|
85
|
+
COMBINATIONS.fetch(options)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
module Trigger
|
|
89
|
+
ROOT_SLOT = T.let("tooltip-trigger", String)
|
|
90
|
+
|
|
91
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
92
|
+
CLASSES_SLOT = T.let("", String)
|
|
93
|
+
|
|
94
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
95
|
+
|
|
96
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
97
|
+
|
|
98
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
99
|
+
COMBINATIONS = T.let({
|
|
100
|
+
{} => ""
|
|
101
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
102
|
+
|
|
103
|
+
SLOTS = T.let([
|
|
104
|
+
{ name: "tooltip-trigger", tag: "TooltipPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
105
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
106
|
+
|
|
107
|
+
extend T::Sig
|
|
108
|
+
|
|
109
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
110
|
+
module_function def combination(options)
|
|
111
|
+
COMBINATIONS.fetch(options)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|