ariadne_view_components 0.0.39-x64-mingw-ucrt → 0.0.40-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/ariadne/view_components/upstream.rb +0 -1
  4. data/lib/ariadne/view_components/version.rb +1 -1
  5. metadata +2 -94
  6. data/app/assets/config/manifest.js +0 -2
  7. data/app/assets/stylesheets/ariadne_view_components.css +0 -7
  8. data/app/assets/stylesheets/dropdown.css +0 -46
  9. data/app/assets/stylesheets/prosemirror.css +0 -323
  10. data/app/assets/stylesheets/tooltip-component.css +0 -37
  11. data/app/components/ariadne/ariadne-form.ts +0 -96
  12. data/app/components/ariadne/ariadne.ts +0 -21
  13. data/app/components/ariadne/avatar_component.rb +0 -81
  14. data/app/components/ariadne/avatar_stack_component/avatar_stack_component.html.erb +0 -12
  15. data/app/components/ariadne/avatar_stack_component.rb +0 -75
  16. data/app/components/ariadne/base_button.rb +0 -70
  17. data/app/components/ariadne/base_component.rb +0 -37
  18. data/app/components/ariadne/blankslate_component/blankslate_component.html.erb +0 -26
  19. data/app/components/ariadne/blankslate_component.rb +0 -148
  20. data/app/components/ariadne/body_component.rb +0 -30
  21. data/app/components/ariadne/button_component/button_component.html.erb +0 -4
  22. data/app/components/ariadne/button_component.rb +0 -165
  23. data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.ts +0 -19
  24. data/app/components/ariadne/clipboard_copy_component/clipboard_copy_component.html.erb +0 -9
  25. data/app/components/ariadne/clipboard_copy_component.rb +0 -90
  26. data/app/components/ariadne/comment_component/comment_component.html.erb +0 -37
  27. data/app/components/ariadne/comment_component.rb +0 -71
  28. data/app/components/ariadne/component.rb +0 -127
  29. data/app/components/ariadne/container_component/container_component.html.erb +0 -3
  30. data/app/components/ariadne/container_component.rb +0 -25
  31. data/app/components/ariadne/content.rb +0 -12
  32. data/app/components/ariadne/counter_component.rb +0 -100
  33. data/app/components/ariadne/details_component/details_component.html.erb +0 -4
  34. data/app/components/ariadne/details_component.rb +0 -81
  35. data/app/components/ariadne/dropdown/menu_component.html.erb +0 -20
  36. data/app/components/ariadne/dropdown/menu_component.rb +0 -101
  37. data/app/components/ariadne/dropdown/menu_component.ts +0 -1
  38. data/app/components/ariadne/dropdown_component/dropdown_component.html.erb +0 -8
  39. data/app/components/ariadne/dropdown_component.rb +0 -172
  40. data/app/components/ariadne/flash_component/flash_component.html.erb +0 -31
  41. data/app/components/ariadne/flash_component.rb +0 -128
  42. data/app/components/ariadne/flex_component/flex_component.html.erb +0 -5
  43. data/app/components/ariadne/flex_component.rb +0 -56
  44. data/app/components/ariadne/footer_component/footer_component.html.erb +0 -7
  45. data/app/components/ariadne/footer_component.rb +0 -23
  46. data/app/components/ariadne/grid_component/grid_component.html.erb +0 -26
  47. data/app/components/ariadne/grid_component.rb +0 -67
  48. data/app/components/ariadne/header_component/header_component.html.erb +0 -29
  49. data/app/components/ariadne/header_component.rb +0 -111
  50. data/app/components/ariadne/heading_component.rb +0 -49
  51. data/app/components/ariadne/heroicon_component/heroicon_component.html.erb +0 -4
  52. data/app/components/ariadne/heroicon_component.rb +0 -166
  53. data/app/components/ariadne/image_component.rb +0 -53
  54. data/app/components/ariadne/inline_flex_component/inline_flex_component.html.erb +0 -6
  55. data/app/components/ariadne/inline_flex_component.rb +0 -72
  56. data/app/components/ariadne/link_component.rb +0 -65
  57. data/app/components/ariadne/list_component/list_component.html.erb +0 -6
  58. data/app/components/ariadne/list_component.rb +0 -70
  59. data/app/components/ariadne/narrow_container_component/narrow_container_component.html.erb +0 -3
  60. data/app/components/ariadne/narrow_container_component.rb +0 -30
  61. data/app/components/ariadne/panel_bar_component/panel_bar_component.html.erb +0 -20
  62. data/app/components/ariadne/panel_bar_component.rb +0 -80
  63. data/app/components/ariadne/pill_component/pill_component.html.erb +0 -3
  64. data/app/components/ariadne/pill_component.rb +0 -44
  65. data/app/components/ariadne/rich_text_area_component/rich-text-area-component.ts +0 -47
  66. data/app/components/ariadne/rich_text_area_component/rich_text_area_component.html.erb +0 -6
  67. data/app/components/ariadne/rich_text_area_component.rb +0 -35
  68. data/app/components/ariadne/slideover_component/slideover-component.ts +0 -17
  69. data/app/components/ariadne/slideover_component/slideover_component.html.erb +0 -9
  70. data/app/components/ariadne/slideover_component.rb +0 -66
  71. data/app/components/ariadne/tab_component/tab_component.html.erb +0 -3
  72. data/app/components/ariadne/tab_component.rb +0 -98
  73. data/app/components/ariadne/tab_container_component/tab-container-component.ts +0 -24
  74. data/app/components/ariadne/tab_container_component.erb +0 -10
  75. data/app/components/ariadne/tab_container_component.rb +0 -68
  76. data/app/components/ariadne/tab_nav_component/tab-nav-component.ts +0 -34
  77. data/app/components/ariadne/tab_nav_component/tab_nav_component.html.erb +0 -7
  78. data/app/components/ariadne/tab_nav_component.rb +0 -72
  79. data/app/components/ariadne/table_nav_component/table_nav_component.html.erb +0 -52
  80. data/app/components/ariadne/table_nav_component.rb +0 -338
  81. data/app/components/ariadne/text.rb +0 -25
  82. data/app/components/ariadne/time_ago_component/time-ago-component.ts +0 -1
  83. data/app/components/ariadne/time_ago_component.rb +0 -56
  84. data/app/components/ariadne/timeline_component/timeline_component.html.erb +0 -19
  85. data/app/components/ariadne/timeline_component.rb +0 -34
  86. data/app/components/ariadne/tooltip_component/tooltip-component.ts +0 -57
  87. data/app/components/ariadne/tooltip_component/tooltip_component.html.erb +0 -4
  88. data/app/components/ariadne/tooltip_component.rb +0 -108
  89. data/app/lib/ariadne/action_view_extensions/form_helper.rb +0 -30
  90. data/app/lib/ariadne/audited/dsl.rb +0 -32
  91. data/app/lib/ariadne/class_name_helper.rb +0 -22
  92. data/app/lib/ariadne/fetch_or_fallback_helper.rb +0 -110
  93. data/app/lib/ariadne/form_builder.rb +0 -74
  94. data/app/lib/ariadne/icon_helper.rb +0 -51
  95. data/app/lib/ariadne/logger_helper.rb +0 -23
  96. data/app/lib/ariadne/status/dsl.rb +0 -41
  97. data/app/lib/ariadne/view_helper.rb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79835a31d178b9798016871d1286057851d08a420ff72e5038bb52386f51e165
