ariadne_view_components 0.0.13-x86_64-linux → 0.0.14-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/ariadne_view_components.js +2 -2
  3. data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
  4. data/app/assets/javascripts/comment-component.d.ts +1 -2
  5. data/app/assets/stylesheets/ariadne_view_components.css +1 -0
  6. data/app/assets/stylesheets/dropdown.css +46 -0
  7. data/app/assets/stylesheets/tooltip-component.css +8 -8
  8. data/app/components/ariadne/ariadne.ts +0 -2
  9. data/app/components/ariadne/avatar_component.rb +81 -0
  10. data/app/components/ariadne/avatar_stack_component.html.erb +12 -0
  11. data/app/components/ariadne/avatar_stack_component.rb +75 -0
  12. data/app/components/ariadne/base_button.rb +13 -4
  13. data/app/components/ariadne/blankslate_component.rb +4 -4
  14. data/app/components/ariadne/button_component.html.erb +1 -1
  15. data/app/components/ariadne/button_component.rb +9 -3
  16. data/app/components/ariadne/comment-component.ts +32 -50
  17. data/app/components/ariadne/comment_component.html.erb +32 -10
  18. data/app/components/ariadne/comment_component.rb +17 -5
  19. data/app/components/ariadne/details_component.html.erb +4 -0
  20. data/app/components/ariadne/details_component.rb +80 -0
  21. data/app/components/ariadne/dropdown/menu_component.html.erb +20 -0
  22. data/app/components/ariadne/dropdown/menu_component.rb +101 -0
  23. data/app/components/ariadne/dropdown/menu_component.ts +1 -0
  24. data/app/components/ariadne/dropdown_component.html.erb +8 -0
  25. data/app/components/ariadne/dropdown_component.rb +172 -0
  26. data/app/components/ariadne/flex_component.rb +1 -1
  27. data/app/components/ariadne/footer_component.html.erb +1 -1
  28. data/app/components/ariadne/header_component.rb +2 -2
  29. data/app/components/ariadne/heroicon_component.rb +6 -4
  30. data/app/components/ariadne/inline_flex_component.html.erb +1 -0
  31. data/app/components/ariadne/inline_flex_component.rb +8 -1
  32. data/app/components/ariadne/link_component.rb +2 -2
  33. data/app/components/ariadne/list_component.html.erb +2 -9
  34. data/app/components/ariadne/list_component.rb +11 -15
  35. data/app/components/ariadne/main_component.rb +1 -1
  36. data/app/components/ariadne/pill_component.rb +19 -5
  37. data/app/components/ariadne/rich-text-area-component.ts +4 -4
  38. data/app/components/ariadne/rich_text_area_component.html.erb +1 -1
  39. data/app/components/ariadne/rich_text_area_component.rb +1 -1
  40. data/app/components/ariadne/slideover_component.html.erb +1 -1
  41. data/app/components/ariadne/tab-container-component.ts +21 -21
  42. data/app/components/ariadne/tab_component.rb +4 -7
  43. data/app/components/ariadne/tab_container_component.rb +8 -2
  44. data/app/components/ariadne/tab_nav_component.html.erb +1 -1
  45. data/app/components/ariadne/tab_nav_component.rb +1 -1
  46. data/app/components/ariadne/table_nav_component.html.erb +52 -0
  47. data/app/components/ariadne/table_nav_component.rb +338 -0
  48. data/app/components/ariadne/tooltip_component.html.erb +1 -1
  49. data/app/components/ariadne/tooltip_component.rb +4 -4
  50. data/app/lib/ariadne/action_view_extensions/form_helper.rb +21 -7
  51. data/app/lib/ariadne/form_builder.rb +2 -2
  52. data/lib/ariadne/view_components/version.rb +1 -1
  53. data/lib/tasks/docs.rake +19 -3
  54. data/static/arguments.yml +103 -11
  55. data/static/audited_at.json +15 -7
  56. data/static/classes.yml +49 -45
  57. data/static/constants.json +179 -51
  58. data/static/statuses.json +15 -7
  59. data/tailwind.config.js +25 -1
  60. metadata +15 -4
  61. data/app/components/ariadne/table_component.html.erb +0 -17
  62. data/app/components/ariadne/table_component.rb +0 -281
