ariadne_view_components 0.0.59 → 0.0.65

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/LICENSE.txt +661 -49
  4. data/README.md +52 -4
  5. data/app/assets/javascripts/ariadne_view_components.js +98 -7
  6. data/app/assets/javascripts/ariadne_view_components.js.br +0 -0
  7. data/app/assets/javascripts/ariadne_view_components.js.gz +0 -0
  8. data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
  9. data/app/assets/stylesheets/ariadne_view_components.css +1 -7
  10. data/app/assets/stylesheets/ariadne_view_components.css.br +0 -0
  11. data/app/assets/stylesheets/ariadne_view_components.css.gz +0 -0
  12. data/app/components/ariadne/base_component.rb +79 -27
  13. data/app/components/ariadne/behaviors/tooltipable.rb +120 -0
  14. data/app/components/ariadne/conditional_wrapper.rb +21 -0
  15. data/app/components/ariadne/form/base_component.rb +74 -0
  16. data/app/components/ariadne/form/base_input_component.rb +60 -0
  17. data/app/components/ariadne/form/caption/component.html.erb +10 -0
  18. data/app/components/ariadne/form/caption/component.rb +29 -0
  19. data/app/components/ariadne/form/form_control/component.html.erb +19 -0
  20. data/app/components/ariadne/form/form_control/component.rb +27 -0
  21. data/app/components/ariadne/form/form_reference/component.html.erb +1 -0
  22. data/app/components/ariadne/form/form_reference/component.rb +18 -0
  23. data/app/components/ariadne/form/group/component.html.erb +5 -0
  24. data/app/components/ariadne/form/group/component.rb +27 -0
  25. data/app/components/ariadne/form/hidden_field/component.html.erb +1 -0
  26. data/app/components/ariadne/form/hidden_field/component.rb +15 -0
  27. data/app/components/ariadne/form/separator/component.html.erb +1 -0
  28. data/app/components/ariadne/form/separator/component.rb +8 -0
  29. data/app/components/ariadne/form/spacing_wrapper/component.html.erb +3 -0
  30. data/app/components/ariadne/form/spacing_wrapper/component.rb +8 -0
  31. data/app/components/ariadne/form/text_field/component.html.erb +25 -0
  32. data/app/components/ariadne/form/text_field/component.rb +132 -0
  33. data/app/components/ariadne/form/validation_message/component.html.erb +5 -0
  34. data/app/components/ariadne/form/validation_message/component.rb +14 -0
  35. data/app/components/ariadne/layout/narrow/component.html.erb +10 -0
  36. data/app/components/ariadne/layout/narrow/component.rb +24 -0
  37. data/app/components/ariadne/layout/nav_bar/component.css +0 -0
  38. data/app/components/ariadne/layout/nav_bar/component.html.erb +123 -0
  39. data/app/components/ariadne/layout/nav_bar/component.rb +77 -0
  40. data/app/components/ariadne/ui/button/component.html.erb +5 -0
  41. data/app/components/ariadne/ui/button/component.rb +184 -0
  42. data/app/components/ariadne/ui/clipboard_copy/component.html.erb +8 -0
  43. data/app/components/ariadne/ui/clipboard_copy/component.rb +102 -0
  44. data/app/components/ariadne/ui/clipboard_copy/component.ts +54 -0
  45. data/app/components/ariadne/ui/combobox/component.html.erb +32 -0
  46. data/app/components/ariadne/ui/combobox/component.rb +83 -0
  47. data/app/components/ariadne/ui/combobox/component.ts +119 -0
  48. data/app/components/ariadne/ui/combobox/menu_item/component.html.erb +9 -0
  49. data/app/components/ariadne/ui/combobox/menu_item/component.rb +53 -0
  50. data/app/components/ariadne/ui/combobox/option/component.html.erb +11 -0
  51. data/app/components/ariadne/ui/combobox/option/component.rb +45 -0
  52. data/app/components/ariadne/ui/heroicon/component.html.erb +3 -0
  53. data/app/components/ariadne/ui/heroicon/component.rb +141 -0
  54. data/app/components/ariadne/ui/image/component.rb +69 -0
  55. data/app/components/ariadne/ui/link/component.html.erb +3 -0
  56. data/app/components/ariadne/ui/link/component.rb +56 -0
  57. data/app/components/ariadne/ui/typography/component.html.erb +3 -0
  58. data/app/components/ariadne/ui/typography/component.rb +41 -0
  59. data/app/frontend/ariadne/index.ts +14 -0
  60. data/app/frontend/ariadne/stimulus_app.ts +53 -0
  61. data/app/frontend/ariadne/theme.ts +8 -0
  62. data/app/frontend/controllers/tooltip.ts +75 -0
  63. data/app/frontend/entrypoints/application.ts +1 -0
  64. data/app/frontend/stylesheets/ariadne_view_components.css +18 -0
  65. data/app/frontend/stylesheets/scrollbar.css +28 -0
  66. data/app/frontend/stylesheets/tippy.js/themes/tomato.css +4 -0
  67. data/app/frontend/stylesheets/typography.css +117 -0
  68. data/app/frontend/utils/createController.ts +95 -0
  69. data/app/helpers/ariadne/form_helper.rb +31 -0
  70. data/app/lib/ariadne/attributes_helper.rb +119 -0
  71. data/app/lib/ariadne/fetch_or_fallback_helper.rb +1 -1
  72. data/app/lib/ariadne/form.rb +16 -0
  73. data/app/lib/ariadne/view_helper.rb +2 -5
  74. data/app/lib/view_components_contrib/html_attrs.rb +64 -0
  75. data/app/lib/view_components_contrib/style_variants.rb +14 -0
  76. data/lib/ariadne/forms/acts_as_component.rb +125 -0
  77. data/lib/ariadne/forms/base.html.erb +8 -0
  78. data/lib/ariadne/forms/base.rb +132 -0
  79. data/lib/ariadne/forms/buffer_rewriter.rb +51 -0
  80. data/lib/ariadne/forms/builder.rb +88 -0
  81. data/lib/ariadne/forms/dsl/button_input.rb +33 -0
  82. data/lib/ariadne/forms/dsl/form_object.rb +26 -0
  83. data/lib/ariadne/forms/dsl/input.rb +322 -0
  84. data/lib/ariadne/forms/dsl/input_group.rb +34 -0
  85. data/lib/ariadne/forms/dsl/input_methods.rb +157 -0
  86. data/lib/ariadne/forms/dsl/submit_button_input.rb +36 -0
  87. data/lib/ariadne/forms/dsl/text_field_input.rb +73 -0
  88. data/lib/ariadne/forms/utils.rb +34 -0
  89. data/lib/ariadne/generate.rb +11 -0
  90. data/lib/ariadne/view_components/engine.rb +24 -7
  91. data/lib/ariadne/view_components/version.rb +1 -1
  92. data/lib/ariadne/view_components.rb +1 -1
  93. data/lib/ariadne/yard/backend.rb +24 -0
  94. data/lib/ariadne/yard/component_manifest.rb +148 -0
  95. data/lib/ariadne/yard/component_ref.rb +49 -0
  96. data/lib/ariadne/yard/docs_helper.rb +98 -0
  97. data/lib/ariadne/yard/info_arch_docs_helper.rb +31 -0
  98. data/lib/ariadne/yard/lookbook_docs_helper.rb +32 -0
  99. data/lib/ariadne/yard/lookbook_pages_backend.rb +235 -0
  100. data/lib/ariadne/yard/registry.rb +136 -0
  101. data/lib/ariadne/yard/renders_many_handler.rb +23 -0
  102. data/lib/ariadne/yard/renders_one_handler.rb +23 -0
  103. data/lib/ariadne/yard.rb +19 -0
  104. data/static/arguments.yml +141 -48
  105. data/static/audited_at.json +0 -9
  106. data/static/classes.yml +210 -209
  107. data/static/constants.json +2 -209
  108. data/static/statuses.json +0 -9
  109. metadata +140 -210
  110. data/app/assets/builds/ariadne_view_components.css +0 -2202
  111. data/app/assets/javascripts/components/ariadne/accumulator_controller/accumulator_controller.d.ts +0 -22
  112. data/app/assets/javascripts/components/ariadne/ariadne-form.d.ts +0 -22
  113. data/app/assets/javascripts/components/ariadne/ariadne.d.ts +0 -2
  114. data/app/assets/javascripts/components/ariadne/clipboard_copy_component/clipboard-copy-component.d.ts +0 -4
  115. data/app/assets/javascripts/components/ariadne/dropdown/menu_component.d.ts +0 -1
  116. data/app/assets/javascripts/components/ariadne/events_controller/events_controller.d.ts +0 -4
  117. data/app/assets/javascripts/components/ariadne/options_controller/options_controller.d.ts +0 -39
  118. data/app/assets/javascripts/components/ariadne/outlet_manager_controller/outlet_manager_controller.d.ts +0 -42
  119. data/app/assets/javascripts/components/ariadne/slideover_component/slideover-component.d.ts +0 -9
  120. data/app/assets/javascripts/components/ariadne/string_match_controller/string_match_controller.d.ts +0 -27
  121. data/app/assets/javascripts/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.d.ts +0 -48
  122. data/app/assets/javascripts/components/ariadne/tab_container_component/tab-container-component.d.ts +0 -1
  123. data/app/assets/javascripts/components/ariadne/tab_nav_component/tab-nav-component.d.ts +0 -9
  124. data/app/assets/javascripts/components/ariadne/time_ago_component/time-ago-component.d.ts +0 -1
  125. data/app/assets/javascripts/components/ariadne/toggleable_controller/toggleable_controller.d.ts +0 -34
  126. data/app/assets/javascripts/components/ariadne/tooltip_component/tooltip-component.d.ts +0 -24
  127. data/app/assets/stylesheets/dropdown.css +0 -46
  128. data/app/assets/stylesheets/prosemirror.css +0 -323
  129. data/app/assets/stylesheets/tooltip-component.css +0 -37
  130. data/app/components/ariadne/accumulator_controller/accumulator_controller.d.ts +0 -22
  131. data/app/components/ariadne/accumulator_controller/accumulator_controller.js +0 -39
  132. data/app/components/ariadne/accumulator_controller/accumulator_controller.ts +0 -48
  133. data/app/components/ariadne/action_card_component.html.erb +0 -13
  134. data/app/components/ariadne/action_card_component.rb +0 -88
  135. data/app/components/ariadne/ariadne-form.d.ts +0 -22
  136. data/app/components/ariadne/ariadne-form.js +0 -85
  137. data/app/components/ariadne/ariadne.d.ts +0 -2
  138. data/app/components/ariadne/ariadne.js +0 -24
  139. data/app/components/ariadne/ariadne.ts +0 -29
  140. data/app/components/ariadne/avatar_component.rb +0 -81
  141. data/app/components/ariadne/avatar_stack_component/avatar_stack_component.html.erb +0 -12
  142. data/app/components/ariadne/avatar_stack_component.rb +0 -75
  143. data/app/components/ariadne/base_button.rb +0 -70
  144. data/app/components/ariadne/blankslate_component/blankslate_component.html.erb +0 -26
  145. data/app/components/ariadne/blankslate_component.rb +0 -148
  146. data/app/components/ariadne/body_component.rb +0 -30
  147. data/app/components/ariadne/bottom_tab_component.html.erb +0 -4
  148. data/app/components/ariadne/bottom_tab_component.rb +0 -44
  149. data/app/components/ariadne/bottom_tab_nav_component.html.erb +0 -5
  150. data/app/components/ariadne/bottom_tab_nav_component.rb +0 -33
  151. data/app/components/ariadne/breadcrumbs_component.html.erb +0 -13
  152. data/app/components/ariadne/breadcrumbs_component.rb +0 -31
  153. data/app/components/ariadne/button_component/button_component.html.erb +0 -4
  154. data/app/components/ariadne/button_component.rb +0 -165
  155. data/app/components/ariadne/checkbox_component.html.erb +0 -5
  156. data/app/components/ariadne/checkbox_component.rb +0 -43
  157. data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.d.ts +0 -4
  158. data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.js +0 -18
  159. data/app/components/ariadne/clipboard_copy_component/clipboard-copy-component.ts +0 -19
  160. data/app/components/ariadne/clipboard_copy_component/clipboard_copy_component.html.erb +0 -9
  161. data/app/components/ariadne/clipboard_copy_component.rb +0 -90
  162. data/app/components/ariadne/close_button_component.html.erb +0 -4
  163. data/app/components/ariadne/close_button_component.rb +0 -33
  164. data/app/components/ariadne/combobox_component.html.erb +0 -14
  165. data/app/components/ariadne/combobox_component.rb +0 -76
  166. data/app/components/ariadne/component.rb +0 -127
  167. data/app/components/ariadne/container_component/container_component.html.erb +0 -3
  168. data/app/components/ariadne/container_component.rb +0 -25
  169. data/app/components/ariadne/content.rb +0 -12
  170. data/app/components/ariadne/counter_component.rb +0 -100
  171. data/app/components/ariadne/details_component/details_component.html.erb +0 -4
  172. data/app/components/ariadne/details_component.rb +0 -81
  173. data/app/components/ariadne/dropdown/menu_component.d.ts +0 -1
  174. data/app/components/ariadne/dropdown/menu_component.html.erb +0 -20
  175. data/app/components/ariadne/dropdown/menu_component.js +0 -1
  176. data/app/components/ariadne/dropdown/menu_component.rb +0 -101
  177. data/app/components/ariadne/dropdown/menu_component.ts +0 -1
  178. data/app/components/ariadne/dropdown_component/dropdown_component.html.erb +0 -8
  179. data/app/components/ariadne/dropdown_component.rb +0 -172
  180. data/app/components/ariadne/events_controller/events_controller.d.ts +0 -4
  181. data/app/components/ariadne/events_controller/events_controller.js +0 -6
  182. data/app/components/ariadne/events_controller/events_controller.ts +0 -7
  183. data/app/components/ariadne/flash_component/flash_component.html.erb +0 -31
  184. data/app/components/ariadne/flash_component.rb +0 -128
  185. data/app/components/ariadne/flex_component/flex_component.html.erb +0 -5
  186. data/app/components/ariadne/flex_component.rb +0 -56
  187. data/app/components/ariadne/footer_component/footer_component.html.erb +0 -7
  188. data/app/components/ariadne/footer_component.rb +0 -23
  189. data/app/components/ariadne/grid_component/grid_component.html.erb +0 -26
  190. data/app/components/ariadne/grid_component.rb +0 -67
  191. data/app/components/ariadne/header_component/header_component.html.erb +0 -29
  192. data/app/components/ariadne/header_component.rb +0 -111
  193. data/app/components/ariadne/heading_component.rb +0 -49
  194. data/app/components/ariadne/heroicon_component/heroicon_component.html.erb +0 -4
  195. data/app/components/ariadne/heroicon_component.rb +0 -166
  196. data/app/components/ariadne/image_component.rb +0 -53
  197. data/app/components/ariadne/inline_flex_component/inline_flex_component.html.erb +0 -6
  198. data/app/components/ariadne/inline_flex_component.rb +0 -72
  199. data/app/components/ariadne/layout_component.html.erb +0 -21
  200. data/app/components/ariadne/layout_component.rb +0 -69
  201. data/app/components/ariadne/link_component.rb +0 -65
  202. data/app/components/ariadne/list_component/list_component.html.erb +0 -3
  203. data/app/components/ariadne/list_component.rb +0 -70
  204. data/app/components/ariadne/modal_component.html.erb +0 -11
  205. data/app/components/ariadne/modal_component.rb +0 -88
  206. data/app/components/ariadne/narrow_container_component/narrow_container_component.html.erb +0 -3
  207. data/app/components/ariadne/narrow_container_component.rb +0 -30
  208. data/app/components/ariadne/options_controller/options_controller.d.ts +0 -39
  209. data/app/components/ariadne/options_controller/options_controller.js +0 -89
  210. data/app/components/ariadne/options_controller/options_controller.ts +0 -122
  211. data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.d.ts +0 -42
  212. data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.js +0 -237
  213. data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.ts +0 -278
  214. data/app/components/ariadne/panel_bar_component/panel_bar_component.html.erb +0 -20
  215. data/app/components/ariadne/panel_bar_component.rb +0 -80
  216. data/app/components/ariadne/pill_component/pill_component.html.erb +0 -3
  217. data/app/components/ariadne/pill_component.rb +0 -44
  218. data/app/components/ariadne/popover_component.html.erb +0 -10
  219. data/app/components/ariadne/popover_component.rb +0 -81
  220. data/app/components/ariadne/progress_bar_component.html.erb +0 -5
  221. data/app/components/ariadne/progress_bar_component.rb +0 -63
  222. data/app/components/ariadne/relative_time_component.html.erb +0 -3
  223. data/app/components/ariadne/relative_time_component.rb +0 -61
  224. data/app/components/ariadne/show_more_button_component.html.erb +0 -11
  225. data/app/components/ariadne/show_more_button_component.rb +0 -47
  226. data/app/components/ariadne/slideover_component/slideover-component.d.ts +0 -9
  227. data/app/components/ariadne/slideover_component/slideover-component.js +0 -11
  228. data/app/components/ariadne/slideover_component/slideover-component.ts +0 -17
  229. data/app/components/ariadne/slideover_component/slideover_component.html.erb +0 -9
  230. data/app/components/ariadne/slideover_component.rb +0 -66
  231. data/app/components/ariadne/spinner_component.html.erb +0 -16
  232. data/app/components/ariadne/spinner_component.rb +0 -45
  233. data/app/components/ariadne/string_match_controller/string_match_controller.d.ts +0 -27
  234. data/app/components/ariadne/string_match_controller/string_match_controller.js +0 -51
  235. data/app/components/ariadne/string_match_controller/string_match_controller.ts +0 -65
  236. data/app/components/ariadne/subheader_component.html.erb +0 -11
  237. data/app/components/ariadne/subheader_component.rb +0 -65
  238. data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.d.ts +0 -48
  239. data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.js +0 -207
  240. data/app/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.ts +0 -256
  241. data/app/components/ariadne/tab_component/tab_component.html.erb +0 -3
  242. data/app/components/ariadne/tab_component.rb +0 -98
  243. data/app/components/ariadne/tab_container_component/tab-container-component.d.ts +0 -1
  244. data/app/components/ariadne/tab_container_component/tab-container-component.js +0 -23
  245. data/app/components/ariadne/tab_container_component/tab-container-component.ts +0 -24
  246. data/app/components/ariadne/tab_container_component.erb +0 -10
  247. data/app/components/ariadne/tab_container_component.rb +0 -68
  248. data/app/components/ariadne/tab_nav_component/tab-nav-component.d.ts +0 -9
  249. data/app/components/ariadne/tab_nav_component/tab-nav-component.js +0 -33
  250. data/app/components/ariadne/tab_nav_component/tab-nav-component.ts +0 -34
  251. data/app/components/ariadne/tab_nav_component/tab_nav_component.html.erb +0 -7
  252. data/app/components/ariadne/tab_nav_component.rb +0 -72
  253. data/app/components/ariadne/table_nav_component/table_nav_component.html.erb +0 -52
  254. data/app/components/ariadne/table_nav_component.rb +0 -338
  255. data/app/components/ariadne/text.rb +0 -25
  256. data/app/components/ariadne/time_ago_component/time-ago-component.d.ts +0 -1
  257. data/app/components/ariadne/time_ago_component/time-ago-component.js +0 -1
  258. data/app/components/ariadne/time_ago_component/time-ago-component.ts +0 -1
  259. data/app/components/ariadne/time_ago_component.rb +0 -56
  260. data/app/components/ariadne/timeline_component/timeline_component.html.erb +0 -19
  261. data/app/components/ariadne/timeline_component.rb +0 -34
  262. data/app/components/ariadne/toggle_component/toggle_component.html.erb +0 -15
  263. data/app/components/ariadne/toggle_component.rb +0 -95
  264. data/app/components/ariadne/toggleable_controller/toggleable_controller.d.ts +0 -34
  265. data/app/components/ariadne/toggleable_controller/toggleable_controller.js +0 -54
  266. data/app/components/ariadne/toggleable_controller/toggleable_controller.ts +0 -77
  267. data/app/components/ariadne/tooltip_component/tooltip-component.d.ts +0 -24
  268. data/app/components/ariadne/tooltip_component/tooltip-component.js +0 -43
  269. data/app/components/ariadne/tooltip_component/tooltip-component.ts +0 -57
  270. data/app/components/ariadne/tooltip_component/tooltip_component.html.erb +0 -4
  271. data/app/components/ariadne/tooltip_component.rb +0 -108
  272. data/app/lib/ariadne/action_view_extensions/form_helper.rb +0 -30
  273. data/app/lib/ariadne/audited/dsl.rb +0 -32
  274. data/app/lib/ariadne/form_builder.rb +0 -80
  275. data/app/lib/ariadne/status/dsl.rb +0 -41
  276. data/config/importmap.rb +0 -3
  277. data/exe/tailwindcss +0 -21
  278. data/lib/rubocop/cop/ariadne/base_cop.rb +0 -26
  279. data/tailwind.config.js +0 -70
