ariadne_view_components 0.0.33-x64-mingw-ucrt → 0.0.35-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +70 -5
- data/README.md +2 -2
- data/app/components/ariadne/avatar_component.rb +1 -1
- data/app/components/ariadne/avatar_stack_component.rb +7 -7
- data/app/components/ariadne/base_button.rb +2 -2
- data/app/components/ariadne/base_component.rb +2 -2
- data/app/components/ariadne/blankslate_component.rb +9 -9
- data/app/components/ariadne/body_component.rb +1 -1
- data/app/components/ariadne/button_component.rb +8 -6
- data/app/components/ariadne/clipboard_copy_component.rb +1 -1
- data/app/components/ariadne/comment_component/comment_component.html.erb +6 -6
- data/app/components/ariadne/comment_component.rb +5 -5
- data/app/components/ariadne/component.rb +0 -1
- data/app/components/ariadne/container_component.rb +1 -1
- data/app/components/ariadne/counter_component.rb +1 -1
- data/app/components/ariadne/details_component.rb +10 -9
- data/app/components/ariadne/dropdown/menu_component.rb +3 -3
- data/app/components/ariadne/dropdown_component/dropdown_component.html.erb +2 -2
- data/app/components/ariadne/dropdown_component.rb +52 -52
- data/app/components/ariadne/flash_component.rb +5 -5
- data/app/components/ariadne/flex_component/flex_component.html.erb +5 -0
- data/app/components/ariadne/flex_component.rb +10 -3
- data/app/components/ariadne/footer_component.rb +2 -2
- data/app/components/ariadne/grid_component.rb +4 -8
- data/app/components/ariadne/header_component.rb +7 -7
- data/app/components/ariadne/heading_component.rb +1 -1
- data/app/components/ariadne/heroicon_component.rb +2 -2
- data/app/components/ariadne/inline_flex_component.rb +7 -7
- data/app/components/ariadne/link_component.rb +3 -3
- data/app/components/ariadne/list_component.rb +10 -4
- data/app/components/ariadne/narrow_container_component.rb +1 -1
- data/app/components/ariadne/panel_bar_component.rb +3 -3
- data/app/components/ariadne/pill_component.rb +1 -1
- data/app/components/ariadne/rich_text_area_component/rich-text-area-component.ts +4 -4
- data/app/components/ariadne/rich_text_area_component.rb +1 -1
- data/app/components/ariadne/slideover_component.rb +3 -3
- data/app/components/ariadne/tab_component.rb +1 -1
- data/app/components/ariadne/tab_container_component/tab-container-component.ts +1 -1
- data/app/components/ariadne/tab_container_component.rb +7 -7
- data/app/components/ariadne/tab_nav_component.rb +5 -5
- data/app/components/ariadne/table_nav_component.rb +42 -42
- 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/tooltip-component.ts +5 -5
- data/app/components/ariadne/tooltip_component.rb +1 -1
- data/app/lib/ariadne/action_view_extensions/form_helper.rb +1 -1
- data/app/lib/ariadne/class_name_helper.rb +1 -1
- data/app/lib/ariadne/form_builder.rb +15 -12
- data/lib/ariadne/view_components/linters/argument_mappers/conversion_error.rb +10 -0
- data/lib/ariadne/view_components/linters/autocorrectable.rb +32 -0
- data/lib/ariadne/view_components/linters/base_linter.rb +202 -0
- data/lib/ariadne/view_components/linters/tag_tree_helpers.rb +76 -0
- data/lib/ariadne/view_components/version.rb +2 -1
- data/lib/tasks/build.rake +6 -0
- data/lib/tasks/coverage.rake +4 -1
- data/lib/tasks/docs.rake +5 -1
- data/lib/tasks/test.rake +19 -0
- data/static/classes.yml +3 -1
- metadata +8 -16
- data/app/assets/javascripts/ariadne-form-with.d.ts +0 -20
- data/app/assets/javascripts/ariadne-form.d.ts +0 -22
- data/app/assets/javascripts/ariadne.d.ts +0 -2
- data/app/assets/javascripts/ariadne_view_components.js +0 -8
- data/app/assets/javascripts/ariadne_view_components.js.map +0 -1
- data/app/assets/javascripts/clipboard-copy-component.d.ts +0 -4
- data/app/assets/javascripts/comment-component.d.ts +0 -12
- data/app/assets/javascripts/rich-text-area-component.d.ts +0 -6
- data/app/assets/javascripts/slideover-component.d.ts +0 -9
- data/app/assets/javascripts/tab-container-component.d.ts +0 -1
- data/app/assets/javascripts/tab-nav-component.d.ts +0 -9
- data/app/assets/javascripts/time-ago-component.d.ts +0 -1
- data/app/assets/javascripts/time_ago_component.d.ts +0 -1
- data/app/assets/javascripts/tooltip-component.d.ts +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51d98de75d486f842b2a3a9e4bc96ac8a9d9cfad6ebce10c7a9cad069edbd45
|
4
|
+
data.tar.gz: 06bb2605b1e70a697978712988c607c78c2bbcfad4247fe38a5df91fb98b9ed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a4bfb29bc8630dd768aff6495a96c2bb9e2299e57842b90a5a5a7dbaa755f183b4d22c741561b8c235557ff02cd814355cec82ae0ed31f7de57b6b05e68efe3
|
7
|
+
data.tar.gz: 36fbe341f567fd42ad5cd0bde6d644c0ed07d81cfb093e6ff8e16dabd341c4d4d904a0ef4594a6cd213e2ef942eb9ee7b9aec2b528c2b0e2d5b65c900ad42036
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,73 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.0.35](https://github.com/yettoapp/ariadne/tree/v0.0.35) (2023-04-27)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.34...v0.0.35)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Moderate formatting/linter changes [\#295](https://github.com/yettoapp/ariadne/pull/295) ([gjtorikian](https://github.com/gjtorikian))
|
10
|
+
- build\(deps-dev\): bump @primer/primitives from 7.10.0 to 7.11.7 [\#294](https://github.com/yettoapp/ariadne/pull/294) ([dependabot[bot]](https://github.com/apps/dependabot))
|
11
|
+
- build\(deps\): bump lit-html from 2.7.2 to 2.7.3 [\#293](https://github.com/yettoapp/ariadne/pull/293) ([dependabot[bot]](https://github.com/apps/dependabot))
|
12
|
+
- build\(deps-dev\): bump @tailwindcss/typography from 0.5.7 to 0.5.9 [\#292](https://github.com/yettoapp/ariadne/pull/292) ([dependabot[bot]](https://github.com/apps/dependabot))
|
13
|
+
- build\(deps-dev\): bump @changesets/cli from 2.25.0 to 2.26.1 [\#291](https://github.com/yettoapp/ariadne/pull/291) ([dependabot[bot]](https://github.com/apps/dependabot))
|
14
|
+
- build\(deps-dev\): bump typescript from 4.8.2 to 5.0.4 [\#290](https://github.com/yettoapp/ariadne/pull/290) ([dependabot[bot]](https://github.com/apps/dependabot))
|
15
|
+
- build\(deps-dev\): bump eslint from 8.23.0 to 8.39.0 [\#289](https://github.com/yettoapp/ariadne/pull/289) ([dependabot[bot]](https://github.com/apps/dependabot))
|
16
|
+
- build\(deps-dev\): bump @tailwindcss/line-clamp from 0.4.2 to 0.4.4 [\#288](https://github.com/yettoapp/ariadne/pull/288) ([dependabot[bot]](https://github.com/apps/dependabot))
|
17
|
+
- build\(deps-dev\): bump @rollup/plugin-node-resolve from 11.2.1 to 15.0.2 [\#287](https://github.com/yettoapp/ariadne/pull/287) ([dependabot[bot]](https://github.com/apps/dependabot))
|
18
|
+
- build\(deps-dev\): bump eslint-plugin-prettier from 3.4.1 to 4.2.1 [\#286](https://github.com/yettoapp/ariadne/pull/286) ([dependabot[bot]](https://github.com/apps/dependabot))
|
19
|
+
- build\(deps-dev\): bump yaml from 2.1.1 to 2.2.2 [\#285](https://github.com/yettoapp/ariadne/pull/285) ([dependabot[bot]](https://github.com/apps/dependabot))
|
20
|
+
- build\(deps-dev\): bump @github/prettier-config from 0.0.4 to 0.0.6 [\#284](https://github.com/yettoapp/ariadne/pull/284) ([dependabot[bot]](https://github.com/apps/dependabot))
|
21
|
+
- build\(deps-dev\): bump @typescript-eslint/eslint-plugin from 5.40.0 to 5.59.1 [\#283](https://github.com/yettoapp/ariadne/pull/283) ([dependabot[bot]](https://github.com/apps/dependabot))
|
22
|
+
- \[auto-browserslist\] update Browserslist db [\#282](https://github.com/yettoapp/ariadne/pull/282) ([sisyphusbot](https://github.com/sisyphusbot))
|
23
|
+
- Attempt to use centralized GitHub Actions [\#266](https://github.com/yettoapp/ariadne/pull/266) ([gjtorikian](https://github.com/gjtorikian))
|
24
|
+
- Revert "build\(deps\): update view\_component requirement from ~\> 2.0 to ~\> 3.0" [\#265](https://github.com/yettoapp/ariadne/pull/265) ([gjtorikian](https://github.com/gjtorikian))
|
25
|
+
- build\(deps\): bump @github/auto-complete-element from 3.4.0 to 3.5.0 [\#264](https://github.com/yettoapp/ariadne/pull/264) ([dependabot[bot]](https://github.com/apps/dependabot))
|
26
|
+
- build\(deps\): update view\_component requirement from ~\> 2.0 to ~\> 3.0 [\#263](https://github.com/yettoapp/ariadne/pull/263) ([dependabot[bot]](https://github.com/apps/dependabot))
|
27
|
+
- Update to Lookbook 2 and VC3 [\#262](https://github.com/yettoapp/ariadne/pull/262) ([gjtorikian](https://github.com/gjtorikian))
|
28
|
+
- Lookbook/install [\#260](https://github.com/yettoapp/ariadne/pull/260) ([ajb85](https://github.com/ajb85))
|
29
|
+
- build\(deps\): bump @tiptap/extension-document from 2.0.2 to 2.0.3 [\#259](https://github.com/yettoapp/ariadne/pull/259) ([dependabot[bot]](https://github.com/apps/dependabot))
|
30
|
+
- build\(deps\): bump @tiptap/extension-text from 2.0.2 to 2.0.3 [\#258](https://github.com/yettoapp/ariadne/pull/258) ([dependabot[bot]](https://github.com/apps/dependabot))
|
31
|
+
- build\(deps\): bump @tiptap/extension-paragraph from 2.0.2 to 2.0.3 [\#257](https://github.com/yettoapp/ariadne/pull/257) ([dependabot[bot]](https://github.com/apps/dependabot))
|
32
|
+
- build\(deps\): bump @tiptap/extension-dropcursor from 2.0.2 to 2.0.3 [\#256](https://github.com/yettoapp/ariadne/pull/256) ([dependabot[bot]](https://github.com/apps/dependabot))
|
33
|
+
- build\(deps\): bump @tiptap/extension-history from 2.0.2 to 2.0.3 [\#255](https://github.com/yettoapp/ariadne/pull/255) ([dependabot[bot]](https://github.com/apps/dependabot))
|
34
|
+
- build\(deps\): bump @tiptap/extension-gapcursor from 2.0.2 to 2.0.3 [\#254](https://github.com/yettoapp/ariadne/pull/254) ([dependabot[bot]](https://github.com/apps/dependabot))
|
35
|
+
- build\(deps\): bump @tiptap/extension-hard-break from 2.0.2 to 2.0.3 [\#253](https://github.com/yettoapp/ariadne/pull/253) ([dependabot[bot]](https://github.com/apps/dependabot))
|
36
|
+
- build\(deps\): bump @tiptap/core from 2.0.2 to 2.0.3 [\#252](https://github.com/yettoapp/ariadne/pull/252) ([dependabot[bot]](https://github.com/apps/dependabot))
|
37
|
+
- build\(deps\): bump lit-html from 2.7.1 to 2.7.2 [\#251](https://github.com/yettoapp/ariadne/pull/251) ([dependabot[bot]](https://github.com/apps/dependabot))
|
38
|
+
- build\(deps\): bump @tiptap/extension-history from 2.0.1 to 2.0.2 [\#250](https://github.com/yettoapp/ariadne/pull/250) ([dependabot[bot]](https://github.com/apps/dependabot))
|
39
|
+
- build\(deps\): bump @tiptap/extension-hard-break from 2.0.1 to 2.0.2 [\#249](https://github.com/yettoapp/ariadne/pull/249) ([dependabot[bot]](https://github.com/apps/dependabot))
|
40
|
+
- build\(deps\): bump lit-html from 2.7.0 to 2.7.1 [\#248](https://github.com/yettoapp/ariadne/pull/248) ([dependabot[bot]](https://github.com/apps/dependabot))
|
41
|
+
- build\(deps\): bump @tiptap/extension-text from 2.0.1 to 2.0.2 [\#247](https://github.com/yettoapp/ariadne/pull/247) ([dependabot[bot]](https://github.com/apps/dependabot))
|
42
|
+
- build\(deps\): bump @tiptap/extension-gapcursor from 2.0.1 to 2.0.2 [\#246](https://github.com/yettoapp/ariadne/pull/246) ([dependabot[bot]](https://github.com/apps/dependabot))
|
43
|
+
- build\(deps\): bump @tiptap/extension-paragraph from 2.0.1 to 2.0.2 [\#245](https://github.com/yettoapp/ariadne/pull/245) ([dependabot[bot]](https://github.com/apps/dependabot))
|
44
|
+
- build\(deps\): bump @tiptap/extension-document from 2.0.1 to 2.0.2 [\#244](https://github.com/yettoapp/ariadne/pull/244) ([dependabot[bot]](https://github.com/apps/dependabot))
|
45
|
+
- build\(deps\): bump @tiptap/extension-dropcursor from 2.0.1 to 2.0.2 [\#243](https://github.com/yettoapp/ariadne/pull/243) ([dependabot[bot]](https://github.com/apps/dependabot))
|
46
|
+
- build\(deps\): bump @tiptap/core from 2.0.1 to 2.0.2 [\#242](https://github.com/yettoapp/ariadne/pull/242) ([dependabot[bot]](https://github.com/apps/dependabot))
|
47
|
+
- build\(deps\): bump @tiptap/extension-document from 2.0.0 to 2.0.1 [\#192](https://github.com/yettoapp/ariadne/pull/192) ([dependabot[bot]](https://github.com/apps/dependabot))
|
48
|
+
- build\(deps\): bump @tiptap/extension-hard-break from 2.0.0 to 2.0.1 [\#191](https://github.com/yettoapp/ariadne/pull/191) ([dependabot[bot]](https://github.com/apps/dependabot))
|
49
|
+
- build\(deps\): bump @tiptap/extension-dropcursor from 2.0.0 to 2.0.1 [\#190](https://github.com/yettoapp/ariadne/pull/190) ([dependabot[bot]](https://github.com/apps/dependabot))
|
50
|
+
- build\(deps\): bump @tiptap/extension-paragraph from 2.0.0 to 2.0.1 [\#189](https://github.com/yettoapp/ariadne/pull/189) ([dependabot[bot]](https://github.com/apps/dependabot))
|
51
|
+
- build\(deps\): bump @github/auto-complete-element from 3.3.4 to 3.4.0 [\#188](https://github.com/yettoapp/ariadne/pull/188) ([dependabot[bot]](https://github.com/apps/dependabot))
|
52
|
+
- build\(deps\): bump @tiptap/extension-text from 2.0.0 to 2.0.1 [\#187](https://github.com/yettoapp/ariadne/pull/187) ([dependabot[bot]](https://github.com/apps/dependabot))
|
53
|
+
- build\(deps\): bump @tiptap/core from 2.0.0 to 2.0.1 [\#186](https://github.com/yettoapp/ariadne/pull/186) ([dependabot[bot]](https://github.com/apps/dependabot))
|
54
|
+
- build\(deps\): bump @tiptap/extension-history from 2.0.0 to 2.0.1 [\#185](https://github.com/yettoapp/ariadne/pull/185) ([dependabot[bot]](https://github.com/apps/dependabot))
|
55
|
+
- build\(deps\): bump @tiptap/extension-gapcursor from 2.0.0 to 2.0.1 [\#184](https://github.com/yettoapp/ariadne/pull/184) ([dependabot[bot]](https://github.com/apps/dependabot))
|
56
|
+
- build\(deps\): bump @tiptap/extension-dropcursor from 2.0.0-beta.220 to 2.0.0 [\#182](https://github.com/yettoapp/ariadne/pull/182) ([dependabot[bot]](https://github.com/apps/dependabot))
|
57
|
+
- build\(deps\): bump @tiptap/extension-hard-break from 2.0.0-beta.220 to 2.0.0 [\#181](https://github.com/yettoapp/ariadne/pull/181) ([dependabot[bot]](https://github.com/apps/dependabot))
|
58
|
+
- build\(deps\): bump @tiptap/extension-gapcursor from 2.0.0-beta.220 to 2.0.0 [\#180](https://github.com/yettoapp/ariadne/pull/180) ([dependabot[bot]](https://github.com/apps/dependabot))
|
59
|
+
- build\(deps\): bump @tiptap/extension-text from 2.0.0-beta.220 to 2.0.0 [\#179](https://github.com/yettoapp/ariadne/pull/179) ([dependabot[bot]](https://github.com/apps/dependabot))
|
60
|
+
- build\(deps\): bump @tiptap/extension-history from 2.0.0-beta.220 to 2.0.0 [\#178](https://github.com/yettoapp/ariadne/pull/178) ([dependabot[bot]](https://github.com/apps/dependabot))
|
61
|
+
- build\(deps\): bump @tiptap/extension-paragraph from 2.0.0-beta.220 to 2.0.0 [\#177](https://github.com/yettoapp/ariadne/pull/177) ([dependabot[bot]](https://github.com/apps/dependabot))
|
62
|
+
- build\(deps\): bump @tiptap/extension-document from 2.0.0-beta.220 to 2.0.0 [\#176](https://github.com/yettoapp/ariadne/pull/176) ([dependabot[bot]](https://github.com/apps/dependabot))
|
63
|
+
- build\(deps\): update puma requirement from ~\> 6.1.1 to ~\> 6.2.0 [\#175](https://github.com/yettoapp/ariadne/pull/175) ([dependabot[bot]](https://github.com/apps/dependabot))
|
64
|
+
- build\(deps\): bump @popperjs/core from 2.11.6 to 2.11.7 [\#174](https://github.com/yettoapp/ariadne/pull/174) ([dependabot[bot]](https://github.com/apps/dependabot))
|
65
|
+
- build\(deps\): bump lit-html from 2.6.1 to 2.7.0 [\#173](https://github.com/yettoapp/ariadne/pull/173) ([dependabot[bot]](https://github.com/apps/dependabot))
|
66
|
+
|
67
|
+
## [v0.0.34](https://github.com/yettoapp/ariadne/tree/v0.0.34) (2023-03-21)
|
68
|
+
|
69
|
+
[Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.33...v0.0.34)
|
70
|
+
|
3
71
|
## [v0.0.33](https://github.com/yettoapp/ariadne/tree/v0.0.33) (2023-03-21)
|
4
72
|
|
5
73
|
[Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.32...v0.0.33)
|
@@ -156,11 +224,6 @@
|
|
156
224
|
|
157
225
|
[Full Changelog](https://github.com/yettoapp/ariadne/compare/0.0.25...v0.0.26)
|
158
226
|
|
159
|
-
**Implemented enhancements:**
|
160
|
-
|
161
|
-
- Support color theme dropdown [\#32](https://github.com/yettoapp/ariadne/pull/32) ([gjtorikian](https://github.com/gjtorikian))
|
162
|
-
- Update Ariadne to use Component Sidecar Directories [\#31](https://github.com/yettoapp/ariadne/pull/31) ([birdcar](https://github.com/birdcar))
|
163
|
-
|
164
227
|
**Merged pull requests:**
|
165
228
|
|
166
229
|
- Bump @rollup/plugin-replace from 4.0.0 to 5.0.1 [\#57](https://github.com/yettoapp/ariadne/pull/57) ([dependabot[bot]](https://github.com/apps/dependabot))
|
@@ -186,6 +249,8 @@
|
|
186
249
|
- Bump @primer/primitives from 7.9.0 to 7.10.0 in /ruby/ariadne\_view\_components [\#36](https://github.com/yettoapp/ariadne/pull/36) ([dependabot[bot]](https://github.com/apps/dependabot))
|
187
250
|
- Bump @changesets/cli from 2.24.4 to 2.25.0 in /ruby/ariadne\_view\_components [\#35](https://github.com/yettoapp/ariadne/pull/35) ([dependabot[bot]](https://github.com/apps/dependabot))
|
188
251
|
- Bump @primer/css from 20.4.7 to 20.4.8 in /ruby/ariadne\_view\_components [\#33](https://github.com/yettoapp/ariadne/pull/33) ([dependabot[bot]](https://github.com/apps/dependabot))
|
252
|
+
- Support color theme dropdown [\#32](https://github.com/yettoapp/ariadne/pull/32) ([gjtorikian](https://github.com/gjtorikian))
|
253
|
+
- Update Ariadne to use Component Sidecar Directories [\#31](https://github.com/yettoapp/ariadne/pull/31) ([birdcar](https://github.com/birdcar))
|
189
254
|
- Bump rollup from 2.79.0 to 2.79.1 in /ruby/ariadne\_view\_components [\#29](https://github.com/yettoapp/ariadne/pull/29) ([dependabot[bot]](https://github.com/apps/dependabot))
|
190
255
|
- Bump lit-html from 2.3.1 to 2.4.0 in /ruby/ariadne\_view\_components [\#28](https://github.com/yettoapp/ariadne/pull/28) ([dependabot[bot]](https://github.com/apps/dependabot))
|
191
256
|
- Bump @changesets/changelog-github from 0.4.6 to 0.4.7 in /ruby/ariadne\_view\_components [\#27](https://github.com/yettoapp/ariadne/pull/27) ([dependabot[bot]](https://github.com/apps/dependabot))
|
data/README.md
CHANGED
@@ -26,7 +26,7 @@ DEFAULT_TAG = :div
|
|
26
26
|
DEFAULT_CLASSES = "bg-yellow-400"
|
27
27
|
def initialize(tag: DEFAULT_TAG, classes: "", attributes: {})
|
28
28
|
@tag = check_incoming_tag(DEFAULT_TAG, tag)
|
29
|
-
@classes =
|
29
|
+
@classes = merge_class_names(DEFAULT_CLASSES, classes)
|
30
30
|
@attributes = attributes
|
31
31
|
@attributes[:id] = "myId"
|
32
32
|
end
|
@@ -66,7 +66,7 @@ See [the documentation on testing](./docs/content/testing.md).
|
|
66
66
|
|
67
67
|
Run `script/docs_doctocat_lookbook` to get a build of the documentation running at `localhost:5300`. The documentation comes from the YARD comments, and all of the markdowns files in `./docs`. The TOC navigation is defined in `docs/src/@primer/gatsby-theme-doctocat/nav.yml`, and new entries are created automatically for you after you run `script/generate_component`.
|
68
68
|
|
69
|
-
A [Lookbook](https://github.com/allmarkedup/lookbook) site is also running on `localhost:4000`. You can also choose to run
|
69
|
+
A [Lookbook](https://github.com/allmarkedup/lookbook) site is also running on `localhost:4000`. You can also choose to run Lookbook separately via the `script/lookbook` command.
|
70
70
|
|
71
71
|
For more information on writing documentation and presenting the components via Loobook, [here's more information](./docs/content/documentation.md)
|
72
72
|
|
@@ -35,16 +35,16 @@ module Ariadne
|
|
35
35
|
|
36
36
|
# @example Default
|
37
37
|
# <%= render(Ariadne::AvatarStackComponent.new) do |c| %>
|
38
|
-
# <% c.
|
39
|
-
# <% c.
|
40
|
-
# <% c.
|
38
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
39
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
40
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
41
41
|
# <% end %>
|
42
42
|
#
|
43
43
|
# @example Align right
|
44
44
|
# <%= render(Ariadne::AvatarStackComponent.new(align: :right)) do |c| %>
|
45
|
-
# <% c.
|
46
|
-
# <% c.
|
47
|
-
# <% c.
|
45
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
46
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
47
|
+
# <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %>
|
48
48
|
# <% end %>
|
49
49
|
#
|
50
50
|
# @param tag [Symbol] <%= one_of(Ariadne::AvatarStackComponent::TAG_OPTIONS) %>
|
@@ -54,7 +54,7 @@ module Ariadne
|
|
54
54
|
def initialize(tag: DEFAULT_TAG, align: ALIGN_DEFAULT, classes: "", attributes: {})
|
55
55
|
@tag = check_incoming_tag(DEFAULT_TAG, tag)
|
56
56
|
@align = fetch_or_raise(ALIGN_OPTIONS, align)
|
57
|
-
@classes =
|
57
|
+
@classes = merge_class_names(
|
58
58
|
DEFAULT_CLASSES,
|
59
59
|
classes,
|
60
60
|
)
|
@@ -49,9 +49,9 @@ module Ariadne
|
|
49
49
|
|
50
50
|
if button?
|
51
51
|
@attributes[:type] = fetch_or_raise(VALID_TYPES, type)
|
52
|
-
@classes =
|
52
|
+
@classes = merge_class_names(DEFAULT_CLASSES, SIZE_CLASS_MAPPINGS[@size], classes)
|
53
53
|
else
|
54
|
-
@classes =
|
54
|
+
@classes = merge_class_names(DEFAULT_NUDE_CLASSES, SIZE_CLASS_MAPPINGS[@size], classes)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -15,7 +15,7 @@ module Ariadne
|
|
15
15
|
@attributes[:"data-ariadne-view-component"] = true
|
16
16
|
|
17
17
|
classes = @attributes.fetch(:classes, "") if classes.blank?
|
18
|
-
@classes =
|
18
|
+
@classes = validate_merge_class_names(classes) || {}
|
19
19
|
@content_tag_args = {}
|
20
20
|
end
|
21
21
|
|
@@ -28,7 +28,7 @@ module Ariadne
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
private def
|
31
|
+
private def validate_merge_class_names(classes)
|
32
32
|
return if classes.blank?
|
33
33
|
|
34
34
|
{ class: Ariadne::ViewComponents.tailwind_merger.merge(classes) }
|
@@ -52,7 +52,7 @@ module Ariadne
|
|
52
52
|
# @param attributes [Hash] Same arguments as <%= link_to_component(Ariadne::HeroiconComponent) %>.
|
53
53
|
DEFAULT_HEADING_CLASSES = "ariadne-text-3xl ariadne-font-extrabold ariadne-tracking-tight ariadne-text-gray-900 sm:ariadne-text-4xl"
|
54
54
|
renders_one :heading, lambda { |tag: :h1, classes: "", attributes: {}|
|
55
|
-
actual_classes =
|
55
|
+
actual_classes = merge_class_names(DEFAULT_HEADING_CLASSES, classes)
|
56
56
|
|
57
57
|
Ariadne::HeadingComponent.new(tag: tag, classes: actual_classes, attributes: attributes)
|
58
58
|
}
|
@@ -109,8 +109,8 @@ module Ariadne
|
|
109
109
|
|
110
110
|
# @example Basic
|
111
111
|
# <%= render Ariadne::BlankslateComponent.new do |c| %>
|
112
|
-
# <% c.
|
113
|
-
# <% c.
|
112
|
+
# <% c.with_heading(tag: :h2) { "heading" } %>
|
113
|
+
# <% c.with_description { "Description"} %>
|
114
114
|
# <% end %>
|
115
115
|
#
|
116
116
|
# @example Icon
|
@@ -118,9 +118,9 @@ module Ariadne
|
|
118
118
|
# Add an `icon` to give additional context. Refer to the [Heroicons](https://heroicons.com) documentation to choose an icon.
|
119
119
|
# @code
|
120
120
|
# <%= render Ariadne::BlankslateComponent.new do |c| %>
|
121
|
-
# <% c.
|
122
|
-
# <% c.
|
123
|
-
# <% c.
|
121
|
+
# <% c.with_icon(icon: :"globe-europe-africa") %>
|
122
|
+
# <% c.with_heading(tag: :h2) { "heading" } %>
|
123
|
+
# <% c.with_description { "Description"} %>
|
124
124
|
# <% end %>
|
125
125
|
#
|
126
126
|
# @example Using an image
|
@@ -128,8 +128,8 @@ module Ariadne
|
|
128
128
|
# Add an `image` to give context that an Octicon couldn't.
|
129
129
|
# @code
|
130
130
|
# <%= render Ariadne::BlankslateComponent.new do |c| %>
|
131
|
-
# <% c.
|
132
|
-
# <% c.
|
131
|
+
# <% c.with_image(src: "https://github.githubassets.com/images/modules/site/features/security-icon.svg", alt: "Security - secure vault") %>
|
132
|
+
# <% c.with_heading(tag: :h2){ "heading" } %>
|
133
133
|
# <% end %>
|
134
134
|
#
|
135
135
|
# @param tag [Symbol, String] The rendered tag name
|
@@ -137,7 +137,7 @@ module Ariadne
|
|
137
137
|
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
138
138
|
def initialize(tag: DEFAULT_TAG, classes: "", attributes: {})
|
139
139
|
@tag = check_incoming_tag(DEFAULT_TAG, tag)
|
140
|
-
@classes =
|
140
|
+
@classes = merge_class_names(DEFAULT_CLASSES, classes)
|
141
141
|
@attributes = attributes
|
142
142
|
end
|
143
143
|
|
@@ -83,20 +83,20 @@ module Ariadne
|
|
83
83
|
#
|
84
84
|
# @example With leading visual
|
85
85
|
# <%= render(Ariadne::ButtonComponent.new) do |c| %>
|
86
|
-
# <% c.
|
86
|
+
# <% c.with_icon(icon: :star, variant: HeroiconsHelper::Icon::VARIANT_OUTLINE, classes: "ariadne-text-yellow-600") %>
|
87
87
|
# Button
|
88
88
|
# <% end %>
|
89
89
|
#
|
90
90
|
# @example With trailing visual
|
91
91
|
# <%= render(Ariadne::ButtonComponent.new) do |c| %>
|
92
|
-
# <% c.
|
92
|
+
# <% c.with_counter(count: 15) %>
|
93
93
|
# Button
|
94
94
|
# <% end %>
|
95
95
|
#
|
96
96
|
# @example With leading and trailing visuals
|
97
97
|
# <%= render(Ariadne::ButtonComponent.new) do |c| %>
|
98
|
-
# <% c.
|
99
|
-
# <% c.
|
98
|
+
# <% c.with_icon(icon: :star, variant: HeroiconsHelper::Icon::VARIANT_OUTLINE) %>
|
99
|
+
# <% c.with_counter(count: 15) %>
|
100
100
|
# Button
|
101
101
|
# <% end %>
|
102
102
|
#
|
@@ -105,7 +105,7 @@ module Ariadne
|
|
105
105
|
# Use tooltips sparingly and as a last resort. Consult the <%= link_to_component(Ariadne::TooltipComponent) %> documentation for more information.
|
106
106
|
# @code
|
107
107
|
# <%= render(Ariadne::ButtonComponent.new(attributes: { id: "button-with-tooltip" })) do |c| %>
|
108
|
-
# <% c.
|
108
|
+
# <% c.with_tooltip(text: "Tooltip text") %>
|
109
109
|
# Button
|
110
110
|
# <% end %>
|
111
111
|
#
|
@@ -135,10 +135,12 @@ module Ariadne
|
|
135
135
|
@scheme = fetch_or_raise(VALID_SCHEMES, scheme)
|
136
136
|
@scheme = LINK_SCHEME if @tag == :a
|
137
137
|
|
138
|
-
@classes =
|
138
|
+
@classes = merge_class_names(
|
139
139
|
SCHEME_CLASS_MAPPINGS[@scheme],
|
140
140
|
classes,
|
141
141
|
)
|
142
|
+
|
143
|
+
@dropdown = dropdown
|
142
144
|
end
|
143
145
|
|
144
146
|
private def dropdown?
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= render(Ariadne::BaseComponent.new(tag: @tag, classes: @classes, attributes: @attributes)) do %>
|
2
2
|
<%= render(Ariadne::TabContainerComponent.new(sr_label: @sr_label)) do |tab_container| %>
|
3
|
-
<%= tab_container.
|
4
|
-
<% tab.
|
5
|
-
<% tab.
|
3
|
+
<%= tab_container.with_tab(id: public_tab.id, selected: public_tab.selected, classes: public_tab.classes, attributes: public_tab.attributes) do |tab| %>
|
4
|
+
<% tab.with_text { @public_tab_text } %>
|
5
|
+
<% tab.with_panel(attributes: {:"data-public" => true}) do %>
|
6
6
|
<%= ariadne_form_with(url: @url, method: @method, classes: @classes, attributes: @attributes) do |comment_box| %>
|
7
7
|
<% @hidden_fields.each do |name, value| %>
|
8
8
|
<%= hidden_field_tag name, value %>
|
@@ -18,9 +18,9 @@
|
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
20
20
|
<% end %>
|
21
|
-
<%= tab_container.
|
22
|
-
<% tab.
|
23
|
-
<% tab.
|
21
|
+
<%= tab_container.with_tab(id: internal_tab.id, selected: internal_tab.selected, classes: internal_tab.classes, attributes: internal_tab.attributes) do |tab| %>
|
22
|
+
<% tab.with_text { @internal_tab_text } %>
|
23
|
+
<% tab.with_panel do %>
|
24
24
|
<%= ariadne_form_with(url: @url, method: @method, classes: @classes, attributes: @attributes) do |comment_box| %>
|
25
25
|
<div class="ariadne-overflow-hidden ariadne-border ariadne-border-gray-300 ariadne-shadow-sm">
|
26
26
|
<%= hidden_field_tag 'message_is_public', false %>
|
@@ -41,10 +41,10 @@ module Ariadne
|
|
41
41
|
# @example Default
|
42
42
|
#
|
43
43
|
# <%= render(Ariadne::CommentComponent.new(url: "/messages", method: :post, sr_label: "Select delivery time")) do |comment| %>
|
44
|
-
# <% comment.
|
45
|
-
# <% comment.
|
46
|
-
# <% comment.
|
47
|
-
# <% comment.
|
44
|
+
# <% comment.with_public_tab(selected: true, text: "Reply to sender") %>
|
45
|
+
# <% comment.with_public_submit { "Send" } %>
|
46
|
+
# <% comment.with_internal_tab(text: "Internal comment") %>
|
47
|
+
# <% comment.with_internal_submit { "Send" } %>
|
48
48
|
# <% end %>
|
49
49
|
#
|
50
50
|
# @param url [String] The URL to take action against.
|
@@ -55,7 +55,7 @@ module Ariadne
|
|
55
55
|
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
56
56
|
def initialize(url:, method: :post, sr_label:, hidden_fields: [], classes: "", attributes: {})
|
57
57
|
@tag = DEFAULT_TAG
|
58
|
-
@classes =
|
58
|
+
@classes = merge_class_names(
|
59
59
|
DEFAULT_CLASSES,
|
60
60
|
classes,
|
61
61
|
)
|
@@ -7,7 +7,6 @@ require "heroicons_helper"
|
|
7
7
|
module Ariadne
|
8
8
|
# @private
|
9
9
|
class Component < ViewComponent::Base
|
10
|
-
include ViewComponent::SlotableV2 unless ViewComponent::Base < ViewComponent::SlotableV2
|
11
10
|
include ClassNameHelper
|
12
11
|
include FetchOrFallbackHelper
|
13
12
|
include ViewHelper
|
@@ -22,10 +22,11 @@ module Ariadne
|
|
22
22
|
renders_one :summary, lambda { |button: true, classes: "", attributes: {}|
|
23
23
|
tag = :summary
|
24
24
|
attributes[:role] = "button"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
if button
|
26
|
+
Ariadne::ButtonComponent.new(tag: tag, classes: classes, attributes: attributes)
|
27
|
+
else
|
28
|
+
Ariadne::BaseComponent.new(tag: tag, classes: classes, attributes: attributes)
|
29
|
+
end
|
29
30
|
}
|
30
31
|
|
31
32
|
DEFAULT_BODY_CLASSES = "ariadne-absolute ariadne-mt-2 ariadne-w-56 ariadne-divide-y ariadne-divide-gray-100 ariadne-rounded-md ariadne-shadow-lg ariadne-ring-1 ariadne-ring-black ariadne-ring-opacity-5 focus:ariadne-outline-none"
|
@@ -36,7 +37,7 @@ module Ariadne
|
|
36
37
|
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
37
38
|
renders_one :body, lambda { |tag: DEFAULT_BODY_TAG, classes: "", attributes: {}|
|
38
39
|
tag = fetch_or_raise(VALID_BODY_TAGS, tag)
|
39
|
-
actual_classes =
|
40
|
+
actual_classes = merge_class_names(DEFAULT_BODY_CLASSES, classes)
|
40
41
|
|
41
42
|
Ariadne::BaseComponent.new(tag: tag, classes: actual_classes, attributes: attributes)
|
42
43
|
}
|
@@ -46,10 +47,10 @@ module Ariadne
|
|
46
47
|
# @example Default
|
47
48
|
#
|
48
49
|
# <%= render Ariadne::DetailsComponent.new do |c| %>
|
49
|
-
# <% c.
|
50
|
+
# <% c.with_summary do %>
|
50
51
|
# Summary
|
51
52
|
# <% end %>
|
52
|
-
# <% c.
|
53
|
+
# <% c.with_body do %>
|
53
54
|
# Body
|
54
55
|
# <% end %>
|
55
56
|
# <% end %>
|
@@ -62,7 +63,7 @@ module Ariadne
|
|
62
63
|
@tag = DEFAULT_TAG
|
63
64
|
@reset = reset
|
64
65
|
|
65
|
-
@classes =
|
66
|
+
@classes = merge_class_names(
|
66
67
|
DEFAULT_CLASSES,
|
67
68
|
classes,
|
68
69
|
@reset ? "ariadne__details-reset" : "",
|
@@ -74,7 +75,7 @@ module Ariadne
|
|
74
75
|
end
|
75
76
|
|
76
77
|
def render?
|
77
|
-
|
78
|
+
summary? && body?
|
78
79
|
end
|
79
80
|
end
|
80
81
|
end
|
@@ -15,7 +15,7 @@ module Ariadne
|
|
15
15
|
# @param classes [String] <%= link_to_classes_docs %>
|
16
16
|
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
17
17
|
renders_one :header, lambda { |classes: "", attributes: {}|
|
18
|
-
actual_classes =
|
18
|
+
actual_classes = merge_class_names(DEFAULT_HEADER_CLASSES, classes)
|
19
19
|
Ariadne::BaseComponent.new(tag: :span, classes: actual_classes, attributes: attributes)
|
20
20
|
}
|
21
21
|
|
@@ -38,7 +38,7 @@ module Ariadne
|
|
38
38
|
# @param attributes [Hash] <%= link_to_attributes_docs %>
|
39
39
|
def initialize(as: DEFAULT_AS_OPTION, direction: VALID_DIRECTIONS, classes: "", attributes: {})
|
40
40
|
@tag = DEFAULT_TAG
|
41
|
-
@classes =
|
41
|
+
@classes = merge_class_names(
|
42
42
|
DEFAULT_CLASSES,
|
43
43
|
classes,
|
44
44
|
)
|
@@ -67,7 +67,7 @@ module Ariadne
|
|
67
67
|
@divider = divider
|
68
68
|
@as = as
|
69
69
|
|
70
|
-
@classes =
|
70
|
+
@classes = merge_class_names(DEFAULT_ITEM_CLASSES, classes)
|
71
71
|
@attributes = attributes
|
72
72
|
@tag = fetch_or_raise(VALID_TAGS, tag)
|
73
73
|
@tag = :li if list? && divider?
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= render(Ariadne::DetailsComponent.new(classes: @classes, attributes: @attributes)) do |c| %>
|
2
|
-
<% c.
|
2
|
+
<% c.with_summary(classes: @button_classes, attributes: @button_attributes) do %>
|
3
3
|
<%= button %>
|
4
4
|
<% end %>
|
5
|
-
<% c.
|
5
|
+
<% c.with_body do %>
|
6
6
|
<%= menu %>
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|