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,149 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "message" (item sha256: a57675ecb18e7175e520a7ffafa53175e5bf6c1d430ce6f77999cec54cf49570)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Message
|
|
11
|
+
ROOT_SLOT = T.let("message", 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/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "message", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-align"].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 Avatar
|
|
33
|
+
ROOT_SLOT = T.let("message-avatar", String)
|
|
34
|
+
|
|
35
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
36
|
+
|
|
37
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
38
|
+
|
|
39
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
40
|
+
COMBINATIONS = T.let({
|
|
41
|
+
{} => "flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "message-avatar", 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 Content
|
|
56
|
+
ROOT_SLOT = T.let("message-content", String)
|
|
57
|
+
|
|
58
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
59
|
+
|
|
60
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
61
|
+
|
|
62
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
63
|
+
COMBINATIONS = T.let({
|
|
64
|
+
{} => "flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end"
|
|
65
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
66
|
+
|
|
67
|
+
SLOTS = T.let([
|
|
68
|
+
{ name: "message-content", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
69
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
70
|
+
|
|
71
|
+
extend T::Sig
|
|
72
|
+
|
|
73
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
74
|
+
module_function def combination(options)
|
|
75
|
+
COMBINATIONS.fetch(options)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
module Footer
|
|
79
|
+
ROOT_SLOT = T.let("message-footer", String)
|
|
80
|
+
|
|
81
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
82
|
+
|
|
83
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
84
|
+
|
|
85
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
86
|
+
COMBINATIONS = T.let({
|
|
87
|
+
{} => "flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end"
|
|
88
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
89
|
+
|
|
90
|
+
SLOTS = T.let([
|
|
91
|
+
{ name: "message-footer", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
92
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
93
|
+
|
|
94
|
+
extend T::Sig
|
|
95
|
+
|
|
96
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
97
|
+
module_function def combination(options)
|
|
98
|
+
COMBINATIONS.fetch(options)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
module Group
|
|
102
|
+
ROOT_SLOT = T.let("message-group", String)
|
|
103
|
+
|
|
104
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
105
|
+
|
|
106
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
107
|
+
|
|
108
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
109
|
+
COMBINATIONS = T.let({
|
|
110
|
+
{} => "flex min-w-0 flex-col gap-2"
|
|
111
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
112
|
+
|
|
113
|
+
SLOTS = T.let([
|
|
114
|
+
{ name: "message-group", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
115
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
116
|
+
|
|
117
|
+
extend T::Sig
|
|
118
|
+
|
|
119
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
120
|
+
module_function def combination(options)
|
|
121
|
+
COMBINATIONS.fetch(options)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
module Header
|
|
125
|
+
ROOT_SLOT = T.let("message-header", String)
|
|
126
|
+
|
|
127
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
128
|
+
|
|
129
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
130
|
+
|
|
131
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
132
|
+
COMBINATIONS = T.let({
|
|
133
|
+
{} => "flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0"
|
|
134
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
135
|
+
|
|
136
|
+
SLOTS = T.let([
|
|
137
|
+
{ name: "message-header", tag: "div", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
138
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
139
|
+
|
|
140
|
+
extend T::Sig
|
|
141
|
+
|
|
142
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
143
|
+
module_function def combination(options)
|
|
144
|
+
COMBINATIONS.fetch(options)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
end
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "native-select" (item sha256: fd4cd1514494f427197a11874bcdaaa8f22b5c42618937dec428f8e77459fd49)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module NativeSelect
|
|
11
|
+
ROOT_SLOT = T.let("native-select-wrapper", 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/native-select relative w-fit has-[select:disabled]:opacity-50"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "native-select-wrapper", tag: "div", static_attributes: {}.freeze, dynamic_attributes: ["data-size"].freeze }.freeze,
|
|
24
|
+
{ name: "native-select", tag: "select", static_attributes: { class: "h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-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 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40" }.freeze, dynamic_attributes: ["data-size"].freeze }.freeze,
|
|
25
|
+
{ name: "native-select-icon", tag: "IconPlaceholder", static_attributes: { "aria-hidden" => "true", class: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none", hugeicons: "UnfoldMoreIcon", lucide: "ChevronDownIcon", phosphor: "CaretDownIcon", remixicon: "RiArrowDownSLine", tabler: "IconSelector" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
26
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
27
|
+
|
|
28
|
+
extend T::Sig
|
|
29
|
+
|
|
30
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
31
|
+
module_function def combination(options)
|
|
32
|
+
COMBINATIONS.fetch(options)
|
|
33
|
+
end
|
|
34
|
+
module OptGroup
|
|
35
|
+
ROOT_SLOT = T.let("native-select-optgroup", String)
|
|
36
|
+
|
|
37
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
38
|
+
|
|
39
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
40
|
+
|
|
41
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
42
|
+
COMBINATIONS = T.let({
|
|
43
|
+
{} => "bg-[Canvas] text-[CanvasText]"
|
|
44
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
45
|
+
|
|
46
|
+
SLOTS = T.let([
|
|
47
|
+
{ name: "native-select-optgroup", tag: "optgroup", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
48
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
49
|
+
|
|
50
|
+
extend T::Sig
|
|
51
|
+
|
|
52
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
53
|
+
module_function def combination(options)
|
|
54
|
+
COMBINATIONS.fetch(options)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
module Option
|
|
58
|
+
ROOT_SLOT = T.let("native-select-option", String)
|
|
59
|
+
|
|
60
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
61
|
+
|
|
62
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
63
|
+
|
|
64
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
65
|
+
COMBINATIONS = T.let({
|
|
66
|
+
{} => "bg-[Canvas] text-[CanvasText]"
|
|
67
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
68
|
+
|
|
69
|
+
SLOTS = T.let([
|
|
70
|
+
{ name: "native-select-option", tag: "option", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
71
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
72
|
+
|
|
73
|
+
extend T::Sig
|
|
74
|
+
|
|
75
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
76
|
+
module_function def combination(options)
|
|
77
|
+
COMBINATIONS.fetch(options)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "navigation-menu" (item sha256: 0316f9b68fe74a7e7bc4c9f2aaa93eb7370c867de32ba4d92ed5e1180941a35e)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module NavigationMenu
|
|
11
|
+
ROOT_SLOT = T.let("navigation-menu", 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/navigation-menu relative flex max-w-max flex-1 items-center justify-center"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "navigation-menu", tag: "NavigationMenuPrimitive.Root", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
24
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
25
|
+
|
|
26
|
+
extend T::Sig
|
|
27
|
+
|
|
28
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
29
|
+
module_function def combination(options)
|
|
30
|
+
COMBINATIONS.fetch(options)
|
|
31
|
+
end
|
|
32
|
+
module Content
|
|
33
|
+
ROOT_SLOT = T.let("navigation-menu-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
|
+
{} => "data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "navigation-menu-content", tag: "NavigationMenuPrimitive.Content", 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 Indicator
|
|
56
|
+
ROOT_SLOT = T.let("navigation-menu-indicator", String)
|
|
57
|
+
|
|
58
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
59
|
+
|
|
60
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
61
|
+
|
|
62
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
63
|
+
COMBINATIONS = T.let({
|
|
64
|
+
{} => "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in"
|
|
65
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
66
|
+
|
|
67
|
+
SLOTS = T.let([
|
|
68
|
+
{ name: "navigation-menu-indicator", tag: "NavigationMenuPrimitive.Icon", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
69
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
70
|
+
|
|
71
|
+
extend T::Sig
|
|
72
|
+
|
|
73
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
74
|
+
module_function def combination(options)
|
|
75
|
+
COMBINATIONS.fetch(options)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
module Item
|
|
79
|
+
ROOT_SLOT = T.let("navigation-menu-item", String)
|
|
80
|
+
|
|
81
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
82
|
+
|
|
83
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
84
|
+
|
|
85
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
86
|
+
COMBINATIONS = T.let({
|
|
87
|
+
{} => "relative"
|
|
88
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
89
|
+
|
|
90
|
+
SLOTS = T.let([
|
|
91
|
+
{ name: "navigation-menu-item", tag: "NavigationMenuPrimitive.Item", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
92
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
93
|
+
|
|
94
|
+
extend T::Sig
|
|
95
|
+
|
|
96
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
97
|
+
module_function def combination(options)
|
|
98
|
+
COMBINATIONS.fetch(options)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
module Link
|
|
102
|
+
ROOT_SLOT = T.let("navigation-menu-link", String)
|
|
103
|
+
|
|
104
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
105
|
+
|
|
106
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
107
|
+
|
|
108
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
109
|
+
COMBINATIONS = T.let({
|
|
110
|
+
{} => "flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4"
|
|
111
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
112
|
+
|
|
113
|
+
SLOTS = T.let([
|
|
114
|
+
{ name: "navigation-menu-link", tag: "NavigationMenuPrimitive.Link", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
115
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
116
|
+
|
|
117
|
+
extend T::Sig
|
|
118
|
+
|
|
119
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
120
|
+
module_function def combination(options)
|
|
121
|
+
COMBINATIONS.fetch(options)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
module List
|
|
125
|
+
ROOT_SLOT = T.let("navigation-menu-list", String)
|
|
126
|
+
|
|
127
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
128
|
+
|
|
129
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
130
|
+
|
|
131
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
132
|
+
COMBINATIONS = T.let({
|
|
133
|
+
{} => "group flex flex-1 list-none items-center justify-center gap-0"
|
|
134
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
135
|
+
|
|
136
|
+
SLOTS = T.let([
|
|
137
|
+
{ name: "navigation-menu-list", tag: "NavigationMenuPrimitive.List", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
138
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
139
|
+
|
|
140
|
+
extend T::Sig
|
|
141
|
+
|
|
142
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
143
|
+
module_function def combination(options)
|
|
144
|
+
COMBINATIONS.fetch(options)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
module Trigger
|
|
148
|
+
ROOT_SLOT = T.let("navigation-menu-trigger", String)
|
|
149
|
+
|
|
150
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
151
|
+
|
|
152
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
153
|
+
|
|
154
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
155
|
+
COMBINATIONS = T.let({
|
|
156
|
+
{} => "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted group"
|
|
157
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
158
|
+
|
|
159
|
+
SLOTS = T.let([
|
|
160
|
+
{ name: "navigation-menu-trigger", tag: "NavigationMenuPrimitive.Trigger", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
161
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
162
|
+
|
|
163
|
+
extend T::Sig
|
|
164
|
+
|
|
165
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
166
|
+
module_function def combination(options)
|
|
167
|
+
COMBINATIONS.fetch(options)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
module NavigationMenuPositioner
|
|
172
|
+
ROOT_SLOT = T.let("", String)
|
|
173
|
+
|
|
174
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
175
|
+
|
|
176
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
177
|
+
|
|
178
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
179
|
+
COMBINATIONS = T.let({
|
|
180
|
+
{} => "isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0"
|
|
181
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
182
|
+
|
|
183
|
+
SLOTS = T.let([
|
|
184
|
+
{ name: "", tag: "NavigationMenuPrimitive.Portal", static_attributes: {}.freeze, dynamic_attributes: [].freeze }.freeze
|
|
185
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
186
|
+
|
|
187
|
+
extend T::Sig
|
|
188
|
+
|
|
189
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
190
|
+
module_function def combination(options)
|
|
191
|
+
COMBINATIONS.fetch(options)
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
# !! AUTO-GENERATED by tools/extractor — DO NOT EDIT !!
|
|
5
|
+
# Source: shadcn/ui base-nova "pagination" (item sha256: 3163817c48acc7cce45755b68a46ae2b4b5a8e63e769e4dfcb00b5f7452a4a2a)
|
|
6
|
+
# Regenerate with: rake shadcn:generate
|
|
7
|
+
|
|
8
|
+
module ShadcnViewComponents
|
|
9
|
+
module Contracts
|
|
10
|
+
module Pagination
|
|
11
|
+
ROOT_SLOT = T.let("pagination", 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
|
+
{} => "mx-auto flex w-full justify-center"
|
|
20
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
21
|
+
|
|
22
|
+
SLOTS = T.let([
|
|
23
|
+
{ name: "pagination", tag: "nav", static_attributes: { "aria-label" => "pagination", role: "navigation" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
24
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
25
|
+
|
|
26
|
+
extend T::Sig
|
|
27
|
+
|
|
28
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
29
|
+
module_function def combination(options)
|
|
30
|
+
COMBINATIONS.fetch(options)
|
|
31
|
+
end
|
|
32
|
+
module Content
|
|
33
|
+
ROOT_SLOT = T.let("pagination-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 items-center gap-0.5"
|
|
42
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
43
|
+
|
|
44
|
+
SLOTS = T.let([
|
|
45
|
+
{ name: "pagination-content", tag: "ul", 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 Ellipsis
|
|
56
|
+
ROOT_SLOT = T.let("pagination-ellipsis", String)
|
|
57
|
+
|
|
58
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
59
|
+
|
|
60
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
61
|
+
|
|
62
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
63
|
+
COMBINATIONS = T.let({
|
|
64
|
+
{} => "flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4"
|
|
65
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
66
|
+
|
|
67
|
+
SLOTS = T.let([
|
|
68
|
+
{ name: "pagination-ellipsis", tag: "span", static_attributes: { "aria-hidden" => "" }.freeze, dynamic_attributes: [].freeze }.freeze
|
|
69
|
+
].freeze, T::Array[T::Hash[Symbol, T.untyped]])
|
|
70
|
+
|
|
71
|
+
extend T::Sig
|
|
72
|
+
|
|
73
|
+
sig { params(options: T::Hash[Symbol, Symbol]).returns(String) }
|
|
74
|
+
module_function def combination(options)
|
|
75
|
+
COMBINATIONS.fetch(options)
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
module Item
|
|
79
|
+
ROOT_SLOT = T.let("pagination-item", String)
|
|
80
|
+
|
|
81
|
+
# 契約クラスが属する要素の data-slot(ルートがラッパー構造の場合)
|
|
82
|
+
CLASSES_SLOT = T.let("", 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
|
+
{} => ""
|
|
91
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
92
|
+
|
|
93
|
+
SLOTS = T.let([
|
|
94
|
+
{ name: "pagination-item", tag: "li", static_attributes: {}.freeze, dynamic_attributes: [].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
|
+
module Link
|
|
105
|
+
ROOT_SLOT = T.let("", String)
|
|
106
|
+
|
|
107
|
+
DEFAULTS = T.let({}.freeze, T::Hash[Symbol, Symbol])
|
|
108
|
+
|
|
109
|
+
VARIANTS = T.let({}.freeze, T::Hash[Symbol, T::Array[Symbol]])
|
|
110
|
+
|
|
111
|
+
# キーはソート済みpropペア。値は事前解決済みの最終クラス文字列
|
|
112
|
+
COMBINATIONS = T.let({
|
|
113
|
+
{} => ""
|
|
114
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
115
|
+
|
|
116
|
+
SLOTS = T.let([
|
|
117
|
+
{ name: "", tag: "Button", static_attributes: {}.freeze, dynamic_attributes: ["nativeButton", "render", "size", "variant"].freeze }.freeze,
|
|
118
|
+
{ name: "pagination-link", tag: "a", static_attributes: {}.freeze, dynamic_attributes: ["aria-current", "data-active"].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 Next
|
|
129
|
+
ROOT_SLOT = T.let("", 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
|
+
{} => "pr-1.5!"
|
|
138
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
139
|
+
|
|
140
|
+
SLOTS = T.let([
|
|
141
|
+
{ name: "", tag: "PaginationLink", static_attributes: { "aria-label" => "Go to next page" }.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 Previous
|
|
152
|
+
ROOT_SLOT = T.let("", 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
|
+
{} => "pl-1.5!"
|
|
161
|
+
}.freeze, T::Hash[T::Hash[Symbol, Symbol], String])
|
|
162
|
+
|
|
163
|
+
SLOTS = T.let([
|
|
164
|
+
{ name: "", tag: "PaginationLink", static_attributes: { "aria-label" => "Go to previous page" }.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
|
+
end
|
|
175
|
+
end
|
|
176
|
+
end
|