@@ -1,22 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- export default class AccumulatorController extends Controller {
3
- static targets: string[];
4
- static values: {
5
- syncAttrs: {
6
- type: ArrayConstructor;
7
- default: string[];
8
- };
9
- sumAttr: {
10
- type: string;
11
- default: string;
12
- };
13
- };
14
- sumTargets: Array<HTMLElement>;
15
- accumulatorTarget?: HTMLElement;
16
- syncAttrsValue: Array<string>;
17
- sumAttrValue: string;
18
- connect(): void;
19
- accumulate(): void;
20
- setAttributesTo(sum: number): void;
21
- get accumulator(): Element;
22
- }
@@ -1,22 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- import type { TemplateResult } from 'lit-html';
3
- type HTMLFormField = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
4
- export default class AriadneFormWith extends Controller {
5
- static targets: string[];
6
- readonly formFieldTargets: [HTMLFormField];
7
- connect(): void;
8
- disconnect(): void;
9
- onBlur: (event: Event) => void;
10
- onSubmit: (event: Event) => void;
11
- validateForm(): boolean;
12
- validateField(field: HTMLFormField): boolean;
13
- shouldValidateField(field: HTMLFormField): boolean;
14
- refreshErrorForInvalidField(field: HTMLFormField, isValid: boolean): void;
15
- removeExistingErrorMessage(field: HTMLFormField): void;
16
- showErrorForInvalidField(field: HTMLFormField): void;
17
- buildFieldErrorHtml(field: HTMLFormField): string;
18
- get formFields(): HTMLFormField[];
19
- get firstInvalidField(): HTMLFormField | undefined;
20
- getRenderString: (data: TemplateResult) => string;
21
- }
22
- export {};
@@ -1,2 +0,0 @@
1
- import './tab_container_component/tab-container-component';
2
- import './time_ago_component/time-ago-component';
@@ -1,4 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- export default class ClipboardCopyComponent extends Controller {
3
- copy(): void;
4
- }
@@ -1 +0,0 @@
1
- import '@github/details-menu-element';
@@ -1,4 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- export default class EventsController extends Controller {
3
- stopPropagation(e: Event): void;
4
- }
@@ -1,39 +0,0 @@
1
- import { TOutletChangeData } from '../outlet_manager_controller/outlet_manager_controller';
2
- import SyncedBooleanAttributesController from '../synced_boolean_attributes_controller/synced_boolean_attributes_controller';
3
- type TOptionKey = string | number;
4
- type TActiveOptions = {
5
- [k: TOptionKey]: boolean;
6
- };
7
- export interface OptionsOutlet extends SyncedBooleanAttributesController<TActiveOptions> {
8
- select: (e: Event, updateTo?: TOutletChangeData<TActiveOptions>) => void;
9
- }
10
- export default class OptionsController extends SyncedBooleanAttributesController<TActiveOptions> implements OptionsOutlet {
11
- #private;
12
- static outlets: string[];
13
- static targets: string[];
14
- static values: {
15
- activeOptions: ObjectConstructor;
16
- isMulti: {
17
- type: BooleanConstructor;
18
- default: boolean;
19
- };
20
- toggleable: {
21
- type: BooleanConstructor;
22
- default: boolean;
23
- };
24
- syncedAttrs: ArrayConstructor;
25
- antiAttrs: ArrayConstructor;
26
- protectAttrs: BooleanConstructor;
27
- outletEvents: ArrayConstructor;
28
- };
29
- readonly optionTargets: Array<Element>;
30
- activeOptionsValue: TActiveOptions;
31
- readonly isMultiValue: boolean;
32
- readonly toggleableValue: boolean;
33
- select(event: Event, updateTo?: TOutletChangeData<TActiveOptions>): void;
34
- optionTargetConnected(element: Element): void;
35
- getValueForElement(element: Element): boolean;
36
- getState(): TActiveOptions;
37
- outletUpdate: (event: Event, updateTo?: TOutletChangeData<TActiveOptions>) => void;
38
- }
39
- export {};
@@ -1,42 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- type TOutletEventLookup = boolean | {
3
- [k: string]: TOutletEventLookup;
4
- };
5
- export type TOutletChangeData<T> = {
6
- eventKey?: string;
7
- data?: T;
8
- } | undefined;
9
- export default class OutletManagerController<T> extends Controller {
10
- #private;
11
- static values: {
12
- outletEvents: ArrayConstructor;
13
- };
14
- readonly outletEventsValue: Array<string>;
15
- readonly hasOutletEventsValue: boolean;
16
- static outlets: string[];
17
- readonly toggleableOutlets: Array<OutletManagerController<T>>;
18
- readonly hasToggleableOutlet: boolean;
19
- readonly optionsOutlets: Array<OutletManagerController<T>>;
20
- readonly hasOptionsOutlet: boolean;
21
- readonly stringMatchOutlets: Array<OutletManagerController<T>>;
22
- readonly hasStringMatchOutlet: boolean;
23
- outletEventsLookup: TOutletEventLookup | null;
24
- static domEvents: {
25
- [k: string]: boolean;
26
- };
27
- eventRecords: Map<Event, boolean>;
28
- getOutlets(): Array<OutletManagerController<T>> | null | void;
29
- outletUpdate(event: Event, data: TOutletChangeData<T>): void;
30
- getState(): T;
31
- connect(): void;
32
- syncOutlets(): void;
33
- sendToOutlets(event: Event, updateTo?: TOutletChangeData<T>): void;
34
- isListeningForOutletEvent(eventTypes: string): boolean;
35
- isDOMEventName(eventName: string): boolean;
36
- getEventKey(event: Event): string;
37
- hasHeardEvent(event: Event): boolean;
38
- get event_key_prefix(): string;
39
- get event_key_postfix(): string;
40
- get outletEvents(): TOutletEventLookup;
41
- }
42
- export {};
@@ -1,9 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- export default class SlideoverComponent extends Controller {
3
- static targets: string[];
4
- readonly expandableTarget: HTMLDivElement;
5
- readonly expandWrapperTarget: HTMLDivElement;
6
- readonly slidePanelTargets: [HTMLDivElement];
7
- readonly buttonWrapperTarget: HTMLDivElement;
8
- toggle(): void;
9
- }
@@ -1,27 +0,0 @@
1
- import { TOutletChangeData } from '../outlet_manager_controller/outlet_manager_controller';
2
- import SyncedBooleanAttributesController from '../synced_boolean_attributes_controller/synced_boolean_attributes_controller';
3
- export interface StringMatchOutlet extends SyncedBooleanAttributesController<string> {
4
- change: (event: Event, updateTo?: TOutletChangeData<string>) => void;
5
- }
6
- export default class StringMatchController extends SyncedBooleanAttributesController<string> implements StringMatchOutlet {
7
- #private;
8
- static outlets: string[];
9
- static targets: string[];
10
- static values: {
11
- keyword: StringConstructor;
12
- syncedAttrs: ArrayConstructor;
13
- antiAttrs: ArrayConstructor;
14
- protectAttrs: BooleanConstructor;
15
- outletEvents: ArrayConstructor;
16
- };
17
- readonly matchTargets: Array<HTMLElement>;
18
- readonly hasMatchTarget: boolean;
19
- readonly emptyTarget: Element;
20
- readonly hasEmptyTarget: boolean;
21
- keywordValue: string;
22
- change(event: Event, updateTo?: TOutletChangeData<string>): void;
23
- getElementsToSync(): Element[] | null | undefined;
24
- getValueForElement(element: Element): boolean;
25
- getState(): string;
26
- outletUpdate: (event: Event, updateTo?: TOutletChangeData<string>) => void;
27
- }
@@ -1,48 +0,0 @@
1
- import OutletManagerController from '../outlet_manager_controller/outlet_manager_controller';
2
- export type TStimulusDispatchEvent<TDetails> = {
3
- target?: Element | undefined;
4
- detail?: TDetails | undefined;
5
- prefix?: string | undefined;
6
- bubbles?: boolean | undefined;
7
- cancelable?: boolean | undefined;
8
- preventDefault: () => void;
9
- };
10
- export type TBooleanValueDetail = {
11
- value: boolean;
12
- };
13
- export interface TSyncAttrDetail extends TBooleanValueDetail {
14
- attr: string;
15
- }
16
- export default class SyncedBooleanAttributesController<T> extends OutletManagerController<T> {
17
- #private;
18
- static values: {
19
- syncedAttrs: ArrayConstructor;
20
- antiAttrs: ArrayConstructor;
21
- protectAttrs: BooleanConstructor;
22
- outletEvents: ArrayConstructor;
23
- };
24
- readonly syncedAttrsValue: string[];
25
- readonly hasSyncedAttrsValue: boolean;
26
- readonly antiAttrsValue: string[];
27
- readonly hasAntiAttrsValue: boolean;
28
- readonly protectAttrsValue: boolean;
29
- static removeOnFalseAttrs: {
30
- [k: string]: boolean;
31
- };
32
- syncedAttrsLookup: {
33
- [k: string]: boolean;
34
- } | null;
35
- antiAttrsLookup: {
36
- [k: string]: boolean;
37
- } | null;
38
- getValueForElement(element: Element): boolean | null;
39
- getElementsToSync(): Array<Element> | null | undefined;
40
- connect(): void;
41
- updateAttributesForElement(element: Element, value: boolean): void;
42
- getSyncedAttrsForElement(element: Element): string[] | null;
43
- getAntiAttrsForElement(element: Element): string[] | null;
44
- getParsedAttributeForElement<T>(element: Element, attribute: string): T | null;
45
- syncElementAttributes(): void;
46
- validateAttrChange(dispatchEvent: TStimulusDispatchEvent<TSyncAttrDetail>): void;
47
- doesElementHaveOnAttrs(element: Element): boolean;
48
- }
@@ -1 +0,0 @@
1
- import '@github/tab-container-element';
@@ -1,9 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- export default class TabNavComponent extends Controller {
3
- static targets: string[];
4
- readonly tabTargets: [HTMLAnchorElement];
5
- SELECTED_CLASSES: string[];
6
- UNSELECTED_CLASSES: string[];
7
- connect(): void;
8
- toggle(event: Event): void;
9
- }
@@ -1 +0,0 @@
1
- import '@github/time-elements';
@@ -1,34 +0,0 @@
1
- import type { TOutletChangeData } from '../outlet_manager_controller/outlet_manager_controller';
2
- import SyncedBooleanAttributesController from '../synced_boolean_attributes_controller/synced_boolean_attributes_controller';
3
- export interface ToggleableOutlet extends SyncedBooleanAttributesController<boolean> {
4
- toggle: (event: Event, updateTo?: TOutletChangeData<boolean>) => void;
5
- }
6
- export default class ToggleableController extends SyncedBooleanAttributesController<boolean> implements ToggleableOutlet {
7
- static outlets: string[];
8
- static values: {
9
- state: {
10
- type: BooleanConstructor;
11
- default: boolean;
12
- };
13
- closeOnOutsideClick: {
14
- type: BooleanConstructor;
15
- default: boolean;
16
- };
17
- syncedAttrs: ArrayConstructor;
18
- antiAttrs: ArrayConstructor;
19
- protectAttrs: BooleanConstructor;
20
- outletEvents: ArrayConstructor;
21
- };
22
- stateValue: boolean;
23
- readonly closeOnOutsideClickValue: boolean;
24
- connect(): void;
25
- toggle(event: Event, updateTo?: TOutletChangeData<boolean>): void;
26
- on(event: Event): void;
27
- off(event: Event): void;
28
- clickOutside(event: Event): void;
29
- getValueForElement(element: Element): boolean | null;
30
- getElementsToSync(): Element[] | null | undefined;
31
- getState(): boolean;
32
- get event_key_postfix(): "on" | "off";
33
- outletUpdate: (event: Event, updateTo?: TOutletChangeData<boolean>) => void;
34
- }
@@ -1,24 +0,0 @@
1
- import { Controller } from '@hotwired/stimulus';
2
- import type { Instance, Placement } from '@popperjs/core';
3
- export default class TooltipComponent extends Controller {
4
- static targets: string[];
5
- readonly triggerTarget: HTMLElement;
6
- readonly tooltipTarget: HTMLElement;
7
- static values: {
8
- placement: {
9
- type: StringConstructor;
10
- default: string;
11
- };
12
- offset: {
13
- type: ArrayConstructor;
14
- default: number[];
15
- };
16
- };
17
- readonly placementValue: Placement;
18
- readonly offsetValue: Array<number>;
19
- popperInstance: Instance;
20
- connect(): void;
21
- disconnect(): void;
22
- show(): void;
23
- hide(): void;
24
- }
@@ -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
- }