data/lib/tasks/docs.rake CHANGED
@@ -47,6 +47,8 @@ namespace :docs do
47
47
  # Rails controller for rendering arbitrary ERB
48
48
  view_context = ApplicationController.new.tap { |c| c.request = ActionDispatch::TestRequest.create }.view_context
49
49
  components = [
50
+ Ariadne::AvatarComponent,
51
+ Ariadne::AvatarStackComponent,
50
52
  Ariadne::CommentComponent,
51
53
  Ariadne::BodyComponent,
52
54
  Ariadne::BlankslateComponent,
@@ -55,6 +57,8 @@ namespace :docs do
55
57
  Ariadne::ContainerComponent,
56
58
  Ariadne::ClipboardCopyComponent,
57
59
  Ariadne::CounterComponent,
60
+ Ariadne::DetailsComponent,
61
+ Ariadne::DropdownComponent,
58
62
  Ariadne::GridComponent,
59
63
  Ariadne::FlashComponent,
60
64
  Ariadne::FlexComponent,
@@ -74,7 +78,7 @@ namespace :docs do
74
78
  Ariadne::SlideoverComponent,
75
79
  Ariadne::TabComponent,
76
80
  Ariadne::TabContainerComponent,
77
- Ariadne::TableComponent,
81
+ Ariadne::TableNavComponent,
78
82
  Ariadne::TabNavComponent,
79
83
  Ariadne::Text,
80
84
  Ariadne::TimeAgoComponent,
@@ -261,6 +265,19 @@ namespace :docs do
261
265
  end
262
266
 
263
267
  File.open("static/classes.yml", "w") do |f|
268
+ non_ariadne_classes = classes_found_in_examples.reject { |c| c =~ /(?:ariadne|tiptap)/ }.uniq
269
+ unless non_ariadne_classes.length.zero?
270
+ puts "==============================================="
271
+ puts "===================== ERRORS =================="
272
+ puts "===============================================\n\n"
273
+ puts "The following non-Ariadne classes were found: #{non_ariadne_classes.join(", ")}"
274
+ puts "\n\n==============================================="
275
+ puts "==============================================="
276
+ puts "==============================================="
277
+
278
+ raise
279
+ end
280
+
264
281
  f.puts YAML.dump(classes_found_in_examples.uniq)
265
282
  end
266
283
 
@@ -271,8 +288,7 @@ namespace :docs do
271
288
  puts "Markdown compiled."
272
289
 
273
290
  if components_needing_docs.any?
274
- puts
275
- puts "The following components needs docs. Care to contribute them? #{components_needing_docs.map(&:name).join(", ")}"
291
+ puts "\nThe following components need documentation. Can you add them? #{components_needing_docs.map(&:name).join(", ")}"
276
292
  end
277
293
  end
278
294
 
data/static/arguments.yml CHANGED
@@ -1,4 +1,55 @@
1
1
  ---
2
+ - component: Avatar
3
+ source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/avatar_component.rb
4
+ parameters:
5
+ - name: src
6
+ type: String
7
+ default: N/A
8
+ description: The source url of the avatar image.
9
+ - name: alt
10
+ type: String
11
+ default: N/A
12
+ description: Passed through to alt on img tag.
13
+ - name: size
14
+ type: Integer
15
+ default: "`20`"
16
+ description: One of `16`, `20`, `24`, `32`, `40`, `48`, or `80`.
17
+ - name: shape
18
+ type: Symbol
19
+ default: "`:circle`"
20
+ description: Shape of the avatar. One of `:circle` and `:square`.
21
+ - name: href
22
+ type: String
23
+ default: "`nil`"
24
+ description: The URL to link to. If used, component will be wrapped by an `<a>`
25
+ tag.
26
+ - name: classes
27
+ type: String
28
+ default: '`""`'
29
+ description: "[Classes and attributes](/classes-attributes)"
30
+ - name: attributes
31
+ type: Hash
32
+ default: "`{}`"
33
+ description: "[Classes and attributes](/classes-attributes)"
34
+ - component: AvatarStack
35
+ source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/avatar_stack_component.rb
36
+ parameters:
37
+ - name: tag
38
+ type: Symbol
39
+ default: "`:div`"
40
+ description: One of `:div` and `:span`.
41
+ - name: align
42
+ type: Symbol
43
+ default: "`:left`"
44
+ description: One of `:left` and `:right`.
45
+ - name: classes
46
+ type: String
47
+ default: '`""`'
48
+ description: "[Classes and attributes](/classes-attributes)"
49
+ - name: attributes
50
+ type: Hash
51
+ default: "`{}`"
52
+ description: "[Classes and attributes](/classes-attributes)"
2
53
  - component: BaseButton
3
54
  source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/base_button.rb
4
55
  parameters:
@@ -62,15 +113,16 @@
62
113
  - name: scheme
63
114
  type: Symbol
64
115
  default: "`:default`"
65
- description: One of `:danger`, `:default`, `:info`, `:none`, `:success`, or `:warning`.
116
+ description: One of `:danger`, `:default`, `:info`, `:link`, `:none`, `:success`,
117
+ or `:warning`.
66
118
  - name: size
67
119
  type: Symbol
68
120
  default: "`BaseButton::DEFAULT_SIZE`"
69
121
  description: One of `:lg`, `:md`, `:sm`, `:xl`, or `:xs`.
70
- - name: type
71
- type: Symbol
72
- default: "`:button`"
73
- description: One of `:button`, `:reset`, or `:submit`.
122
+ - name: dropdown
123
+ type: Boolean
124
+ default: "`false`"
125
+ description: Whether or not to render a dropdown caret.
74
126
  - name: classes
75
127
  type: String
76
128
  default: '`""`'
@@ -178,6 +230,46 @@
178
230
  type: Hash
179
231
  default: "`{}`"
180
232
  description: "[Classes and attributes](/classes-attributes)"
233
+ - component: Details
234
+ source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/details_component.rb
235
+ parameters:
236
+ - name: overlay
237
+ type: Symbol
238
+ default: "`:none`"
239
+ description: Dictates the type of overlay to render with. One of `:default` and
240
+ `:none`.
241
+ - name: reset
242
+ type: Boolean
243
+ default: "`false`"
244
+ description: If set to true, it will remove the default caret and remove style
245
+ from the summary element
246
+ - name: classes
247
+ type: String
248
+ default: '`""`'
249
+ description: "[Classes and attributes](/classes-attributes)"
250
+ - name: attributes
251
+ type: Hash
252
+ default: "`{}`"
253
+ description: "[Classes and attributes](/classes-attributes)"
254
+ - component: Dropdown
255
+ source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/dropdown_component.rb
256
+ parameters:
257
+ - name: overlay
258
+ type: Symbol
259
+ default: "`:default`"
260
+ description: One of `:default` and `:none`.
261
+ - name: with_caret
262
+ type: Boolean
263
+ default: "`false`"
264
+ description: Whether or not a caret should be rendered in the button.
265
+ - name: classes
266
+ type: String
267
+ default: '`""`'
268
+ description: "[Classes and attributes](/classes-attributes)"
269
+ - name: attributes
270
+ type: Hash
271
+ default: "`{}`"
272
+ description: "[Classes and attributes](/classes-attributes)"
181
273
  - component: Flash
182
274
  source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/flash_component.rb
183
275
  parameters:
@@ -293,8 +385,8 @@
293
385
  description: One of `outline`, `solid`, or `mini`.
294
386
  - name: size
295
387
  type: Symbol
296
- default: "`:sm`"
297
- description: One of `:sm` (`16`), `:md` (`24`), or `:lg` (`128`).
388
+ default: "`:md`"
389
+ description: One of `:mu` (`16`), `:sm` (`20`), `:md` (`24`), or `:lg` (`128`).
298
390
  - name: attributes
299
391
  type: Hash
300
392
  default: "`{}`"
@@ -430,7 +522,7 @@
430
522
  - name: color
431
523
  type: String
432
524
  default: N/A
433
- description: The hex color of the pill.
525
+ description: The rgba color of the pill.
434
526
  - name: classes
435
527
  type: String
436
528
  default: '`""`'
@@ -510,7 +602,7 @@
510
602
  description: Whether the Tab has an associated panel.
511
603
  - name: href
512
604
  type: String
513
- default: '`""`'
605
+ default: "`nil`"
514
606
  description: The link to navigate to when the tab is clicked.
515
607
  - name: classes
516
608
  type: String
@@ -556,8 +648,8 @@
556
648
  type: Hash
557
649
  default: "`{}`"
558
650
  description: "[Classes and attributes](/classes-attributes)"
559
- - component: Table
560
- source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/table_component.rb
651
+ - component: TableNav
652
+ source: https://github.com/yettoapp/ariadne/ruby/view_components/tree/main/app/components/ariadne/table_nav_component.rb
561
653
  parameters:
562
654
  - name: classes
563
655
  type: String
@@ -1,4 +1,6 @@
1
1
  {
2
+ "Ariadne::AvatarComponent": "",
3
+ "Ariadne::AvatarStackComponent": "",
2
4
  "Ariadne::BaseButton": "",
3
5
  "Ariadne::BaseComponent": "",
4
6
  "Ariadne::BlankslateComponent": "",
@@ -9,6 +11,10 @@
9
11
  "Ariadne::ContainerComponent": "",
10
12
  "Ariadne::Content": "",
11
13
  "Ariadne::CounterComponent": "",
14
+ "Ariadne::DetailsComponent": "",
15
+ "Ariadne::Dropdown::MenuComponent": "",
16
+ "Ariadne::Dropdown::MenuComponent::Item": "",
17
+ "Ariadne::DropdownComponent": "",
12
18
  "Ariadne::FlashComponent": "",
13
19
  "Ariadne::FlexComponent": "",
14
20
  "Ariadne::FooterComponent": "",
@@ -32,13 +38,15 @@
32
38
  "Ariadne::TabComponent": "",
33
39
  "Ariadne::TabContainerComponent": "",
34
40
  "Ariadne::TabNavComponent": "",
35
- "Ariadne::TableComponent": "",
36
- "Ariadne::TableComponent::FooterItem": "",
37
- "Ariadne::TableComponent::HeaderRowItem": "",
38
- "Ariadne::TableComponent::PaginationBarItem": "",
39
- "Ariadne::TableComponent::RowItem": "",
40
- "Ariadne::TableComponent::RowItem::CellItem": "",
41
- "Ariadne::TableComponent::RowItem::HeaderCellItem": "",
41
+ "Ariadne::TableNavComponent": "",
42
+ "Ariadne::TableNavComponent::BaseCellItem": "",
43
+ "Ariadne::TableNavComponent::BaseCellItem::CellItem": "",
44
+ "Ariadne::TableNavComponent::BaseCellItem::HeaderCellItem": "",
45
+ "Ariadne::TableNavComponent::BaseRowItem": "",
46
+ "Ariadne::TableNavComponent::BaseRowItem::HeaderRowItem": "",
47
+ "Ariadne::TableNavComponent::BaseRowItem::RowItem": "",
48
+ "Ariadne::TableNavComponent::FooterItem": "",
49
+ "Ariadne::TableNavComponent::PaginationBarItem": "",
42
50
  "Ariadne::Text": "",
43
51
  "Ariadne::TimeAgoComponent": "",
44
52
  "Ariadne::TimelineComponent": "",
data/static/classes.yml CHANGED
@@ -1,11 +1,22 @@
1
1
  ---
2
+ - ".ariadne-inline-block"
3
+ - ".ariadne-rounded-full"
4
+ - ".ariadne-ring-2"
5
+ - ".ariadne-ring-white"
6
+ - ".ariadne-cursor-pointer"
7
+ - ".ariadne-font-semibold"
8
+ - ".hover:ariadne-text-button-text-color"
9
+ - ".focus:ariadne-outline-none"
10
+ - ".focus:ariadne-ring-2"
11
+ - ".focus:ariadne-ring-offset-2"
12
+ - ".focus:ariadne-ring-purple-500"
13
+ - ".ariadne-flex"
14
+ - ".ariadne--space-x-2"
15
+ - ".ariadne-overflow-hidden"
2
16
  - ".ariadne-inline-flex"
3
17
  - ".ariadne-items-center"
4
18
  - ".ariadne-border"
5
19
  - ".ariadne-shadow-sm"
6
- - ".focus:ariadne-outline-none"
7
- - ".focus:ariadne-ring-2"
8
- - ".focus:ariadne-ring-offset-2"
9
20
  - ".ariadne-px-2.5"
10
21
  - ".ariadne-py-1.5"
11
22
  - ".ariadne-text-xs"
@@ -30,13 +41,10 @@
30
41
  - ".ariadne-text-center"
31
42
  - ".ariadne-text-3xl"
32
43
  - ".ariadne-font-extrabold"
33
- - ".text-3xl"
34
- - ".font-extrabold"
35
- - ".tracking-tight"
36
- - ".text-gray-900"
37
- - ".sm:text-4xl"
44
+ - ".ariadne-tracking-tight"
45
+ - ".ariadne-text-gray-900"
46
+ - ".sm:ariadne-text-4xl"
38
47
  - ".ariadne-mt-8"
39
- - ".ariadne-flex"
40
48
  - ".ariadne-justify-center"
41
49
  - ".ariadne-flex-col"
42
50
  - ".ariadne-min-h-screen"
@@ -73,23 +81,18 @@
73
81
  - ".ariadne-text-yellow-600"
74
82
  - ".ariadne-p-1"
75
83
  - ".ariadne-border-transparent"
76
- - ".ariadne-rounded-full"
77
84
  - ".ariadne-invisible"
78
85
  - ".ariadne-absolute"
79
86
  - ".ariadne-bg-slate-900"
80
87
  - ".ariadne-text-white"
81
- - ".ariadne-font-semibold"
82
88
  - ".ariadne-max-w-xs"
83
89
  - ".ariadne-py-1"
84
90
  - ".ariadne-px-2"
85
- - ".z-max"
86
- - ".tooltip-arrow"
91
+ - ".ariadne-z-max"
92
+ - ".ariadne-tooltip-arrow"
87
93
  - ".ariadne-block"
88
- - ".ariadne-cursor-pointer"
89
94
  - ".ariadne-underline"
90
95
  - ".ariadne-decoration-double"
91
- - ".hover:ariadne-text-button-text-color"
92
- - ".focus:ariadne-ring-purple-500"
93
96
  - ".ariadne-text-green-600"
94
97
  - ".ariadne-bg-white"
95
98
  - ".ariadne-border-gray-300"
@@ -100,22 +103,38 @@
100
103
  - ".sm:ariadne-block"
101
104
  - ".ariadne-border-b"
102
105
  - ".ariadne-border-gray-200"
103
- - ".space-y-8"
104
- - ".divide-y"
105
- - ".divide-gray-200"
106
- - ".sm:space-y-5"
107
- - ".ariadne-overflow-hidden"
106
+ - ".ariadne-text-gray-500"
107
+ - ".hover:ariadne-text-gray-700"
108
+ - ".hover:ariadne-border-gray-300"
109
+ - ".ariadne-whitespace-nowrap"
110
+ - ".ariadne-py-4"
111
+ - ".ariadne-px-1"
112
+ - ".ariadne-border-b-2"
113
+ - ".ariadne-border-indigo-500"
114
+ - ".ariadne-text-indigo-600"
115
+ - ".ariadne-pt-2"
116
+ - ".ariadne-space-y-8"
117
+ - ".ariadne-divide-y"
118
+ - ".ariadne-divide-gray-200"
119
+ - ".sm:ariadne-space-y-5"
108
120
  - ".ariadne-border-x"
109
121
  - ".focus-within:ariadne-border-indigo-500"
110
122
  - ".focus-within:ariadne-ring-1"
111
123
  - ".focus-within:ariadne-ring-indigo-500"
112
- - ".ariadne-w-full"
113
- - ".ariadne-border-0"
114
- - ".focus:ariadne-ring-0"
115
- - ".sm:ariadne-text-sm"
116
124
  - ".tiptap-editor"
117
125
  - ".ariadne-mt-2"
118
126
  - ".ariadne-justify-end"
127
+ - ".ariadne-right-0"
128
+ - ".ariadne-z-10"
129
+ - ".ariadne-w-56"
130
+ - ".ariadne-origin-top-right"
131
+ - ".ariadne-divide-gray-100"
132
+ - ".ariadne-shadow-lg"
133
+ - ".ariadne-ring-1"
134
+ - ".ariadne-ring-black"
135
+ - ".ariadne-ring-opacity-5"
136
+ - ".ariadne-text-gray-700"
137
+ - ".ariadne-text-red-500"
119
138
  - ".ariadne-text-blue-700"
120
139
  - ".ariadne-p-4"
121
140
  - ".ariadne-flex-shrink-0"
@@ -132,9 +151,8 @@
132
151
  - ".ariadne-mt-4"
133
152
  - ".ariadne-pt-5"
134
153
  - ".ariadne--mx-2"
135
- - ".flex"
136
154
  - ".ariadne-mt-6"
137
- - ".text-slate-500"
155
+ - ".ariadne-text-slate-500"
138
156
  - ".sm:ariadne-mt-0"
139
157
  - ".ariadne-grid"
140
158
  - ".ariadne-gap-6"
@@ -146,33 +164,19 @@
146
164
  - ".ariadne-text-2xl"
147
165
  - ".ariadne-items-baseline"
148
166
  - ".ariadne-stroke-state-open"
167
+ - ".ariadne-stroke-state-closed"
168
+ - ".ariadne-fill-state-closed"
149
169
  - ".ariadne-pl-2"
150
- - ".ariadne-text-gray-900"
151
- - ".ariadne-divide-y"
152
170
  - ".ariadne-divide-gray-300"
153
171
  - ".ariadne-relative"
154
172
  - ".hover:ariadne-bg-button-hover-color"
155
- - ".hover:ariadne-text-gray-500"
156
- - ".flex-auto"
173
+ - ".ariadne-flex-auto"
157
174
  - ".md:ariadne-flex"
158
175
  - ".md:ariadne-divide-y-0"
159
- - ".ariadne-inline-block"
160
176
  - ".ariadne-py-0.5"
161
- - ".ariadne-z-10"
162
- - ".bg-filter-panel"
177
+ - ".ariadne-text-black"
163
178
  - ".ariadne-pb-4"
164
- - ".ariadne-text-gray-500"
165
- - ".hover:ariadne-text-gray-700"
166
- - ".hover:ariadne-border-gray-300"
167
- - ".ariadne-whitespace-nowrap"
168
- - ".ariadne-py-4"
169
- - ".ariadne-px-1"
170
- - ".ariadne-border-b-2"
171
179
  - ".ariadne-list-none"
172
- - ".inline-flex"
173
- - ".ariadne-border-indigo-500"
174
- - ".ariadne-text-indigo-600"
175
- - ".ariadne-divide-gray-200"
176
180
  - ".ariadne-text-lg"
177
181
  - ".ariadne-pt-6"
178
182
  - ".ariadne-flow-root"