ariadne_view_components 0.0.12-aarch64-linux → 0.0.14-aarch64-linux
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 +4 -4
- data/app/assets/javascripts/ariadne.d.ts +1 -0
- data/app/assets/javascripts/ariadne_view_components.js +2 -2
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/javascripts/comment-component.d.ts +1 -2
- data/app/assets/javascripts/tab-container-component.d.ts +1 -0
- data/app/assets/javascripts/tab-nav-component.d.ts +9 -0
- data/app/assets/stylesheets/ariadne_view_components.css +1 -0
- data/app/assets/stylesheets/dropdown.css +46 -0
- data/app/assets/stylesheets/tooltip-component.css +8 -8
- data/app/components/ariadne/ariadne.ts +3 -2
- data/app/components/ariadne/avatar_component.rb +81 -0
- data/app/components/ariadne/avatar_stack_component.html.erb +12 -0
- data/app/components/ariadne/avatar_stack_component.rb +75 -0
- data/app/components/ariadne/base_button.rb +13 -4
- data/app/components/ariadne/blankslate_component.rb +4 -4
- data/app/components/ariadne/body_component.rb +1 -1
- data/app/components/ariadne/button_component.html.erb +1 -1
- data/app/components/ariadne/button_component.rb +11 -5
- data/app/components/ariadne/comment-component.ts +32 -50
- data/app/components/ariadne/comment_component.html.erb +31 -13
- data/app/components/ariadne/comment_component.rb +18 -6
- data/app/components/ariadne/component.rb +3 -5
- data/app/components/ariadne/container_component.rb +1 -1
- data/app/components/ariadne/counter_component.rb +1 -1
- data/app/components/ariadne/details_component.html.erb +4 -0
- data/app/components/ariadne/details_component.rb +80 -0
- data/app/components/ariadne/dropdown/menu_component.html.erb +20 -0
- data/app/components/ariadne/dropdown/menu_component.rb +101 -0
- data/app/components/ariadne/dropdown/menu_component.ts +1 -0
- data/app/components/ariadne/dropdown_component.html.erb +8 -0
- data/app/components/ariadne/dropdown_component.rb +172 -0
- data/app/components/ariadne/flash_component.rb +1 -1
- data/app/components/ariadne/flex_component.rb +2 -2
- data/app/components/ariadne/footer_component.html.erb +1 -1
- data/app/components/ariadne/footer_component.rb +1 -1
- data/app/components/ariadne/grid_component.html.erb +2 -2
- data/app/components/ariadne/grid_component.rb +10 -8
- data/app/components/ariadne/header_component.rb +3 -3
- data/app/components/ariadne/heroicon_component.html.erb +1 -1
- data/app/components/ariadne/heroicon_component.rb +7 -6
- data/app/components/ariadne/inline_flex_component.html.erb +1 -0
- data/app/components/ariadne/inline_flex_component.rb +8 -1
- data/app/components/ariadne/link_component.rb +2 -2
- data/app/components/ariadne/list_component.html.erb +2 -11
- data/app/components/ariadne/list_component.rb +11 -15
- data/app/components/ariadne/main_component.rb +2 -2
- data/app/components/ariadne/narrow_container_component.rb +1 -1
- data/app/components/ariadne/panel_bar_component.rb +2 -2
- data/app/components/ariadne/pill_component.rb +20 -6
- data/app/components/ariadne/rich-text-area-component.ts +4 -4
- data/app/components/ariadne/rich_text_area_component.html.erb +2 -2
- data/app/components/ariadne/rich_text_area_component.rb +2 -2
- data/app/components/ariadne/slideover_component.html.erb +1 -1
- data/app/components/ariadne/slideover_component.rb +2 -2
- data/app/components/ariadne/tab-container-component.ts +24 -0
- data/app/components/ariadne/tab-nav-component.ts +34 -0
- data/app/components/ariadne/tab_component.html.erb +2 -6
- data/app/components/ariadne/tab_component.rb +75 -19
- data/app/components/ariadne/tab_container_component.erb +12 -0
- data/app/components/ariadne/tab_container_component.rb +67 -0
- data/app/components/ariadne/tab_nav_component.html.erb +7 -0
- data/app/components/ariadne/tab_nav_component.rb +72 -0
- data/app/components/ariadne/table_nav_component.html.erb +52 -0
- data/app/components/ariadne/table_nav_component.rb +338 -0
- data/app/components/ariadne/time_ago_component.rb +1 -1
- data/app/components/ariadne/timeline_component.rb +1 -1
- data/app/components/ariadne/tooltip_component.html.erb +1 -1
- data/app/components/ariadne/tooltip_component.rb +4 -4
- data/app/lib/ariadne/action_view_extensions/form_helper.rb +21 -7
- data/app/lib/ariadne/fetch_or_fallback_helper.rb +11 -3
- data/app/lib/ariadne/form_builder.rb +2 -2
- data/app/lib/ariadne/icon_helper.rb +17 -13
- data/lib/ariadne/view_components/constants.rb +2 -2
- data/lib/ariadne/view_components/statuses.rb +2 -2
- data/lib/ariadne/view_components/version.rb +1 -1
- data/lib/rubocop/config/default.yml +1 -1
- data/lib/tasks/docs.rake +22 -97
- data/static/arguments.yml +151 -23
- data/static/audited_at.json +17 -1
- data/static/classes.yml +160 -268
- data/static/constants.json +208 -40
- data/static/statuses.json +17 -1
- data/tailwind.config.js +28 -19
- metadata +24 -10
- data/app/components/ariadne/tab_bar_component.html.erb +0 -3
- data/app/components/ariadne/tab_bar_component.rb +0 -45
- data/app/lib/ariadne/join_style_arguments_helper.rb +0 -14
- data/app/lib/ariadne/tab_nav_helper.rb +0 -35
- data/app/lib/ariadne/tabbed_component_helper.rb +0 -39
- data/app/lib/ariadne/test_selector_helper.rb +0 -20
- data/app/lib/ariadne/underline_nav_helper.rb +0 -44
data/static/constants.json
CHANGED
@@ -1,6 +1,44 @@
|
|
1
1
|
{
|
2
|
+
"Ariadne::AvatarComponent": {
|
3
|
+
"DEFAULT_CLASSES": "ariadne-inline-block ariadne-rounded-full ariadne-ring-2 ariadne-ring-white",
|
4
|
+
"DEFAULT_SHAPE": "circle",
|
5
|
+
"DEFAULT_SIZE": 20,
|
6
|
+
"SHAPE_OPTIONS": [
|
7
|
+
"circle",
|
8
|
+
"square"
|
9
|
+
],
|
10
|
+
"SIZE_OPTIONS": [
|
11
|
+
16,
|
12
|
+
20,
|
13
|
+
24,
|
14
|
+
32,
|
15
|
+
40,
|
16
|
+
48,
|
17
|
+
80
|
18
|
+
],
|
19
|
+
"SMALL_THRESHOLD": 24
|
20
|
+
},
|
21
|
+
"Ariadne::AvatarStackComponent": {
|
22
|
+
"ALIGN_DEFAULT": "left",
|
23
|
+
"ALIGN_OPTIONS": [
|
24
|
+
"left",
|
25
|
+
"right"
|
26
|
+
],
|
27
|
+
"BODY_TAG_OPTIONS": [
|
28
|
+
"div",
|
29
|
+
"span"
|
30
|
+
],
|
31
|
+
"DEFAULT_BODY_TAG": "div",
|
32
|
+
"DEFAULT_CLASSES": "ariadne-flex ariadne--space-x-2 ariadne-overflow-hidden",
|
33
|
+
"DEFAULT_TAG": "div",
|
34
|
+
"TAG_OPTIONS": [
|
35
|
+
"div",
|
36
|
+
"span"
|
37
|
+
]
|
38
|
+
},
|
2
39
|
"Ariadne::BaseButton": {
|
3
40
|
"DEFAULT_CLASSES": "ariadne-inline-flex ariadne-items-center ariadne-border ariadne-shadow-sm focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2",
|
41
|
+
"DEFAULT_NUDE_CLASSES": "ariadne-inline-flex focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2",
|
4
42
|
"DEFAULT_SIZE": "md",
|
5
43
|
"DEFAULT_TAG": "button",
|
6
44
|
"DEFAULT_TYPE": "button",
|
@@ -16,11 +54,6 @@
|
|
16
54
|
"a",
|
17
55
|
"summary"
|
18
56
|
],
|
19
|
-
"TYPE_OPTIONS": [
|
20
|
-
"button",
|
21
|
-
"reset",
|
22
|
-
"submit"
|
23
|
-
],
|
24
57
|
"TYPE_SUBMIT": "submit",
|
25
58
|
"VALID_SIZES": [
|
26
59
|
"xs",
|
@@ -28,6 +61,11 @@
|
|
28
61
|
"md",
|
29
62
|
"lg",
|
30
63
|
"xl"
|
64
|
+
],
|
65
|
+
"VALID_TYPES": [
|
66
|
+
"button",
|
67
|
+
"reset",
|
68
|
+
"submit"
|
31
69
|
]
|
32
70
|
},
|
33
71
|
"Ariadne::BaseComponent": {
|
@@ -50,7 +88,7 @@
|
|
50
88
|
},
|
51
89
|
"Ariadne::BlankslateComponent": {
|
52
90
|
"DEFAULT_CLASSES": "ariadne-text-center",
|
53
|
-
"DEFAULT_HEADING_CLASSES": "text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl",
|
91
|
+
"DEFAULT_HEADING_CLASSES": "ariadne-text-3xl ariadne-font-extrabold ariadne-tracking-tight ariadne-text-gray-900 sm:ariadne-text-4xl",
|
54
92
|
"DEFAULT_IMAGE_SIZE": 56,
|
55
93
|
"DEFAULT_TAG": "div",
|
56
94
|
"TAG_OPTIONS": [
|
@@ -64,6 +102,7 @@
|
|
64
102
|
"DEFAULT_SCHEME": "default",
|
65
103
|
"LINK_SCHEME": "link",
|
66
104
|
"SCHEME_CLASS_MAPPINGS": {
|
105
|
+
"link": "ariadne-underline ariadne-decoration-double",
|
67
106
|
"none": "",
|
68
107
|
"default": "ariadne-text-purple-800 ariadne-bg-purple-50 hover:ariadne-bg-purple-100 ariadne-border-purple-300 focus:ariadne-ring-offset-purple-50 focus:ariadne-ring-purple-600",
|
69
108
|
"info": "ariadne-text-blue-800 ariadne-bg-blue-50 hover:ariadne-bg-blue-100 ariadne-border-blue-300 focus:ariadne-ring-offset-blue-50 focus:ariadne-ring-blue-600",
|
@@ -72,6 +111,7 @@
|
|
72
111
|
"danger": "ariadne-text-red-800 ariadne-bg-red-50 hover:ariadne-bg-red-100 ariadne-border-red-300 focus:ariadne-ring-offset-red-50 focus:ariadne-ring-red-600"
|
73
112
|
},
|
74
113
|
"VALID_SCHEMES": [
|
114
|
+
"link",
|
75
115
|
"none",
|
76
116
|
"default",
|
77
117
|
"info",
|
@@ -92,7 +132,7 @@
|
|
92
132
|
"data-action": "click->clipboard-copy-component#copy mouseover->tooltip-component#show mouseout->tooltip-component#hide",
|
93
133
|
"data-tooltip-component-target": "trigger"
|
94
134
|
},
|
95
|
-
"DEFAULT_CLASSES": "
|
135
|
+
"DEFAULT_CLASSES": "ariadne-underline ariadne-decoration-double",
|
96
136
|
"DEFAULT_TAG": "clipboard-copy"
|
97
137
|
},
|
98
138
|
"Ariadne::CommentComponent": {
|
@@ -110,6 +150,66 @@
|
|
110
150
|
"Ariadne::CounterComponent": {
|
111
151
|
"DEFAULT_CLASSES": "ariadne-inline-flex ariadne-items-center ariadne-p-1 ariadne-border ariadne-border-transparent ariadne-rounded-full ariadne-shadow-sm focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2"
|
112
152
|
},
|
153
|
+
"Ariadne::DetailsComponent": {
|
154
|
+
"DEFAULT_BODY_CLASSES": "ariadne-absolute ariadne-right-0 ariadne-z-10 ariadne-mt-2 ariadne-w-56 ariadne-origin-top-right ariadne-divide-y ariadne-divide-gray-100 ariadne-rounded-md ariadne-bg-white ariadne-shadow-lg ariadne-ring-1 ariadne-ring-black ariadne-ring-opacity-5 focus:ariadne-outline-none",
|
155
|
+
"DEFAULT_BODY_TAG": "div",
|
156
|
+
"DEFAULT_CLASSES": "",
|
157
|
+
"DEFAULT_TAG": "details",
|
158
|
+
"NO_OVERLAY": "none",
|
159
|
+
"OVERLAY_MAPPINGS": {
|
160
|
+
"none": "",
|
161
|
+
"default": ""
|
162
|
+
},
|
163
|
+
"VALID_BODY_TAGS": [
|
164
|
+
"ul",
|
165
|
+
"details-menu",
|
166
|
+
"details-dialog",
|
167
|
+
"div"
|
168
|
+
]
|
169
|
+
},
|
170
|
+
"Ariadne::Dropdown::MenuComponent": {
|
171
|
+
"DEFAULT_AS_OPTION": "default",
|
172
|
+
"DEFAULT_CLASSES": "",
|
173
|
+
"DEFAULT_DIRECTION": "se",
|
174
|
+
"DEFAULT_HEADER_CLASSES": "ariadne-text-sm ariadne-font-medium ariadne-text-gray-900",
|
175
|
+
"DEFAULT_TAG": "details-menu",
|
176
|
+
"Item": "Ariadne::Dropdown::MenuComponent::Item",
|
177
|
+
"TAG_OPTIONS": [
|
178
|
+
"details-menu"
|
179
|
+
],
|
180
|
+
"VALID_AS_OPTIONS": [
|
181
|
+
"default",
|
182
|
+
"list"
|
183
|
+
],
|
184
|
+
"VALID_DIRECTIONS": [
|
185
|
+
"se",
|
186
|
+
"sw",
|
187
|
+
"w",
|
188
|
+
"e",
|
189
|
+
"ne",
|
190
|
+
"s"
|
191
|
+
]
|
192
|
+
},
|
193
|
+
"Ariadne::Dropdown::MenuComponent::Item": {
|
194
|
+
"BUTTON_TAGS": [
|
195
|
+
"button",
|
196
|
+
"summary"
|
197
|
+
],
|
198
|
+
"DEFAULT_ITEM_CLASSES": "ariadne-block ariadne-px-4 ariadne-py-2 ariadne-text-sm ariadne-text-gray-700",
|
199
|
+
"DEFAULT_TAG": "a",
|
200
|
+
"VALID_TAGS": [
|
201
|
+
"a",
|
202
|
+
"button",
|
203
|
+
"summary"
|
204
|
+
]
|
205
|
+
},
|
206
|
+
"Ariadne::DropdownComponent": {
|
207
|
+
"DEFAULT_CLASSES": "",
|
208
|
+
"DEFAULT_TAG": "div",
|
209
|
+
"TAG_OPTIONS": [
|
210
|
+
"div"
|
211
|
+
]
|
212
|
+
},
|
113
213
|
"Ariadne::FlashComponent": {
|
114
214
|
"BG_SCHEME_CLASS_MAPPINGS": {
|
115
215
|
"default": "ariadne-bg-blue-50",
|
@@ -156,7 +256,7 @@
|
|
156
256
|
]
|
157
257
|
},
|
158
258
|
"Ariadne::FlexComponent": {
|
159
|
-
"DEFAULT_CLASSES": "flex",
|
259
|
+
"DEFAULT_CLASSES": "ariadne-flex",
|
160
260
|
"DEFAULT_TAG": "div",
|
161
261
|
"TAG_OPTIONS": [
|
162
262
|
"div"
|
@@ -173,20 +273,21 @@
|
|
173
273
|
},
|
174
274
|
"Ariadne::GridComponent": {
|
175
275
|
"DEFAULT_CLASSES": "ariadne-grid ariadne-gap-6 sm:ariadne-grid-cols-2 lg:ariadne-grid-cols-3",
|
176
|
-
"DEFAULT_LINK_COLOR_CLASSES": "
|
276
|
+
"DEFAULT_LINK_COLOR_CLASSES": "focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2 focus:ariadne-ring-purple-500",
|
177
277
|
"GridItem": "Ariadne::GridComponent::GridItem"
|
178
278
|
},
|
179
279
|
"Ariadne::GridComponent::GridItem": {
|
180
|
-
"DEFAULT_ACTION_LINK_CLASSES": "
|
181
|
-
"
|
182
|
-
"
|
280
|
+
"DEFAULT_ACTION_LINK_CLASSES": "ariadne-relative ariadne--mr-px ariadne-w-0 ariadne-flex-1 ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-py-4 ariadne-text-sm ariadne-font-medium ariadne-border ariadne-border-transparent",
|
281
|
+
"DEFAULT_ACTION_LINK_COLORS": "hover:ariadne-text-gray-500",
|
282
|
+
"DEFAULT_ENTRY_CLASSES": "ariadne-group ariadne-flex-1 ariadne-flex ariadne-flex-col ariadne-p-8 hover:ariadne-text-gray-500",
|
283
|
+
"DEFAULT_ITEM_CLASSES": "ariadne-flex ariadne-flex-col ariadne-text-center ariadne-rounded-lg ariadne-shadow text-black-700 ariadne-border-black"
|
183
284
|
},
|
184
285
|
"Ariadne::HeaderComponent": {
|
185
286
|
"DEFAULT_CLASSES": "ariadne-sticky ariadne-top-0 ariadne-z-50 ariadne-px-4 ariadne-py-5 ariadne-bg-white ariadne-shadow-sm shadow-slate-900/5 ariadne-transition ariadne-duration-500",
|
186
287
|
"DEFAULT_IMAGE_LOGO_CLASSES": "ariadne-h-10 ariadne-w-auto",
|
187
288
|
"DEFAULT_NAV_LINK_CLASSES": "ariadne-inline-block ariadne-rounded-lg ariadne-py-1 ariadne-px-2 ariadne-text-sm text-slate-700 hover:bg-slate-100 hover:text-slate-900",
|
188
|
-
"DEFAULT_PROFILE_LINK_CLASSES": "group ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-rounded-full ariadne-py-2 ariadne-px-4 ariadne-text-sm ariadne-font-semibold focus:ariadne-outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
|
189
|
-
"DEFAULT_SIGNUP_LINK_CLASSES": "group ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-rounded-full ariadne-py-2 ariadne-px-4 ariadne-text-sm ariadne-font-semibold focus:ariadne-outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
|
289
|
+
"DEFAULT_PROFILE_LINK_CLASSES": "group ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-rounded-full ariadne-py-2 ariadne-px-4 ariadne-text-sm ariadne-font-semibold focus:ariadne-outline-none focus-visible:ariadne-outline-2 focus-visible:outline-offset-2",
|
290
|
+
"DEFAULT_SIGNUP_LINK_CLASSES": "group ariadne-inline-flex ariadne-items-center ariadne-justify-center ariadne-rounded-full ariadne-py-2 ariadne-px-4 ariadne-text-sm ariadne-font-semibold focus:ariadne-outline-none focus-visible:ariadne-outline-2 focus-visible:outline-offset-2",
|
190
291
|
"DEFAULT_TEXT_LOGO_CLASSES": "ariadne-flex ariadne-items-center ariadne-font-bold ariadne-text-xl",
|
191
292
|
"LINK_CLASSES": "ariadne-rounded-lg ariadne-py-1 ariadne-px-2 text-slate-700 hover:bg-slate-100 hover:text-slate-900"
|
192
293
|
},
|
@@ -281,19 +382,22 @@
|
|
281
382
|
"variant": "outline"
|
282
383
|
}
|
283
384
|
],
|
284
|
-
"SIZE_DEFAULT": "
|
385
|
+
"SIZE_DEFAULT": "md",
|
285
386
|
"SIZE_LARGE": "lg",
|
286
387
|
"SIZE_MAPPINGS": {
|
287
|
-
"
|
388
|
+
"mu": 16,
|
389
|
+
"sm": 20,
|
288
390
|
"md": 24,
|
289
391
|
"lg": 128
|
290
392
|
},
|
291
|
-
"
|
393
|
+
"SIZE_MICRO": "mu",
|
292
394
|
"SIZE_OPTIONS": [
|
395
|
+
"mu",
|
293
396
|
"sm",
|
294
397
|
"md",
|
295
398
|
"lg"
|
296
|
-
]
|
399
|
+
],
|
400
|
+
"SIZE_SMALL": "sm"
|
297
401
|
},
|
298
402
|
"Ariadne::ImageComponent": {
|
299
403
|
"DEFAULT_TAG": "img"
|
@@ -305,7 +409,7 @@
|
|
305
409
|
"DEFAULT_TEXT_CLASSES": "ariadne-pl-2 ariadne-text-sm ariadne-font-medium ariadne-text-gray-900",
|
306
410
|
"DEFAULT_TEXT_CLOSED_CLASSES": "ariadne-text-state-closed",
|
307
411
|
"DEFAULT_TEXT_OPEN_CLASSES": "ariadne-text-state-open",
|
308
|
-
"STATE_CLOSED_SVG": "<svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" class=\"ariadne-stroke-state-closed fill-state-closed \" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n</svg>\n",
|
412
|
+
"STATE_CLOSED_SVG": "<svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" class=\"ariadne-stroke-state-closed ariadne-fill-state-closed \" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n</svg>\n",
|
309
413
|
"STATE_OPEN_SVG": "<svg viewBox=\"0 0 24 24\" width=\"12\" height=\"12\" class=\"ariadne-stroke-state-open\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n</svg>\n",
|
310
414
|
"STATE_OPTIONS": [
|
311
415
|
"closed",
|
@@ -313,8 +417,8 @@
|
|
313
417
|
]
|
314
418
|
},
|
315
419
|
"Ariadne::LinkComponent": {
|
316
|
-
"DEFAULT_ACTIONABLE_CLASSES": "
|
317
|
-
"DEFAULT_CLASSES": "ariadne-cursor-pointer",
|
420
|
+
"DEFAULT_ACTIONABLE_CLASSES": "ariadne-underline ariadne-decoration-double",
|
421
|
+
"DEFAULT_CLASSES": "ariadne-cursor-pointer ariadne-font-semibold hover:ariadne-text-button-text-color focus:ariadne-outline-none focus:ariadne-ring-2 focus:ariadne-ring-offset-2 focus:ariadne-ring-purple-500",
|
318
422
|
"DEFAULT_TAG": "a",
|
319
423
|
"TAG_OPTIONS": [
|
320
424
|
"a",
|
@@ -330,7 +434,7 @@
|
|
330
434
|
"DEFAULT_ITEM_CLASSES": "ariadne-relative ariadne-p-1.5 focus:ariadne-ring-2 focus:ariadne-ring-offset-2 focus:ariadne-ring-purple-500 hover:ariadne-bg-button-hover-color"
|
331
435
|
},
|
332
436
|
"Ariadne::MainComponent": {
|
333
|
-
"DEFAULT_CLASSES": "flex-auto"
|
437
|
+
"DEFAULT_CLASSES": "ariadne-flex-auto"
|
334
438
|
},
|
335
439
|
"Ariadne::NarrowContainerComponent": {
|
336
440
|
"DEFAULT_CLASSES": "ariadne-max-w-7xl ariadne-mx-auto ariadne-py-12 ariadne-px-4 sm:ariadne-px-6 lg:ariadne-py-16 lg:ariadne-px-8",
|
@@ -352,14 +456,14 @@
|
|
352
456
|
"DEFAULT_WRAPPER_CLASSES": "group ariadne-flex ariadne-items-center ariadne-w-full"
|
353
457
|
},
|
354
458
|
"Ariadne::PillComponent": {
|
355
|
-
"DEFAULT_CLASSES": "ariadne-flex-shrink-0 ariadne-inline-block ariadne-px-2 ariadne-py-0.5 ariadne-text-xs ariadne-font-medium ariadne-rounded-full",
|
459
|
+
"DEFAULT_CLASSES": "ariadne-flex-shrink-0 ariadne-inline-block ariadne-px-2 ariadne-py-0.5 ariadne-text-xs ariadne-font-medium ariadne-rounded-full ariadne-whitespace-nowrap",
|
356
460
|
"DEFAULT_TAG": "span",
|
357
461
|
"TAG_OPTIONS": [
|
358
462
|
"span"
|
359
463
|
]
|
360
464
|
},
|
361
465
|
"Ariadne::RichTextAreaComponent": {
|
362
|
-
"DEFAULT_CLASSES": "ariadne-block
|
466
|
+
"DEFAULT_CLASSES": "ariadne-block",
|
363
467
|
"DEFAULT_TAG": "div"
|
364
468
|
},
|
365
469
|
"Ariadne::SlideoverComponent": {
|
@@ -376,20 +480,84 @@
|
|
376
480
|
"xl"
|
377
481
|
]
|
378
482
|
},
|
379
|
-
"Ariadne::
|
380
|
-
"
|
483
|
+
"Ariadne::TabComponent": {
|
484
|
+
"ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
|
485
|
+
true,
|
486
|
+
"page"
|
487
|
+
],
|
488
|
+
"DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page",
|
489
|
+
"DEFAULT_CLASSES": "ariadne-border-transparent ariadne-text-gray-500 hover:ariadne-text-gray-700 hover:ariadne-border-gray-300 ariadne-whitespace-nowrap ariadne-py-4 ariadne-px-1 ariadne-border-b-2 ariadne-font-medium ariadne-text-sm"
|
490
|
+
},
|
491
|
+
"Ariadne::TabContainerComponent": {
|
492
|
+
"DEFAULT_CLASSES": "",
|
493
|
+
"DEFAULT_SELECTED_CLASSES": "ariadne-border-indigo-500 ariadne-text-indigo-600",
|
494
|
+
"DEFAULT_TAG": "tab-container",
|
495
|
+
"DEFAULT_UNSELECTED_CLASSES": "ariadne-text-gray-500 hover:ariadne-text-gray-700 hover:ariadne-border-gray-300"
|
496
|
+
},
|
497
|
+
"Ariadne::TabNavComponent": {
|
498
|
+
"BODY_TAG_DEFAULT": "ul",
|
499
|
+
"DEFAULT_CLASSES": "",
|
381
500
|
"DEFAULT_TAG": "nav",
|
501
|
+
"SELECTED_CLASSES": "ariadne-border-indigo-500 ariadne-text-indigo-600",
|
382
502
|
"TAG_OPTIONS": [
|
383
|
-
"nav"
|
384
|
-
|
503
|
+
"nav",
|
504
|
+
"div"
|
505
|
+
],
|
506
|
+
"UNSELECTED_CLASSES": "ariadne-text-gray-500 hover:ariadne-text-gray-700 hover:ariadne-border-gray-300"
|
507
|
+
},
|
508
|
+
"Ariadne::TableNavComponent": {
|
509
|
+
"BaseCellItem": "Ariadne::TableNavComponent::BaseCellItem",
|
510
|
+
"BaseRowItem": "Ariadne::TableNavComponent::BaseRowItem",
|
511
|
+
"DEFAULT_CLASSES": "ariadne-min-w-full ariadne-divide-y ariadne-divide-gray-300",
|
512
|
+
"DEFAULT_TAG": "table",
|
513
|
+
"FooterItem": "Ariadne::TableNavComponent::FooterItem",
|
514
|
+
"PaginationBarItem": "Ariadne::TableNavComponent::PaginationBarItem"
|
515
|
+
},
|
516
|
+
"Ariadne::TableNavComponent::BaseCellItem": {
|
517
|
+
"CellItem": "Ariadne::TableNavComponent::BaseCellItem::CellItem",
|
518
|
+
"DEFAULT_CELL_CLASSES": "ariadne-py-3.5 ariadne-pl-4 ariadne-pr-3 ariadne-text-left ariadne-text-sm ariadne-text-gray-900",
|
519
|
+
"HeaderCellItem": "Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem"
|
520
|
+
},
|
521
|
+
"Ariadne::TableNavComponent::BaseCellItem::CellItem": {
|
522
|
+
"DEFAULT_CELL_CLASSES": "",
|
523
|
+
"DEFAULT_TAG": "td"
|
524
|
+
},
|
525
|
+
"Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem": {
|
526
|
+
"DEFAULT_HEADER_CELL_CLASSES": "ariadne-py-3.5 ariadne-pl-4 ariadne-pr-3 ariadne-text-left ariadne-text-sm ariadne-font-semibold ariadne-text-gray-900 sm:ariadne-pl-6 md:ariadne-pl-0",
|
527
|
+
"DEFAULT_TAG": "th",
|
528
|
+
"WIDTH_CLASSES": {
|
529
|
+
"none": "ariadne-flex-none ariadne-w-14 ariadne-px-4",
|
530
|
+
"default": "ariadne-flex-initial",
|
531
|
+
"narrow": "ariadne-flex-initial ariadne-w-1/5 ariadne-text-right",
|
532
|
+
"wide": "ariadne-flex-grow ariadne-w-3/5 sm:ariadne-pl-6"
|
533
|
+
}
|
385
534
|
},
|
386
|
-
"Ariadne::
|
387
|
-
"
|
388
|
-
"
|
389
|
-
"
|
390
|
-
"
|
391
|
-
|
392
|
-
|
535
|
+
"Ariadne::TableNavComponent::BaseRowItem": {
|
536
|
+
"BASE_MAIN_CLASSES": "ariadne-pr-5",
|
537
|
+
"BASE_ROW_CLASSES": "",
|
538
|
+
"BASE_SELECTION_CLASSES": "",
|
539
|
+
"DEFAULT_TAG": "tr",
|
540
|
+
"HeaderRowItem": "Ariadne::TableNavComponent::BaseRowItem::HeaderRowItem",
|
541
|
+
"RowItem": "Ariadne::TableNavComponent::BaseRowItem::RowItem"
|
542
|
+
},
|
543
|
+
"Ariadne::TableNavComponent::BaseRowItem::HeaderRowItem": {
|
544
|
+
"DEFAULT_HEADER_ROW_CLASSES": "ariadne-bg-gray-50 ariadne-text-left"
|
545
|
+
},
|
546
|
+
"Ariadne::TableNavComponent::BaseRowItem::RowItem": {
|
547
|
+
"DEFAULT_METADATA_CLASSES": "",
|
548
|
+
"DEFAULT_ROW_CLASSES": "ariadne-bg-white"
|
549
|
+
},
|
550
|
+
"Ariadne::TableNavComponent::FooterItem": {
|
551
|
+
"DEFAULT_FOOTER_CLASSES": "ariadne-border-none ariadne-flex ariadne-items-center ariadne-justify-between ariadne-px-4 ariadne-py-3 sm:ariadne-px-6",
|
552
|
+
"DEFAULT_RESULT_CLASSES": "ariadne-text-sm ariadne-text-gray-700"
|
553
|
+
},
|
554
|
+
"Ariadne::TableNavComponent::PaginationBarItem": {
|
555
|
+
"DEFAULT_CURRENT_PAGE_CLASSES": "ariadne-relative ariadne-z-10 ariadne-inline-flex ariadne-items-center ariadne-border ariadne-border-indigo-500 ariadne-bg-indigo-50 ariadne-px-4 ariadne-py-2 ariadne-text-sm ariadne-font-medium ariadne-text-indigo-600 focus:ariadne-z-20",
|
556
|
+
"DEFAULT_GAP_CLASSES": " ariadne-relative ariadne-inline-flex ariadne-items-center ariadne-border ariadne-border-gray-300 ariadne-bg-white ariadne-px-4 ariadne-py-2 ariadne-text-sm ariadne-font-medium ariadne-text-gray-700",
|
557
|
+
"DEFAULT_NEXT_PAGE_CLASSES": "ariadne-relative ariadne-inline-flex ariadne-items-center ariadne-rounded-r-md ariadne-border ariadne-border-gray-300 ariadne-bg-white ariadne-px-2 ariadne-py-2 ariadne-text-sm ariadne-font-medium ariadne-text-gray-500 hover:ariadne-bg-gray-50 focus:ariadne-z-20",
|
558
|
+
"DEFAULT_PAGE_CLASSES": "ariadne-relative ariadne-inline-flex ariadne-items-center ariadne-border ariadne-border-gray-300 ariadne-bg-white ariadne-px-4 ariadne-py-2 ariadne-text-sm ariadne-font-medium ariadne-text-gray-500 hover:ariadne-bg-gray-50 focus:ariadne-z-20",
|
559
|
+
"DEFAULT_PAGINATOR_CLASSES": "ariadne-flex ariadne-items-center ariadne-justify-between ariadne-m-10",
|
560
|
+
"DEFAULT_PREV_PAGE_CLASSES": "ariadne-relative ariadne-inline-flex ariadne-items-center ariadne-rounded-l-md ariadne-border ariadne-border-gray-300 ariadne-bg-white ariadne-px-2 ariadne-py-2 ariadne-text-sm ariadne-font-medium ariadne-text-gray-500 hover:ariadne-bg-gray-50 focus:ariadne-z-20"
|
393
561
|
},
|
394
562
|
"Ariadne::Text": {
|
395
563
|
"DEFAULT_TAG": "span"
|
@@ -408,19 +576,19 @@
|
|
408
576
|
"Ariadne::TooltipComponent": {
|
409
577
|
"DATA_ACTION": "mouseover->tooltip-component#show mouseout->tooltip-component#hide",
|
410
578
|
"DATA_CONTROLLER": "tooltip-component",
|
411
|
-
"DEFAULT_CLASSES": "ariadne-invisible ariadne-absolute ariadne-bg-slate-900 ariadne-text-white ariadne-font-semibold ariadne-max-w-xs ariadne-py-1 ariadne-px-2 ariadne-rounded z-max",
|
579
|
+
"DEFAULT_CLASSES": "ariadne-invisible ariadne-absolute ariadne-bg-slate-900 ariadne-text-white ariadne-font-semibold ariadne-max-w-xs ariadne-py-1 ariadne-px-2 ariadne-rounded ariadne-z-max",
|
412
580
|
"DEFAULT_PLACEMENT": "top",
|
413
581
|
"DEFAULT_TAG": "tooltip",
|
414
582
|
"TYPE_DEFAULT": "description",
|
415
|
-
"TYPE_OPTIONS": [
|
416
|
-
"label",
|
417
|
-
"description"
|
418
|
-
],
|
419
583
|
"VALID_PLACEMENTS": [
|
420
584
|
"top",
|
421
585
|
"right",
|
422
586
|
"bottom",
|
423
587
|
"left"
|
588
|
+
],
|
589
|
+
"VALID_TYPES": [
|
590
|
+
"label",
|
591
|
+
"description"
|
424
592
|
]
|
425
593
|
}
|
426
594
|
}
|
data/static/statuses.json
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
{
|
2
|
+
"Ariadne::AvatarComponent": "stable",
|
3
|
+
"Ariadne::AvatarStackComponent": "stable",
|
2
4
|
"Ariadne::BaseButton": "stable",
|
3
5
|
"Ariadne::BaseComponent": "stable",
|
4
6
|
"Ariadne::BlankslateComponent": "stable",
|
@@ -9,6 +11,10 @@
|
|
9
11
|
"Ariadne::ContainerComponent": "stable",
|
10
12
|
"Ariadne::Content": "stable",
|
11
13
|
"Ariadne::CounterComponent": "stable",
|
14
|
+
"Ariadne::DetailsComponent": "stable",
|
15
|
+
"Ariadne::Dropdown::MenuComponent": "stable",
|
16
|
+
"Ariadne::Dropdown::MenuComponent::Item": "stable",
|
17
|
+
"Ariadne::DropdownComponent": "stable",
|
12
18
|
"Ariadne::FlashComponent": "stable",
|
13
19
|
"Ariadne::FlexComponent": "stable",
|
14
20
|
"Ariadne::FooterComponent": "stable",
|
@@ -29,8 +35,18 @@
|
|
29
35
|
"Ariadne::PillComponent": "stable",
|
30
36
|
"Ariadne::RichTextAreaComponent": "stable",
|
31
37
|
"Ariadne::SlideoverComponent": "stable",
|
32
|
-
"Ariadne::TabBarComponent": "stable",
|
33
38
|
"Ariadne::TabComponent": "stable",
|
39
|
+
"Ariadne::TabContainerComponent": "stable",
|
40
|
+
"Ariadne::TabNavComponent": "stable",
|
41
|
+
"Ariadne::TableNavComponent": "stable",
|
42
|
+
"Ariadne::TableNavComponent::BaseCellItem": "stable",
|
43
|
+
"Ariadne::TableNavComponent::BaseCellItem::CellItem": "stable",
|
44
|
+
"Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem": "stable",
|
45
|
+
"Ariadne::TableNavComponent::BaseRowItem": "stable",
|
46
|
+
"Ariadne::TableNavComponent::BaseRowItem::HeaderRowItem": "stable",
|
47
|
+
"Ariadne::TableNavComponent::BaseRowItem::RowItem": "stable",
|
48
|
+
"Ariadne::TableNavComponent::FooterItem": "stable",
|
49
|
+
"Ariadne::TableNavComponent::PaginationBarItem": "stable",
|
34
50
|
"Ariadne::Text": "stable",
|
35
51
|
"Ariadne::TimeAgoComponent": "stable",
|
36
52
|
"Ariadne::TimelineComponent": "stable",
|
data/tailwind.config.js
CHANGED
@@ -3,11 +3,11 @@ const colors = require('tailwindcss/colors')
|
|
3
3
|
|
4
4
|
const CLASS_YML_REGEX = /^- "\.([\S-]+)"$/
|
5
5
|
|
6
|
-
// for classes in hashes
|
6
|
+
// for classes in hashes, eg. `SCHEME_CLASS_MAPPINGS`
|
7
7
|
const CLASS_MAPPINGS = '(?:\\S+|:\\"[\\S-]+\\"): \\"([\\S -]+)\\"'
|
8
8
|
// for classes in constants
|
9
9
|
const CLASS_CONSTANT = '[A-Z_]+ = \\"([\\S -]+)\\"'
|
10
|
-
const CLASS_RB_REGEX = new RegExp(`(?:${CLASS_MAPPINGS}|${CLASS_CONSTANT})
|
10
|
+
const CLASS_RB_REGEX = new RegExp(`(?:${CLASS_MAPPINGS}|${CLASS_CONSTANT})`, 'g')
|
11
11
|
|
12
12
|
const resolve = require('path').resolve
|
13
13
|
module.exports = {
|
@@ -28,39 +28,48 @@ module.exports = {
|
|
28
28
|
},
|
29
29
|
rb: content => {
|
30
30
|
const matches = content.match(CLASS_RB_REGEX)
|
31
|
-
|
31
|
+
if (matches) {
|
32
|
+
const rez = matches[0]
|
33
|
+
.split(/\s+/)
|
34
|
+
.filter(function (m) {
|
35
|
+
return m.match(/ariadne/)
|
36
|
+
})
|
37
|
+
.map(m => m.replace(/"/, ''))
|
38
|
+
return rez
|
39
|
+
}
|
40
|
+
return []
|
32
41
|
}
|
33
42
|
}
|
34
43
|
},
|
44
|
+
plugins: [
|
45
|
+
require('@tailwindcss/aspect-ratio'),
|
46
|
+
require('@tailwindcss/line-clamp'),
|
47
|
+
require('@tailwindcss/forms'),
|
48
|
+
require('@tailwindcss/typography')
|
49
|
+
],
|
35
50
|
theme: {
|
36
51
|
extend: {
|
37
52
|
colors: {
|
38
53
|
'billy-purple': '#a700a0',
|
39
54
|
|
40
|
-
'state-closed': '#da1e28',
|
41
|
-
'state-open': '#198038',
|
42
|
-
|
43
|
-
'list-hover': colors.indigo['50'],
|
44
|
-
'filter-panel': colors.amber['100'],
|
45
|
-
|
46
55
|
'button-text-color': colors.indigo['700'],
|
47
56
|
'button-bg-color': colors.indigo['100'],
|
48
57
|
'button-hover-color': colors.indigo['200'],
|
49
58
|
|
50
|
-
'
|
59
|
+
'list-hover-color': colors.blue['50'],
|
60
|
+
'filter-panel-color': colors.amber['100'],
|
61
|
+
|
62
|
+
'internal-message': colors.amber['100'],
|
63
|
+
|
64
|
+
'state-closed': '#da1e28',
|
65
|
+
'state-open': '#198038'
|
51
66
|
},
|
52
67
|
fontFamily: {
|
53
68
|
sans: ['Inter var', ...defaultTheme.fontFamily.sans]
|
54
69
|
},
|
55
|
-
|
56
|
-
|
70
|
+
flexBasis: {
|
71
|
+
160: '40rem'
|
57
72
|
}
|
58
73
|
}
|
59
|
-
}
|
60
|
-
plugins: [
|
61
|
-
require('@tailwindcss/aspect-ratio'),
|
62
|
-
require('@tailwindcss/line-clamp'),
|
63
|
-
require('@tailwindcss/forms'),
|
64
|
-
require('@tailwindcss/typography')
|
65
|
-
]
|
74
|
+
}
|
66
75
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ariadne_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: aarch64-linux
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tailwind_merge
|
@@ -118,14 +118,20 @@ files:
|
|
118
118
|
- app/assets/javascripts/comment-component.d.ts
|
119
119
|
- app/assets/javascripts/rich-text-area-component.d.ts
|
120
120
|
- app/assets/javascripts/slideover-component.d.ts
|
121
|
+
- app/assets/javascripts/tab-container-component.d.ts
|
122
|
+
- app/assets/javascripts/tab-nav-component.d.ts
|
121
123
|
- app/assets/javascripts/time-ago-component.d.ts
|
122
124
|
- app/assets/javascripts/time_ago_component.d.ts
|
123
125
|
- app/assets/javascripts/tooltip-component.d.ts
|
124
126
|
- app/assets/stylesheets/ariadne_view_components.css
|
127
|
+
- app/assets/stylesheets/dropdown.css
|
125
128
|
- app/assets/stylesheets/prosemirror.css
|
126
129
|
- app/assets/stylesheets/tooltip-component.css
|
127
130
|
- app/components/ariadne/ariadne-form.ts
|
128
131
|
- app/components/ariadne/ariadne.ts
|
132
|
+
- app/components/ariadne/avatar_component.rb
|
133
|
+
- app/components/ariadne/avatar_stack_component.html.erb
|
134
|
+
- app/components/ariadne/avatar_stack_component.rb
|
129
135
|
- app/components/ariadne/base_button.rb
|
130
136
|
- app/components/ariadne/base_component.rb
|
131
137
|
- app/components/ariadne/blankslate_component.html.erb
|
@@ -144,6 +150,13 @@ files:
|
|
144
150
|
- app/components/ariadne/container_component.rb
|
145
151
|
- app/components/ariadne/content.rb
|
146
152
|
- app/components/ariadne/counter_component.rb
|
153
|
+
- app/components/ariadne/details_component.html.erb
|
154
|
+
- app/components/ariadne/details_component.rb
|
155
|
+
- app/components/ariadne/dropdown/menu_component.html.erb
|
156
|
+
- app/components/ariadne/dropdown/menu_component.rb
|
157
|
+
- app/components/ariadne/dropdown/menu_component.ts
|
158
|
+
- app/components/ariadne/dropdown_component.html.erb
|
159
|
+
- app/components/ariadne/dropdown_component.rb
|
147
160
|
- app/components/ariadne/flash_component.html.erb
|
148
161
|
- app/components/ariadne/flash_component.rb
|
149
162
|
- app/components/ariadne/flex_component.rb
|
@@ -175,10 +188,16 @@ files:
|
|
175
188
|
- app/components/ariadne/slideover-component.ts
|
176
189
|
- app/components/ariadne/slideover_component.html.erb
|
177
190
|
- app/components/ariadne/slideover_component.rb
|
178
|
-
- app/components/ariadne/
|
179
|
-
- app/components/ariadne/
|
191
|
+
- app/components/ariadne/tab-container-component.ts
|
192
|
+
- app/components/ariadne/tab-nav-component.ts
|
180
193
|
- app/components/ariadne/tab_component.html.erb
|
181
194
|
- app/components/ariadne/tab_component.rb
|
195
|
+
- app/components/ariadne/tab_container_component.erb
|
196
|
+
- app/components/ariadne/tab_container_component.rb
|
197
|
+
- app/components/ariadne/tab_nav_component.html.erb
|
198
|
+
- app/components/ariadne/tab_nav_component.rb
|
199
|
+
- app/components/ariadne/table_nav_component.html.erb
|
200
|
+
- app/components/ariadne/table_nav_component.rb
|
182
201
|
- app/components/ariadne/text.rb
|
183
202
|
- app/components/ariadne/time-ago-component.ts
|
184
203
|
- app/components/ariadne/time_ago_component.rb
|
@@ -193,13 +212,8 @@ files:
|
|
193
212
|
- app/lib/ariadne/fetch_or_fallback_helper.rb
|
194
213
|
- app/lib/ariadne/form_builder.rb
|
195
214
|
- app/lib/ariadne/icon_helper.rb
|
196
|
-
- app/lib/ariadne/join_style_arguments_helper.rb
|
197
215
|
- app/lib/ariadne/logger_helper.rb
|
198
216
|
- app/lib/ariadne/status/dsl.rb
|
199
|
-
- app/lib/ariadne/tab_nav_helper.rb
|
200
|
-
- app/lib/ariadne/tabbed_component_helper.rb
|
201
|
-
- app/lib/ariadne/test_selector_helper.rb
|
202
|
-
- app/lib/ariadne/underline_nav_helper.rb
|
203
217
|
- app/lib/ariadne/view_helper.rb
|
204
218
|
- exe/aarch64-linux/tailwindcss
|
205
219
|
- exe/tailwindcss
|
@@ -247,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
247
261
|
requirements:
|
248
262
|
- - ">="
|
249
263
|
- !ruby/object:Gem::Version
|
250
|
-
version: '3.
|
264
|
+
version: '3.1'
|
251
265
|
- - "<"
|
252
266
|
- !ruby/object:Gem::Version
|
253
267
|
version: '4.0'
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Ariadne
|
4
|
-
# A container for a row of tags.
|
5
|
-
# @accessibility This component requires you to pass in a `sr_label`
|
6
|
-
# attribute, which will be used to label the tabs for screen readers.
|
7
|
-
class TabBarComponent < Ariadne::Component
|
8
|
-
DEFAULT_TAG = :nav
|
9
|
-
TAG_OPTIONS = [DEFAULT_TAG].freeze
|
10
|
-
|
11
|
-
DEFAULT_CLASSES = "ariadne--mb-px ariadne-flex ariadne-space-x-8 ariadne-bg-transparent"
|
12
|
-
|
13
|
-
# Tabs to be rendered. For more information, refer to <%= link_to_component(Ariadne::TabComponent) %>.
|
14
|
-
#
|
15
|
-
# @param selected [Boolean] Whether the tab is selected.
|
16
|
-
# @param classes [String] <%= link_to_classes_docs %>
|
17
|
-
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
18
|
-
renders_many :tabs, lambda { |selected: false, classes: "", attributes: {}|
|
19
|
-
Ariadne::TabComponent.new(
|
20
|
-
selected: selected,
|
21
|
-
classes: classes,
|
22
|
-
attributes: attributes
|
23
|
-
)
|
24
|
-
}
|
25
|
-
|
26
|
-
# @example Default
|
27
|
-
#
|
28
|
-
# <%= render(Ariadne::TabBarComponent.new(sr_label: "Navigation tabs")) { "Example" } %>
|
29
|
-
#
|
30
|
-
# @param tag [Symbol, String] The rendered tag name.
|
31
|
-
# @param sr_label [String] A label to introduce these tabs for screen readers.
|
32
|
-
# @param classes [String] <%= link_to_classes_docs %>
|
33
|
-
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
34
|
-
def initialize(tag: DEFAULT_TAG, sr_label:, classes: "", attributes: {})
|
35
|
-
@tag = check_incoming_tag(DEFAULT_TAG, tag)
|
36
|
-
@classes = class_names(
|
37
|
-
DEFAULT_CLASSES,
|
38
|
-
classes
|
39
|
-
)
|
40
|
-
@sr_label = sr_label
|
41
|
-
@attributes = attributes
|
42
|
-
@attributes[:"aria-label"] ||= "Tabs"
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|