4
- data.tar.gz: 0e7b334555a11e3eec6bf4482e7dd4773c45a1bb117ec0e9e7ea31673fd1ac8b
3
+ metadata.gz: 758f3c43f641bf1e77a23591aa94539c57fa375426308984a3c74d2f689c61d4
4
+ data.tar.gz: 0f891dc2663e8dca2ce941adfdc4e4e34f7ddb3061372215476413242f35a80e
5
5
  SHA512:
6
- metadata.gz: '0769297560100a3e89450d17b68f186bb7d58c855c570eacbc06ee17e890a79b85b0fd55902502aec0bf481938fadca1b4d19115be476cf6d400965fcca1df70'
7
- data.tar.gz: 4af88f700a2d4c1d3d1e544881be1b3d311d9f3874d76e07c124294385b7ae7b5469b2e562dfd2862b3ce47610d70a5590979c5baefa7e67c71c17fd427d7631
6
+ metadata.gz: a18be2a9d82fa0371dfe24e915c609ccccce14c5d46f2eee21666b2f1fc9556bfdaf4b159cdc28d30050e9029e5192d41d58b3115da701f67776f78c6b9c343d
7
+ data.tar.gz: 0f3a478c790e8e50cd08a44ec1350f5553ac4bb0fb44c63e439e96a591d1d182edbfaff96ffe38829a4131066c936c619040264fe30ea0ea7c470999f8362c35
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.39](https://github.com/yettoapp/ariadne/tree/v0.0.39) (2023-04-28)
4
+
5
+ [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.38...v0.0.39)
6
+
3
7
  ## [v0.0.38](https://github.com/yettoapp/ariadne/tree/v0.0.38) (2023-04-28)
4
8
 
5
9
  [Full Changelog](https://github.com/yettoapp/ariadne/compare/v0.0.37...v0.0.38)
@@ -9,7 +9,6 @@ module Ariadne
9
9
  # rubygems platform name => upstream release filename
10
10
  NATIVE_PLATFORMS = {
11
11
  "arm64-darwin" => "tailwindcss-macos-arm64",
12
- "x64-mingw32" => "tailwindcss-windows-x64.exe",
13
12
  "x64-mingw-ucrt" => "tailwindcss-windows-x64.exe",
14
13
  "x86_64-darwin" => "tailwindcss-macos-x64",
15
14
  "x86_64-linux" => "tailwindcss-linux-x64",
@@ -3,6 +3,6 @@
3
3
  # :nocov:
4
4
  module Ariadne
5
5
  module ViewComponents
6
- VERSION = "0.0.39"
6
+ VERSION = "0.0.40"
7
7
  end
8
8
  end
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.39
4
+ version: 0.0.40
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-28 00:00:00.000000000 Z
11
+ date: 2023-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tailwind_merge
@@ -111,98 +111,6 @@ files:
111
111
  - CHANGELOG.md
112
112
  - LICENSE.txt
113
113
  - README.md
114
- - app/assets/config/manifest.js
115
- - app/assets/stylesheets/ariadne_view_components.css
116
- - app/assets/stylesheets/dropdown.css
117
- - app/assets/stylesheets/prosemirror.css
118
- - app/assets/stylesheets/tooltip-component.css
119
- - app/components/ariadne/ariadne-form.ts
120
- - app/components/ariadne/ariadne.ts
121
- - app/components/ariadne/avatar_component.rb
122
- - app/components/ariadne/avatar_stack_component.rb
123
- - app/components/ariadne/avatar_stack_component/avatar_stack_component.html.erb
124
- - app/components/ariadne/base_button.rb
125
- - app/components/ariadne/base_component.rb
126
- - app/components/ariadne/blankslate_component.rb
127
- - app/components/ariadne/blankslate_component/blankslate_component.html.erb
128
- - app/components/ariadne/body_component.rb
129
- - app/components/ariadne/button_component.rb
130
- - app/components/ariadne/button_component/button_component.html.erb
131
- - app/components/ariadne/clipboard_copy_component.rb
132
- - app/components/ariadne/clipboard_copy_component/clipboard-copy-component.ts
133
- - app/components/ariadne/clipboard_copy_component/clipboard_copy_component.html.erb
134
- - app/components/ariadne/comment_component.rb
135
- - app/components/ariadne/comment_component/comment_component.html.erb
136
- - app/components/ariadne/component.rb
137
- - app/components/ariadne/container_component.rb
138
- - app/components/ariadne/container_component/container_component.html.erb
139
- - app/components/ariadne/content.rb
140
- - app/components/ariadne/counter_component.rb
141
- - app/components/ariadne/details_component.rb
142
- - app/components/ariadne/details_component/details_component.html.erb
143
- - app/components/ariadne/dropdown/menu_component.html.erb
144
- - app/components/ariadne/dropdown/menu_component.rb
145
- - app/components/ariadne/dropdown/menu_component.ts
146
- - app/components/ariadne/dropdown_component.rb
147
- - app/components/ariadne/dropdown_component/dropdown_component.html.erb
148
- - app/components/ariadne/flash_component.rb
149
- - app/components/ariadne/flash_component/flash_component.html.erb
150
- - app/components/ariadne/flex_component.rb
151
- - app/components/ariadne/flex_component/flex_component.html.erb
152
- - app/components/ariadne/footer_component.rb
153
- - app/components/ariadne/footer_component/footer_component.html.erb
154
- - app/components/ariadne/grid_component.rb
155
- - app/components/ariadne/grid_component/grid_component.html.erb
156
- - app/components/ariadne/header_component.rb
157
- - app/components/ariadne/header_component/header_component.html.erb
158
- - app/components/ariadne/heading_component.rb
159
- - app/components/ariadne/heroicon_component.rb
160
- - app/components/ariadne/heroicon_component/heroicon_component.html.erb
161
- - app/components/ariadne/image_component.rb
162
- - app/components/ariadne/inline_flex_component.rb
163
- - app/components/ariadne/inline_flex_component/inline_flex_component.html.erb
164
- - app/components/ariadne/link_component.rb
165
- - app/components/ariadne/list_component.rb
166
- - app/components/ariadne/list_component/list_component.html.erb
167
- - app/components/ariadne/narrow_container_component.rb
168
- - app/components/ariadne/narrow_container_component/narrow_container_component.html.erb
169
- - app/components/ariadne/panel_bar_component.rb
170
- - app/components/ariadne/panel_bar_component/panel_bar_component.html.erb
171
- - app/components/ariadne/pill_component.rb
172
- - app/components/ariadne/pill_component/pill_component.html.erb
173
- - app/components/ariadne/rich_text_area_component.rb
174
- - app/components/ariadne/rich_text_area_component/rich-text-area-component.ts
175
- - app/components/ariadne/rich_text_area_component/rich_text_area_component.html.erb
176
- - app/components/ariadne/slideover_component.rb
177
- - app/components/ariadne/slideover_component/slideover-component.ts
178
- - app/components/ariadne/slideover_component/slideover_component.html.erb
179
- - app/components/ariadne/tab_component.rb
180
- - app/components/ariadne/tab_component/tab_component.html.erb
181
- - app/components/ariadne/tab_container_component.erb
182
- - app/components/ariadne/tab_container_component.rb
183
- - app/components/ariadne/tab_container_component/tab-container-component.ts
184
- - app/components/ariadne/tab_nav_component.rb
185
- - app/components/ariadne/tab_nav_component/tab-nav-component.ts
186
- - app/components/ariadne/tab_nav_component/tab_nav_component.html.erb
187
- - app/components/ariadne/table_nav_component.rb
188
- - app/components/ariadne/table_nav_component/table_nav_component.html.erb
189
- - app/components/ariadne/text.rb
190
- - app/components/ariadne/time_ago_component.rb
191
- - app/components/ariadne/time_ago_component/time-ago-component.ts
192
- - app/components/ariadne/timeline_component.rb
193
- - app/components/ariadne/timeline_component/timeline_component.html.erb
194
- - app/components/ariadne/tooltip_component.rb
195
- - app/components/ariadne/tooltip_component/tooltip-component.ts
196
- - app/components/ariadne/tooltip_component/tooltip_component.html.erb
197
- - app/lib/ariadne/action_view_extensions/form_helper.rb
198
- - app/lib/ariadne/audited/dsl.rb
199
- - app/lib/ariadne/class_name_helper.rb
200
- - app/lib/ariadne/fetch_or_fallback_helper.rb
201
- - app/lib/ariadne/form_builder.rb
202
- - app/lib/ariadne/icon_helper.rb
203
- - app/lib/ariadne/logger_helper.rb
204
- - app/lib/ariadne/status/dsl.rb
205
- - app/lib/ariadne/view_helper.rb
206
114
  - config/importmap.rb
207
115
  - exe/tailwindcss
208
116
  - exe/x64-mingw-ucrt/tailwindcss
@@ -1,2 +0,0 @@
1
- //= link_directory ../builds .css
2
- //= link_directory ../javascripts .js
@@ -1,7 +0,0 @@
1
- @import 'tailwindcss/base';
2
- @import 'tailwindcss/components';
3
- @import 'tailwindcss/utilities';
4
-
5
- @import 'tooltip-component.css';
6
- @import 'prosemirror.css';
7
- @import 'dropdown.css';
@@ -1,46 +0,0 @@
1
- .ariadne__details-reset > summary {
2
- list-style: none;
3
- transition: 80ms cubic-bezier(0.33, 1, 0.68, 1);
4
- transition-property: color, background-color, box-shadow, border-color;
5
- }
6
-
7
- .ariadne__details-reset > summary:focus {
8
- outline: 2px solid var(--color-accent-fg);
9
- outline-offset: -2px;
10
- box-shadow: none;
11
- }
12
-
13
- .ariadne__details-reset > summary:focus:not(:focus-visible) {
14
- outline: solid 1px transparent;
15
- }
16
-
17
- .ariadne__details-reset > summary:focus-visible {
18
- outline: 2px solid var(--color-accent-fg);
19
- outline-offset: -2px;
20
- box-shadow: none;
21
- }
22
-
23
- .ariadne__details-reset > summary.btn-primary:focus {
24
- outline: 2px solid var(--color-accent-fg);
25
- outline-offset: -2px;
26
- box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);
27
- }
28
-
29
- .ariadne__details-reset > summary.btn-primary:focus:not(:focus-visible) {
30
- outline: solid 1px transparent;
31
- box-shadow: none;
32
- }
33
-
34
- .ariadne__details-reset > summary.btn-primary:focus-visible {
35
- outline: 2px solid var(--color-accent-fg);
36
- outline-offset: -2px;
37
- box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);
38
- }
39
-
40
- .ariadne__details-reset > summary::before {
41
- display: none;
42
- }
43
-
44
- .ariadne__details-reset > summary::-webkit-details-marker {
45
- display: none;
46
- }
@@ -1,323 +0,0 @@
1
- .ProseMirror {
2
- position: relative;
3
- }
4
-
5
- .ProseMirror {
6
- word-wrap: break-word;
7
- white-space: pre-wrap;
8
- -webkit-font-variant-ligatures: none;
9
- font-variant-ligatures: none;
10
- }
11
-
12
- .ProseMirror pre {
13
- white-space: pre-wrap;
14
- }
15
-
16
- .ProseMirror li {
17
- position: relative;
18
- }
19
-
20
- .ProseMirror-hideselection *::selection {
21
- background: transparent;
22
- }
23
- .ProseMirror-hideselection *::-moz-selection {
24
- background: transparent;
25
- }
26
- .ProseMirror-hideselection {
27
- caret-color: transparent;
28
- }
29
-
30
- .ProseMirror-selectednode {
31
- outline: 2px solid #8cf;
32
- }
33
-
34
- /* Make sure li selections wrap around markers */
35
-
36
- li.ProseMirror-selectednode {
37
- outline: none;
38
- }
39
-
40
- li.ProseMirror-selectednode:after {
41
- content: '';
42
- position: absolute;
43
- left: -32px;
44
- right: -2px;
45
- top: -2px;
46
- bottom: -2px;
47
- border: 2px solid #8cf;
48
- pointer-events: none;
49
- }
50
- .ProseMirror-textblock-dropdown {
51
- min-width: 3em;
52
- }
53
-
54
- .ProseMirror-menu {
55
- margin: 0 -4px;
56
- line-height: 1;
57
- }
58
-
59
- .ProseMirror-tooltip .ProseMirror-menu {
60
- width: -webkit-fit-content;
61
- width: fit-content;
62
- white-space: pre;
63
- }
64
-
65
- .ProseMirror-menuitem {
66
- margin-right: 3px;
67
- display: inline-block;
68
- }
69
-
70
- .ProseMirror-menuseparator {
71
- border-right: 1px solid #ddd;
72
- margin-right: 3px;
73
- }
74
-
75
- .ProseMirror-menu-dropdown,
76
- .ProseMirror-menu-dropdown-menu {
77
- font-size: 90%;
78
- white-space: nowrap;
79
- }
80
-
81
- .ProseMirror-menu-dropdown {
82
- vertical-align: 1px;
83
- cursor: pointer;
84
- position: relative;
85
- padding-right: 15px;
86
- }
87
-
88
- .ProseMirror-menu-dropdown-wrap {
89
- padding: 1px 0 1px 4px;
90
- display: inline-block;
91
- position: relative;
92
- }
93
-
94
- .ProseMirror-menu-dropdown:after {
95
- content: '';
96
- border-left: 4px solid transparent;
97
- border-right: 4px solid transparent;
98
- border-top: 4px solid currentColor;
99
- opacity: 0.6;
100
- position: absolute;
101
- right: 4px;
102
- top: calc(50% - 2px);
103
- }
104
-
105
- .ProseMirror-menu-dropdown-menu,
106
- .ProseMirror-menu-submenu {
107
- position: absolute;
108
- background: white;
109
- color: #666;
110
- border: 1px solid #aaa;
111
- padding: 2px;
112
- }
113
-
114
- .ProseMirror-menu-dropdown-menu {
115
- z-index: 15;
116
- min-width: 6em;
117
- }
118
-
119
- .ProseMirror-menu-dropdown-item {
120
- cursor: pointer;
121
- padding: 2px 8px 2px 4px;
122
- }
123
-
124
- .ProseMirror-menu-dropdown-item:hover {
125
- background: #f2f2f2;
126
- }
127
-
128
- .ProseMirror-menu-submenu-wrap {
129
- position: relative;
130
- margin-right: -4px;
131
- }
132
-
133
- .ProseMirror-menu-submenu-label:after {
134
- content: '';
135
- border-top: 4px solid transparent;
136
- border-bottom: 4px solid transparent;
137
- border-left: 4px solid currentColor;
138
- opacity: 0.6;
139
- position: absolute;
140
- right: 4px;
141
- top: calc(50% - 4px);
142
- }
143
-
144
- .ProseMirror-menu-submenu {
145
- display: none;
146
- min-width: 4em;
147
- left: 100%;
148
- top: -3px;
149
- }
150
-
151
- .ProseMirror-menu-active {
152
- background: #eee;
153
- border-radius: 4px;
154
- }
155
-
156
- .ProseMirror-menu-active {
157
- background: #eee;
158
- border-radius: 4px;
159
- }
160
-
161
- .ProseMirror-menu-disabled {
162
- opacity: 0.3;
163
- }
164
-
165
- .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu,
166
- .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu {
167
- display: block;
168
- }
169
-
170
- .ProseMirror-menubar {
171
- border-top-left-radius: inherit;
172
- border-top-right-radius: inherit;
173
- position: relative;
174
- min-height: 1em;
175
- color: #666;
176
- padding: 1px 6px;
177
- top: 0;
178
- left: 0;
179
- right: 0;
180
- border-bottom: 1px solid silver;
181
- background: white;
182
- z-index: 10;
183
- -moz-box-sizing: border-box;
184
- box-sizing: border-box;
185
- overflow: visible;
186
- }
187
-
188
- .ProseMirror-icon {
189
- display: inline-block;
190
- line-height: 0.8;
191
- vertical-align: -2px; /* Compensate for padding */
192
- padding: 2px 8px;
193
- cursor: pointer;
194
- }
195
-
196
- .ProseMirror-menu-disabled.ProseMirror-icon {
197
- cursor: default;
198
- }
199
-
200
- .ProseMirror-icon svg {
201
- fill: currentColor;
202
- height: 1em;
203
- }
204
-
205
- .ProseMirror-icon span {
206
- vertical-align: text-top;
207
- }
208
- /* Add space around the hr to make clicking it easier */
209
-
210
- .ProseMirror-example-setup-style hr {
211
- padding: 2px 10px;
212
- border: none;
213
- margin: 1em 0;
214
- }
215
-
216
- .ProseMirror-example-setup-style hr:after {
217
- content: '';
218
- display: block;
219
- height: 1px;
220
- background-color: silver;
221
- line-height: 2px;
222
- }
223
-
224
- .ProseMirror ul,
225
- .ProseMirror ol {
226
- padding-left: 30px;
227
- }
228
-
229
- .ProseMirror blockquote {
230
- padding-left: 1em;
231
- border-left: 3px solid #eee;
232
- margin-left: 0;
233
- margin-right: 0;
234
- }
235
-
236
- .ProseMirror-example-setup-style img {
237
- cursor: default;
238
- }
239
-
240
- .ProseMirror-prompt {
241
- background: white;
242
- padding: 5px 10px 5px 15px;
243
- border: 1px solid silver;
244
- position: fixed;
245
- border-radius: 3px;
246
- z-index: 11;
247
- box-shadow: -0.5px 2px 5px rgba(0, 0, 0, 0.2);
248
- }
249
-
250
- .ProseMirror-prompt h5 {
251
- margin: 0;
252
- font-weight: normal;
253
- font-size: 100%;
254
- color: #444;
255
- }
256
-
257
- .ProseMirror-prompt input[type='text'],
258
- .ProseMirror-prompt textarea {
259
- background: #eee;
260
- border: none;
261
- outline: none;
262
- }
263
-
264
- .ProseMirror-prompt input[type='text'] {
265
- padding: 0 4px;
266
- }
267
-
268
- .ProseMirror-prompt-close {
269
- position: absolute;
270
- left: 2px;
271
- top: 1px;
272
- color: #666;
273
- border: none;
274
- background: transparent;
275
- padding: 0;
276
- }
277
-
278
- .ProseMirror-prompt-close:after {
279
- content: '✕';
280
- font-size: 12px;
281
- }
282
-
283
- .ProseMirror-invalid {
284
- background: #ffc;
285
- border: 1px solid #cc7;
286
- border-radius: 4px;
287
- padding: 5px 10px;
288
- position: absolute;
289
- min-width: 10em;
290
- }
291
-
292
- .ProseMirror-prompt-buttons {
293
- margin-top: 5px;
294
- display: none;
295
- }
296
- :root {
297
- --validation-color: #3dcde6;
298
- --validation-color-hover: #3dcde624;
299
- --validation-gray: #a0a0a0;
300
- --validation-debug-color-dirty: #f7a85e66;
301
- --validation-debug-color-inflight: #f7a85ea1;
302
- }
303
-
304
- .Button {
305
- padding: 1px 4px;
306
- border: 1px solid lightgrey;
307
- border-radius: 3px;
308
- font-size: 16px;
309
- cursor: pointer;
310
- }
311
-
312
- .Button:hover {
313
- background-color: #eee;
314
- }
315
-
316
- .Input[type='checkbox'] {
317
- margin-left: calc(var(--gutter-width));
318
- }
319
-
320
- .Button:active,
321
- .Button:focus {
322
- outline: none;
323
- }
@@ -1,37 +0,0 @@
1
- .ariadne-tooltip-arrow,
2
- .ariadne-tooltip-arrow::before {
3
- position: absolute;
4
- width: 8px;
5
- height: 8px;
6
- background: inherit;
7
- }
8
-
9
- .ariadne-tooltip-arrow {
10
- visibility: hidden;
11
- }
12
-
13
- tooltip[data-tooltip-show] .ariadne-tooltip-arrow::before {
14
- visibility: visible;
15
- content: '';
16
- transform: rotate(45deg);
17
- }
18
-
19
- tooltip[data-popper-placement^='top'][data-tooltip-show] > .ariadne-tooltip-arrow {
20
- bottom: -4px;
21
- }
22
-
23
- tooltip[data-popper-placement^='bottom'] > .ariadne-tooltip-arrow {
24
- top: -4px;
25
- }
26
-
27
- tooltip[data-popper-placement^='left'] > .ariadne-tooltip-arrow {
28
- right: -4px;
29
- }
30
-
31
- tooltip[data-popper-placement^='right'] > .ariadne-tooltip-arrow {
32
- left: -4px;
33
- }
34
-
35
- tooltip[data-tooltip-show] {
36
- display: block;
37
- }
@@ -1,96 +0,0 @@
1
- import {Controller} from '@hotwired/stimulus'
2
- import {html} from 'lit-html'
3
- import type {TemplateResult} from 'lit-html'
4
-
5
- type HTMLFormField = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
6
-
7
- export default class AriadneFormWith extends Controller {
8
- static targets = ['formField']
9
- declare readonly formFieldTargets: [HTMLFormField]
10
-
11
- connect() {
12
- this.element.setAttribute('novalidate', 'true')
13
- this.element.addEventListener('blur', this.onBlur, true)
14
- this.element.addEventListener('submit', this.onSubmit)
15
- this.element.addEventListener('ajax:beforeSend', this.onSubmit)
16
- }
17
-
18
- disconnect() {
19
- this.element.removeEventListener('blur', this.onBlur)
20
- this.element.removeEventListener('submit', this.onSubmit)
21
- this.element.removeEventListener('ajax:beforeSend', this.onSubmit)
22
- }
23
-
24
- onBlur = (event: Event) => {
25
- this.validateField(event.target as HTMLFormField)
26
- }
27
-
28
- onSubmit = (event: Event) => {
29
- if (!this.validateForm()) {
30
- event.preventDefault()
31
- this.firstInvalidField?.focus()
32
- }
33
- }
34
-
35
- validateForm() {
36
- let isValid = true
37
- // Not using `find` because we want to validate all the fields
38
- for (const field of this.formFields) {
39
- if (this.shouldValidateField(field) && !this.validateField(field)) isValid = false
40
- }
41
- return isValid
42
- }
43
-
44
- validateField(field: HTMLFormField) {
45
- if (!this.shouldValidateField(field)) return true
46
- const isValid = field.checkValidity()
47
- field.classList.toggle('invalid', !isValid)
48
- this.refreshErrorForInvalidField(field, isValid)
49
- return isValid
50
- }
51
-
52
- shouldValidateField(field: HTMLFormField) {
53
- return (
54
- !field.disabled &&
55
- !field.classList.contains('ProseMirror') &&
56
- !['file', 'reset', 'submit', 'button'].includes(field.type)
57
- )
58
- }
59
-
60
- refreshErrorForInvalidField(field: HTMLFormField, isValid: boolean) {
61
- this.removeExistingErrorMessage(field)
62
- if (!isValid) this.showErrorForInvalidField(field)
63
- }
64
-
65
- removeExistingErrorMessage(field: HTMLFormField) {
66
- const fieldContainer = field.closest('.field')
67
- if (!fieldContainer) return
68
- const existingErrorMessageElement = fieldContainer.querySelector('.error')
69
- if (existingErrorMessageElement) {
70
- existingErrorMessageElement?.parentNode?.removeChild(existingErrorMessageElement)
71
- }
72
- }
73
-
74
- showErrorForInvalidField(field: HTMLFormField) {
75
- field.insertAdjacentHTML('afterend', this.buildFieldErrorHtml(field))
76
- }
77
-
78
- buildFieldErrorHtml(field: HTMLFormField) {
79
- const data = html`<p class="error">${field.validationMessage}</p>`
80
- return this.getRenderString(data)
81
- }
82
-
83
- get formFields(): HTMLFormField[] {
84
- return Array.from(this.formFieldTargets)
85
- }
86
-
87
- get firstInvalidField() {
88
- return this.formFields.find(field => !field.checkValidity())
89
- }
90
-
91
- getRenderString = (data: TemplateResult): string => {
92
- const {strings, values} = data
93
- const v = [...values, ''].map(e => (typeof e === 'object' ? this.getRenderString(e as TemplateResult) : e))
94
- return strings.reduce((acc, s, i) => acc + s + v[i], '')
95
- }
96
- }
@@ -1,21 +0,0 @@
1
- import {Application} from '@hotwired/stimulus'
2
-
3
- import AriadneForm from './ariadne-form'
4
-
5
- import ClipboardCopyComponent from './clipboard_copy_component/clipboard-copy-component'
6
- import RichTextAreaComponent from './rich_text_area_component/rich-text-area-component'
7
- import SlideoverComponent from './slideover_component/slideover-component'
8
- import TabNavComponent from './tab_nav_component/tab-nav-component'
9
- import TooltipComponent from './tooltip_component/tooltip-component'
10
-
11
- import './tab_container_component/tab-container-component'
12
- import './time_ago_component/time-ago-component'
13
-
14
- const application = Application.start()
15
-
16
- application.register('clipboard-copy-component', ClipboardCopyComponent)
17
- application.register('ariadne-form', AriadneForm)
18
- application.register('rich-text-area-component', RichTextAreaComponent)
19
- application.register('slideover-component', SlideoverComponent)
20
- application.register('tab-nav-component', TabNavComponent)
21
- application.register('tooltip-component', TooltipComponent)