trestle 0.9.9 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (339) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +26 -0
  3. data/.github/workflows/rspec.yml +37 -5
  4. data/.gitignore +3 -0
  5. data/Gemfile +14 -1
  6. data/README.md +3 -2
  7. data/app/assets/bundle/trestle/admin.css +23 -0
  8. data/app/assets/bundle/trestle/admin.js +83 -0
  9. data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
  10. data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
  11. data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
  12. data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
  13. data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
  14. data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
  15. data/app/assets/bundle/trestle/locale/cs.js +110 -0
  16. data/app/assets/bundle/trestle/locale/de.js +116 -0
  17. data/app/assets/bundle/trestle/locale/en.js +329 -0
  18. data/app/assets/bundle/trestle/locale/es-MX.js +109 -0
  19. data/app/assets/bundle/trestle/locale/es.js +109 -0
  20. data/app/assets/bundle/trestle/locale/fr.js +111 -0
  21. data/app/assets/bundle/trestle/locale/ko.js +111 -0
  22. data/app/assets/bundle/trestle/locale/lv.js +109 -0
  23. data/app/assets/bundle/trestle/locale/nl.js +96 -0
  24. data/app/assets/bundle/trestle/locale/pl.js +99 -0
  25. data/app/assets/bundle/trestle/locale/pt-BR.js +98 -0
  26. data/app/assets/bundle/trestle/locale/vi.js +116 -0
  27. data/app/assets/bundle/trestle/locale/zh-CN.js +109 -0
  28. data/app/assets/bundle/trestle/photoswipe-063ce7be40e10b3e6848.digested.js +6 -0
  29. data/app/assets/sprockets/trestle/custom.css +1 -0
  30. data/app/assets/sprockets/trestle/icons/font-awesome.css.erb +32 -0
  31. data/app/assets/sprockets/trestle/manifest.js +4 -0
  32. data/app/assets/stylesheets/trestle/custom.css +6 -1
  33. data/app/controllers/concerns/trestle/controller/helpers.rb +2 -0
  34. data/app/controllers/concerns/trestle/controller/location.rb +1 -6
  35. data/app/controllers/concerns/trestle/controller/modal.rb +25 -0
  36. data/app/controllers/concerns/trestle/controller/turbo_stream.rb +12 -0
  37. data/app/controllers/concerns/trestle/resource/controller/actions.rb +39 -28
  38. data/app/controllers/concerns/trestle/resource/controller/redirection.rb +5 -5
  39. data/app/controllers/trestle/application_controller.rb +2 -1
  40. data/app/helpers/trestle/flash_helper.rb +10 -0
  41. data/app/helpers/trestle/form_helper.rb +3 -2
  42. data/app/helpers/trestle/format_helper.rb +2 -1
  43. data/app/helpers/trestle/i18n_helper.rb +46 -7
  44. data/app/helpers/trestle/modal_helper.rb +29 -0
  45. data/app/helpers/trestle/tab_helper.rb +1 -1
  46. data/app/helpers/trestle/turbo/frame_helper.rb +29 -0
  47. data/app/helpers/trestle/turbo/stream_helper.rb +9 -0
  48. data/app/helpers/trestle/turbo/tag_builder.rb +21 -0
  49. data/app/helpers/trestle/url_helper.rb +7 -4
  50. data/app/views/layouts/trestle/admin.html.erb +16 -18
  51. data/app/views/layouts/trestle/admin.turbo_stream.erb +4 -0
  52. data/app/views/layouts/trestle/modal.html.erb +5 -0
  53. data/app/views/trestle/_i18n.html.erb +12 -0
  54. data/app/views/trestle/_theme.html.erb +15 -0
  55. data/app/views/trestle/application/_header.html.erb +12 -10
  56. data/app/views/trestle/application/_layout.html.erb +6 -3
  57. data/app/views/trestle/application/_modal.html.erb +36 -0
  58. data/app/views/trestle/application/_tabs.html.erb +4 -4
  59. data/app/views/trestle/flash/_alert.html.erb +1 -1
  60. data/app/views/trestle/flash/_debug.html.erb +1 -1
  61. data/app/views/trestle/resource/_form.html.erb +5 -0
  62. data/app/views/trestle/resource/create.turbo_stream.erb +1 -0
  63. data/app/views/trestle/resource/destroy.turbo_stream.erb +1 -0
  64. data/app/views/trestle/resource/edit.html.erb +6 -2
  65. data/app/views/trestle/resource/index.html.erb +17 -10
  66. data/app/views/trestle/resource/new.html.erb +9 -2
  67. data/app/views/trestle/resource/show.html.erb +6 -2
  68. data/app/views/trestle/resource/update.turbo_stream.erb +1 -0
  69. data/app/views/trestle/shared/_sidebar.html.erb +10 -10
  70. data/frontend/css/components/_alerts.scss +41 -37
  71. data/frontend/css/components/_avatar.scss +12 -12
  72. data/frontend/css/components/_background.scss +8 -36
  73. data/frontend/css/components/_badges.scss +31 -0
  74. data/frontend/css/components/_breadcrumbs.scss +9 -30
  75. data/frontend/css/components/_buttons.scss +8 -7
  76. data/frontend/css/components/_datepicker.scss +15 -11
  77. data/frontend/css/components/_dropdown.scss +21 -9
  78. data/frontend/css/components/{_fields.scss → _forms.scss} +18 -5
  79. data/frontend/css/components/_grid.scss +29 -0
  80. data/frontend/css/components/_media-grid.scss +52 -44
  81. data/frontend/css/components/_modal.scss +37 -8
  82. data/frontend/css/components/_pagination.scss +5 -9
  83. data/frontend/css/components/_photoswipe.scss +8 -0
  84. data/frontend/css/components/_popover.scss +2 -1
  85. data/frontend/css/components/_scopes.scss +5 -11
  86. data/frontend/css/components/_select.scss +160 -31
  87. data/frontend/css/components/_sort.scss +1 -1
  88. data/frontend/css/components/_table.scss +61 -66
  89. data/frontend/css/components/_tabs.scss +20 -20
  90. data/frontend/css/components/_tags.scss +80 -15
  91. data/frontend/css/components/_toolbars.scss +18 -13
  92. data/frontend/css/components/_turbo.scss +3 -0
  93. data/frontend/css/core/_bootstrap.scss +46 -0
  94. data/frontend/css/core/_dependencies.scss +4 -3
  95. data/frontend/css/core/_functions.scss +31 -0
  96. data/frontend/css/core/_mixins.scss +2 -36
  97. data/frontend/css/core/_theme.scss +261 -0
  98. data/frontend/css/core/_typography.scss +16 -14
  99. data/frontend/css/icons/_fontawesome.scss +3 -15
  100. data/frontend/css/index.scss +15 -7
  101. data/frontend/css/layout/_base.scss +6 -4
  102. data/frontend/css/layout/_content-header.scss +71 -0
  103. data/frontend/css/layout/_footer.scss +5 -7
  104. data/frontend/css/layout/_header.scss +5 -3
  105. data/frontend/css/layout/_main-content.scss +107 -0
  106. data/frontend/css/layout/_navigation.scss +112 -50
  107. data/frontend/css/layout/_sidebar.scss +72 -36
  108. data/frontend/css/support/_sprockets.scss +2 -0
  109. data/frontend/css/support/_webpack.scss +2 -0
  110. data/frontend/css/variables/_bootstrap.scss +158 -55
  111. data/frontend/css/variables/_maps.scss +15 -0
  112. data/frontend/css/variables/_trestle.scss +70 -38
  113. data/frontend/js/controllers/application_controller.js +17 -0
  114. data/frontend/js/controllers/batch_action_controller.js +59 -0
  115. data/frontend/js/controllers/checkbox_select_controller.js +46 -0
  116. data/frontend/js/controllers/confirm_controller.js +115 -0
  117. data/frontend/js/controllers/confirm_delete_controller.js +11 -0
  118. data/frontend/js/controllers/datepicker_controller.js +12 -0
  119. data/frontend/js/controllers/datetimepicker_controller.js +13 -0
  120. data/frontend/js/controllers/deprecated/init_controller.js +9 -0
  121. data/frontend/js/controllers/flatpickr_controller.js +50 -0
  122. data/frontend/js/controllers/follow_url_controller.js +36 -0
  123. data/frontend/js/controllers/form_error_controller.js +24 -0
  124. data/frontend/js/controllers/form_loading_controller.js +50 -0
  125. data/frontend/js/controllers/gallery_controller.js +12 -0
  126. data/frontend/js/controllers/index.js +19 -0
  127. data/frontend/js/controllers/keyboard_submit_controller.js +25 -0
  128. data/frontend/js/controllers/lightbox_controller.js +158 -0
  129. data/frontend/js/controllers/mobile_sidebar_controller.js +30 -0
  130. data/frontend/js/controllers/modal_controller.js +36 -0
  131. data/frontend/js/controllers/modal_frame_controller.js +11 -0
  132. data/frontend/js/controllers/modal_trigger_controller.js +74 -0
  133. data/frontend/js/{components/navigation.js → controllers/navigation_controller.js} +14 -10
  134. data/frontend/js/controllers/navigation_tooltip_controller.js +32 -0
  135. data/frontend/js/controllers/popover_controller.js +87 -0
  136. data/frontend/js/controllers/reloadable_controller.js +34 -0
  137. data/frontend/js/controllers/select_controller.js +49 -0
  138. data/frontend/js/controllers/sidebar_controller.js +33 -0
  139. data/frontend/js/controllers/tab_errors_controller.js +45 -0
  140. data/frontend/js/controllers/tabs_controller.js +45 -0
  141. data/frontend/js/controllers/timepicker_controller.js +14 -0
  142. data/frontend/js/controllers/toggle_attr_controller.js +27 -0
  143. data/frontend/js/controllers/toggle_class_controller.js +27 -0
  144. data/frontend/js/controllers/tooltip_controller.js +13 -0
  145. data/frontend/js/controllers/wrapper_controller.js +43 -0
  146. data/frontend/js/core/backdrop.js +100 -0
  147. data/frontend/js/core/error_modal.js +65 -0
  148. data/frontend/js/core/fetch.js +32 -0
  149. data/frontend/js/core/i18n.js +24 -10
  150. data/frontend/js/core/modal.js +52 -0
  151. data/frontend/js/core/stream_actions.js +56 -0
  152. data/frontend/js/core/turbo_errors.js +9 -0
  153. data/frontend/js/{core → deprecated}/events.js +1 -8
  154. data/frontend/js/deprecated/tooltip.js +8 -0
  155. data/frontend/js/index.js +28 -40
  156. data/frontend/js/mixins/index.js +5 -0
  157. data/frontend/js/mixins/photoswipe.js +10 -0
  158. data/frontend/js/util/bootstrap.js +93 -0
  159. data/i18n/config.yml +14 -0
  160. data/i18n/environment.rb +8 -0
  161. data/i18n/export +3 -0
  162. data/i18n/template.erb +1 -0
  163. data/lib/generators/trestle/install/install_generator.rb +3 -8
  164. data/lib/generators/trestle/install/templates/trestle.rb.erb +5 -5
  165. data/lib/trestle/color.rb +113 -0
  166. data/lib/trestle/configuration.rb +16 -8
  167. data/lib/trestle/engine.rb +28 -20
  168. data/lib/trestle/form/fields/check_box_helpers.rb +7 -18
  169. data/lib/trestle/form/fields/collection_select.rb +1 -1
  170. data/lib/trestle/form/fields/color_field.rb +4 -0
  171. data/lib/trestle/form/fields/date_field.rb +4 -0
  172. data/lib/trestle/form/fields/date_picker.rb +10 -4
  173. data/lib/trestle/form/fields/date_select.rb +1 -1
  174. data/lib/trestle/form/fields/datetime_field.rb +4 -0
  175. data/lib/trestle/form/fields/datetime_select.rb +1 -1
  176. data/lib/trestle/form/fields/file_field.rb +3 -28
  177. data/lib/trestle/form/fields/form_control.rb +2 -2
  178. data/lib/trestle/form/fields/form_group.rb +1 -1
  179. data/lib/trestle/form/fields/grouped_collection_select.rb +1 -1
  180. data/lib/trestle/form/fields/radio_button_helpers.rb +5 -17
  181. data/lib/trestle/form/fields/range_field.rb +1 -5
  182. data/lib/trestle/form/fields/select.rb +17 -1
  183. data/lib/trestle/form/fields/time_field.rb +4 -0
  184. data/lib/trestle/form/fields/time_select.rb +1 -1
  185. data/lib/trestle/form/fields/time_zone_select.rb +1 -1
  186. data/lib/trestle/form/renderer.rb +4 -1
  187. data/lib/trestle/form.rb +16 -1
  188. data/lib/trestle/resource/toolbar.rb +18 -8
  189. data/lib/trestle/sprockets_compressor.rb +16 -0
  190. data/lib/trestle/table/actions_column.rb +2 -2
  191. data/lib/trestle/table/row.rb +2 -1
  192. data/lib/trestle/table/select_column.rb +3 -6
  193. data/lib/trestle/table.rb +6 -1
  194. data/lib/trestle/toolbar/context.rb +7 -4
  195. data/lib/trestle/toolbar/item.rb +1 -1
  196. data/lib/trestle/toolbar/menu.rb +11 -11
  197. data/lib/trestle/version.rb +1 -1
  198. data/lib/trestle.rb +2 -23
  199. data/package.json +31 -27
  200. data/trestle.gemspec +6 -11
  201. data/webpack.config.js +10 -10
  202. data/yarn.lock +1523 -1274
  203. metadata +177 -210
  204. data/app/assets/bundle/trestle/bundle.css +0 -12
  205. data/app/assets/bundle/trestle/bundle.js +0 -89
  206. data/app/assets/bundle/trestle/fa-brands-400.eot +0 -0
  207. data/app/assets/bundle/trestle/fa-brands-400.svg +0 -3717
  208. data/app/assets/bundle/trestle/fa-brands-400.woff +0 -0
  209. data/app/assets/bundle/trestle/fa-regular-400.eot +0 -0
  210. data/app/assets/bundle/trestle/fa-regular-400.svg +0 -801
  211. data/app/assets/bundle/trestle/fa-regular-400.woff +0 -0
  212. data/app/assets/bundle/trestle/fa-solid-900.eot +0 -0
  213. data/app/assets/bundle/trestle/fa-solid-900.svg +0 -5034
  214. data/app/assets/bundle/trestle/fa-solid-900.woff +0 -0
  215. data/app/assets/javascripts/trestle/admin.js +0 -3
  216. data/app/assets/javascripts/trestle/i18n.js.erb +0 -8
  217. data/app/assets/stylesheets/trestle/admin.css +0 -2
  218. data/app/assets/stylesheets/trestle/icons/_font-awesome.css.erb +0 -40
  219. data/app/controllers/concerns/trestle/controller/dialog.rb +0 -16
  220. data/app/views/trestle/application/_dialog.html.erb +0 -34
  221. data/frontend/css/components/_color-vars.scss +0 -10
  222. data/frontend/css/components/_custom-forms.scss +0 -35
  223. data/frontend/css/components/_magnific-popup.scss +0 -36
  224. data/frontend/css/components/_turbolinks.scss +0 -3
  225. data/frontend/css/layout/_content.scss +0 -169
  226. data/frontend/js/components/confirmation.js +0 -32
  227. data/frontend/js/components/datepicker.js +0 -69
  228. data/frontend/js/components/dialog.js +0 -149
  229. data/frontend/js/components/file.js +0 -7
  230. data/frontend/js/components/form.js +0 -100
  231. data/frontend/js/components/gallery.js +0 -33
  232. data/frontend/js/components/pagination.js +0 -51
  233. data/frontend/js/components/select.js +0 -18
  234. data/frontend/js/components/sidebar.js +0 -75
  235. data/frontend/js/components/table.js +0 -61
  236. data/frontend/js/components/tabs.js +0 -59
  237. data/frontend/js/components/tooltips.js +0 -25
  238. data/frontend/js/core/contexts.js +0 -17
  239. data/frontend/js/core/turbolinks.js +0 -3
  240. data/frontend/js/core/visit.js +0 -16
  241. data/frontend/theme/trestle/_theme.scss +0 -4
  242. data/frontend/theme/trestle/_variables.scss +0 -4
  243. data/frontend/theme/trestle/theme/_defaults.scss +0 -152
  244. data/frontend/theme/trestle/theme/_functions.scss +0 -44
  245. data/frontend/theme/trestle/theme/_variables.scss +0 -15
  246. data/frontend/theme/trestle/theme/bootstrap/_alert.scss +0 -19
  247. data/frontend/theme/trestle/theme/bootstrap/_badge.scss +0 -25
  248. data/frontend/theme/trestle/theme/bootstrap/_buttons.scss +0 -93
  249. data/frontend/theme/trestle/theme/bootstrap/_color-vars.scss +0 -11
  250. data/frontend/theme/trestle/theme/bootstrap/_custom-forms.scss +0 -93
  251. data/frontend/theme/trestle/theme/bootstrap/_dropdown.scss +0 -6
  252. data/frontend/theme/trestle/theme/bootstrap/_forms.scss +0 -6
  253. data/frontend/theme/trestle/theme/bootstrap/_links.scss +0 -7
  254. data/frontend/theme/trestle/theme/bootstrap/_list-group.scss +0 -31
  255. data/frontend/theme/trestle/theme/bootstrap/_nav.scss +0 -6
  256. data/frontend/theme/trestle/theme/bootstrap/_pagination.scss +0 -18
  257. data/frontend/theme/trestle/theme/bootstrap/_progress.scss +0 -3
  258. data/frontend/theme/trestle/theme/bootstrap/_tables.scss +0 -41
  259. data/frontend/theme/trestle/theme/bootstrap/_utilities.scss +0 -3
  260. data/frontend/theme/trestle/theme/bootstrap/utilities/_background.scss +0 -17
  261. data/frontend/theme/trestle/theme/bootstrap/utilities/_borders.scss +0 -5
  262. data/frontend/theme/trestle/theme/bootstrap/utilities/_text.scss +0 -18
  263. data/frontend/theme/trestle/theme/trestle/_background.scss +0 -61
  264. data/frontend/theme/trestle/theme/trestle/_datepicker.scss +0 -58
  265. data/frontend/theme/trestle/theme/trestle/_headers.scss +0 -4
  266. data/frontend/theme/trestle/theme/trestle/_navbar.scss +0 -15
  267. data/frontend/theme/trestle/theme/trestle/_navigation.scss +0 -5
  268. data/frontend/theme/trestle/theme/trestle/_select2.scss +0 -22
  269. data/frontend/theme/trestle/theme/trestle/_tags.scss +0 -12
  270. data/frontend/theme/trestle/theme/trestle/_turbolinks.scss +0 -3
  271. data/frontend/theme/trestle/theme.scss +0 -29
  272. data/lib/generators/trestle/install/templates/_theme.scss +0 -13
  273. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ar-dz.js +0 -0
  274. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ar.js +0 -0
  275. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/at.js +0 -0
  276. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/az.js +0 -0
  277. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/be.js +0 -0
  278. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bg.js +0 -0
  279. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bn.js +0 -0
  280. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/bs.js +0 -0
  281. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cat.js +0 -0
  282. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ckb.js +0 -0
  283. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cs.js +0 -0
  284. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/cy.js +0 -0
  285. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/da.js +0 -0
  286. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/de.js +0 -0
  287. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/default.js +0 -0
  288. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/eo.js +0 -0
  289. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/es.js +0 -0
  290. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/et.js +0 -0
  291. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fa.js +0 -0
  292. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fi.js +0 -0
  293. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fo.js +0 -0
  294. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/fr.js +0 -0
  295. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ga.js +0 -0
  296. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/gr.js +0 -0
  297. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/he.js +0 -0
  298. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hi.js +0 -0
  299. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hr.js +0 -0
  300. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hu.js +0 -0
  301. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/hy.js +0 -0
  302. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/id.js +0 -0
  303. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/is.js +0 -0
  304. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/it.js +0 -0
  305. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ja.js +0 -0
  306. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ka.js +0 -0
  307. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/km.js +0 -0
  308. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ko.js +0 -0
  309. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/kz.js +0 -0
  310. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/lt.js +0 -0
  311. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/lv.js +0 -0
  312. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/mk.js +0 -0
  313. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/mn.js +0 -0
  314. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ms.js +0 -0
  315. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/my.js +0 -0
  316. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/nl.js +0 -0
  317. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/nn.js +0 -0
  318. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/no.js +0 -0
  319. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pa.js +0 -0
  320. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pl.js +0 -0
  321. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/pt.js +0 -0
  322. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ro.js +0 -0
  323. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/ru.js +0 -0
  324. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/si.js +0 -0
  325. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sk.js +0 -0
  326. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sl.js +0 -0
  327. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sq.js +0 -0
  328. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sr-cyr.js +0 -0
  329. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sr.js +0 -0
  330. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/sv.js +0 -0
  331. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/th.js +0 -0
  332. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/tr.js +0 -0
  333. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uk.js +0 -0
  334. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uz.js +0 -0
  335. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/uz_latn.js +0 -0
  336. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/vn.js +0 -0
  337. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/zh-tw.js +0 -0
  338. /data/app/assets/bundle/trestle/{flatpickr → locale/flatpickr}/zh.js +0 -0
  339. /data/app/assets/{stylesheets → sprockets}/trestle/_custom.css +0 -0
@@ -0,0 +1,107 @@
1
+ .main-content-area {
2
+ --content-area-margin: 1.25rem;
3
+ --content-area-padding: 1.25rem;
4
+
5
+ --content-area-sidebar-width: #{$content-sidebar-width};
6
+ --content-area-sidebar-bg: #{$content-sidebar-bg};
7
+
8
+ --content-area-header-padding: 0.625rem 1.125rem;
9
+ --content-area-header-bg: #{$main-content-header-bg};
10
+ --content-area-header-border: #{$main-content-header-border};
11
+
12
+ --content-area-footer-padding: 0.625rem 1.125rem;
13
+ --content-area-footer-bg: #{$main-content-footer-bg};
14
+ --content-area-footer-border: #{$main-content-footer-border};
15
+
16
+ margin: var(--content-area-margin);
17
+ scroll-margin: var(--content-area-margin);
18
+ }
19
+
20
+ .main-content-container {
21
+ background: white;
22
+ display: flex;
23
+ }
24
+
25
+ .main-content,
26
+ .main-content-sidebar {
27
+ padding: var(--content-area-padding);
28
+ }
29
+
30
+ .main-content {
31
+ // Allow nesting of tab panes directly within
32
+ @extend .tab-content;
33
+
34
+ flex: 1;
35
+ min-width: 0;
36
+ }
37
+
38
+ .main-content-header,
39
+ .main-content-footer {
40
+ display: flex;
41
+ justify-content: space-between;
42
+ }
43
+
44
+ .main-content-header {
45
+ margin: calc(var(--content-area-padding) * -1) calc(var(--content-area-padding) * -1) var(--content-area-padding) !important;
46
+ padding: var(--content-area-header-padding);
47
+ background: var(--content-area-header-bg);
48
+ border-bottom: var(--content-area-header-border)
49
+ }
50
+
51
+ .main-content-footer {
52
+ margin: var(--content-area-padding) calc(var(--content-area-padding) * -1) calc(var(--content-area-padding) * -1) !important;
53
+ padding: var(--content-area-footer-padding);
54
+ background: var(--content-area-footer-bg);
55
+ border-top: var(--content-area-footer-border);
56
+ }
57
+
58
+ .main-content,
59
+ .main-content-sidebar,
60
+ .tab-pane {
61
+ > *:first-child {
62
+ margin-top: 0;
63
+ }
64
+
65
+ > *:last-child {
66
+ margin-bottom: 0;
67
+ }
68
+ }
69
+
70
+ .main-content-sidebar {
71
+ background: var(--content-area-sidebar-bg);
72
+ flex: 0 0 var(--content-area-sidebar-width);
73
+ max-width: var(--content-area-sidebar-width);
74
+ }
75
+
76
+ .utilities {
77
+ display: flex;
78
+ justify-content: flex-start;
79
+ margin-bottom: 0.75rem;
80
+ }
81
+
82
+ @include media-breakpoint-down(lg) {
83
+ .main-content-container {
84
+ flex-direction: column;
85
+ }
86
+
87
+ .main-content-sidebar {
88
+ flex-basis: 0;
89
+ max-width: none;
90
+ }
91
+ }
92
+
93
+ @include media-breakpoint-down(md) {
94
+ .main-content-area {
95
+ --content-area-margin: 0.625rem;
96
+ --content-area-padding: 0.875rem;
97
+
98
+ --content-area-header-padding: 0.625rem 0.875rem;
99
+ --content-area-footer-padding: 0.625rem 0.875rem;
100
+ }
101
+
102
+ .main-content-header,
103
+ .main-content-footer {
104
+ flex-direction: column;
105
+ align-items: center;
106
+ }
107
+ }
@@ -1,24 +1,28 @@
1
1
  .app-nav {
2
2
  flex: 1;
3
- padding: 10px 0;
3
+ padding: 0.625rem 0;
4
4
 
5
5
  &, a {
6
6
  color: $sidebar-link-color;
7
7
  }
8
8
 
9
9
  ul {
10
- margin: 10px 0;
10
+ margin: 0.625rem 0;
11
11
  padding: 0;
12
12
  list-style: none;
13
13
  }
14
14
 
15
- a {
16
- display: block;
15
+ .nav-item a {
16
+ display: flex;
17
+ align-items: center;
18
+ gap: 0.625rem;
17
19
 
18
20
  font-weight: normal;
19
- font-size: 0.9rem;
21
+ font-size: 0.8125rem;
20
22
 
21
- padding: 12px 18px;
23
+ padding: 0.75rem 1rem;
24
+
25
+ position: relative;
22
26
 
23
27
  &:hover, &:focus {
24
28
  color: $sidebar-link-color;
@@ -31,12 +35,31 @@
31
35
  }
32
36
  }
33
37
 
38
+ .nav-item.active a {
39
+ border-left: $sidebar-active-border solid var(--primary);
40
+ padding-left: calc(1rem - #{$sidebar-active-border});
41
+
42
+ background: $sidebar-active-bg;
43
+ color: white;
44
+ }
45
+
34
46
  .nav-icon {
35
- display: inline-block;
36
- text-align: center;
37
- width: 18px;
38
- margin-right: 8px;
39
- vertical-align: 0;
47
+ flex-shrink: 0;
48
+
49
+ display: inline-flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+
53
+ width: 1.25rem;
54
+ }
55
+
56
+ .nav-label {
57
+ white-space: nowrap;
58
+ overflow: hidden;
59
+ text-overflow: ellipsis;
60
+
61
+ opacity: 1;
62
+ transition: opacity var(--sidebar-transition-duration) var(--sidebar-transition-timing);
40
63
  }
41
64
 
42
65
  .nav-header a {
@@ -47,39 +70,38 @@
47
70
  font-weight: bold;
48
71
  line-height: 1;
49
72
 
50
- font-size: 11px;
51
- padding: 8px 20px;
73
+ font-size: 0.6875rem;
74
+ padding: 0.5rem 1.125rem;
52
75
 
53
- &::after {
54
- @include icon-fa($fa-var-caret-down);
76
+ display: flex;
77
+ justify-content: space-between;
78
+ align-items: center;
79
+
80
+ white-space: nowrap;
55
81
 
56
- float: right;
57
- margin-top: 2px;
82
+ span {
83
+ opacity: 1;
84
+ transition: opacity var(--sidebar-transition-duration) var(--sidebar-transition-timing);
85
+ }
58
86
 
87
+ &::after {
88
+ @include icon-fa($fa-var-caret-down);
59
89
  opacity: 0.75;
60
90
  }
61
91
 
62
- &:hover, &:focus {
92
+ &:hover,
93
+ &:focus {
63
94
  background: none;
64
95
 
65
- &::before, &::after {
66
- opacity: 1 !important;
96
+ &::before,
97
+ &::after {
98
+ opacity: 1;
67
99
  }
68
100
  }
69
101
  }
70
102
 
71
- .active a {
72
- border-left: $sidebar-active-border solid theme-color("primary");
73
- padding-left: 18px - $sidebar-active-border;
74
-
75
- background: $sidebar-active-bg;
76
- color: white;
77
- }
78
-
79
103
  .badge {
80
- float: right;
81
- position: relative;
82
- top: 1px;
104
+ margin-left: auto;
83
105
  }
84
106
 
85
107
  .collapsed {
@@ -98,17 +120,17 @@
98
120
  }
99
121
 
100
122
  @mixin collapsed-nav-header {
101
- height: 0;
102
- padding: 13px 15px 14px;
103
- text-indent: -99999px;
123
+ span {
124
+ opacity: 0;
125
+ }
104
126
 
105
127
  &::after {
106
128
  display: none;
107
129
 
108
130
  position: absolute;
109
- top: 4px;
131
+ top: 50%;
110
132
  left: 50%;
111
- margin-left: -3px;
133
+ translate: -50% -5px;
112
134
 
113
135
  text-indent: 0;
114
136
  }
@@ -117,24 +139,42 @@
117
139
  content: "";
118
140
 
119
141
  position: absolute;
120
- left: 15px;
121
- right: 15px;
122
142
  top: 50%;
123
- margin-top: -4px;
143
+ left: 1rem;
144
+ right: 1rem;
145
+ margin-top: -2px;
124
146
 
125
147
  border-bottom: 1px solid $sidebar-active-bg;
126
148
  opacity: 0.75;
127
149
  }
128
150
  }
129
151
 
130
- @include media-breakpoint-between(md, lg) {
152
+ @mixin collapsed-nav-label {
153
+ opacity: 0;
154
+ }
155
+
156
+ @mixin collapsed-nav-badge {
157
+ text-indent: -99999px;
158
+ position: absolute;
159
+ width: 0.5rem;
160
+ height: 0.5rem;
161
+ padding: 0;
162
+ top: 0.625rem;
163
+ left: 2rem;
164
+ }
165
+
166
+ @include media-breakpoint-between(md, xl) {
131
167
  .nav-tooltip {
132
168
  display: block !important;
133
169
  }
134
170
 
135
171
  .app-nav {
136
- .nav-label, .badge {
137
- display: none;
172
+ .nav-label {
173
+ @include collapsed-nav-label;
174
+ }
175
+
176
+ .badge {
177
+ @include collapsed-nav-badge;
138
178
  }
139
179
 
140
180
  .nav-header a {
@@ -151,9 +191,9 @@
151
191
  .sidebar-expanded {
152
192
  .app-nav {
153
193
  .nav-header a {
154
- height: auto;
155
- padding: 8px 20px;
156
- text-indent: 0;
194
+ span {
195
+ opacity: 1;
196
+ }
157
197
 
158
198
  &::before {
159
199
  display: none;
@@ -162,12 +202,21 @@
162
202
  &::after {
163
203
  display: block;
164
204
  position: static;
165
- margin-left: 0;
205
+ translate: 0;
166
206
  }
167
207
  }
168
208
 
169
- .nav-label { display: inline; }
170
- .badge { display: block; }
209
+ .nav-label {
210
+ opacity: 1;
211
+ }
212
+
213
+ .badge {
214
+ position: static;
215
+ width: auto;
216
+ height: auto;
217
+ text-indent: 0;
218
+ padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
219
+ }
171
220
  }
172
221
 
173
222
  .nav-tooltip {
@@ -179,8 +228,12 @@
179
228
  @include media-breakpoint-up(xl) {
180
229
  .sidebar-collapsed {
181
230
  .app-nav {
182
- .nav-label, .badge {
183
- display: none;
231
+ .nav-label {
232
+ @include collapsed-nav-label;
233
+ }
234
+
235
+ .badge {
236
+ @include collapsed-nav-badge;
184
237
  }
185
238
 
186
239
  .nav-header a {
@@ -199,3 +252,12 @@
199
252
  }
200
253
  }
201
254
  }
255
+
256
+ @media (prefers-reduced-motion) {
257
+ .app-nav {
258
+ .nav-label,
259
+ .nav-header a span {
260
+ transition: none;
261
+ }
262
+ }
263
+ }
@@ -1,13 +1,32 @@
1
+ @use "sass:math";
2
+
3
+ .app-wrapper {
4
+ --sidebar-width: #{$sidebar-width};
5
+ --sidebar-width-collapsed: #{$sidebar-width-collapsed};
6
+ --sidebar-padding: #{$sidebar-padding};
7
+ --sidebar-padding-collapsed: #{$sidebar-padding-collapsed};
8
+ --sidebar-transition-duration: #{$sidebar-transition-duration};
9
+ --sidebar-transition-timing: ease-out;
10
+ --sidebar-bg: #{$sidebar-bg};
11
+ }
12
+
1
13
  .app-sidebar {
2
- background: $sidebar-bg;
14
+ background: var(--sidebar-bg);
15
+
16
+ width: var(--sidebar-width);
17
+ padding: 0;
3
18
 
4
- width: $sidebar-width;
5
19
  flex-shrink: 0;
6
20
 
7
21
  position: relative;
8
22
 
9
23
  display: flex;
10
24
  flex-direction: column;
25
+ flex-wrap: nowrap;
26
+
27
+ align-items: stretch;
28
+
29
+ transition: width var(--sidebar-transition-duration) var(--sidebar-transition-timing);
11
30
  }
12
31
 
13
32
  .app-sidebar-header {
@@ -18,37 +37,43 @@
18
37
  display: flex;
19
38
  align-items: stretch;
20
39
 
40
+ overflow: hidden;
41
+
21
42
  .navbar-toggler {
43
+ --#{$prefix}navbar-toggler-bg: #{$sidebar-mobile-toggle-bg};
44
+ --#{$prefix}navbar-toggler-color: #{$sidebar-mobile-toggle-border-color};
45
+ --#{$prefix}navbar-toggler-border-color: #{$sidebar-mobile-toggle-border-color};
46
+
22
47
  outline: none;
23
48
 
24
49
  align-self: center;
25
50
 
26
- margin-left: $grid-gutter-width / 2;
27
- margin-right: $grid-gutter-width / 2;
51
+ margin-left: math.div($grid-gutter-width, 2);
52
+ margin-right: math.div($grid-gutter-width, 2);
28
53
 
29
- background: $sidebar-mobile-toggle-bg;
30
- border: $sidebar-mobile-toggle-border;
54
+ background: var(--#{$prefix}navbar-toggler-bg);
31
55
 
32
56
  &:hover, &:focus {
33
- background: $sidebar-mobile-toggle-active-bg;
34
- border: $sidebar-mobile-toggle-active-border;
57
+ --#{$prefix}navbar-toggler-border-color: #{$sidebar-mobile-toggle-active-border-color};
58
+ --#{$prefix}navbar-toggler-bg: #{$sidebar-mobile-toggle-active-bg};
35
59
  }
36
60
  }
37
61
 
38
62
  .navbar-toggler-icon {
39
- background-image: $sidebar-mobile-toggle-icon-bg;
63
+ --#{$prefix}navbar-toggler-icon-bg: #{$sidebar-mobile-toggle-icon-bg};
40
64
  }
41
65
  }
42
66
 
43
67
  .app-sidebar-title {
44
- flex: 1;
68
+ flex: 1 0 var(--sidebar-width);
69
+ width: var(--sidebar-width);
45
70
 
46
71
  display: flex;
47
72
  align-items: center;
48
73
 
49
- padding: 10px 15px;
74
+ padding: var(--sidebar-padding);
50
75
 
51
- font-size: 1.4rem;
76
+ font-size: 1.25rem;
52
77
  font-weight: 500;
53
78
  text-shadow: rgba(black, 0.5) 0 1px 1px;
54
79
  color: white;
@@ -62,7 +87,7 @@
62
87
  max-height: 100%;
63
88
 
64
89
  & + .title-large {
65
- margin-left: 10px;
90
+ margin-left: 0.75rem;
66
91
  }
67
92
  }
68
93
 
@@ -102,8 +127,9 @@
102
127
  color: $sidebar-toggle-color;
103
128
  border: none;
104
129
 
105
- font-size: 1.4rem;
106
- padding: 10px 20px;
130
+ font-size: 1.25rem;
131
+ width: var(--sidebar-width-collapsed);
132
+ padding: 0.625rem;
107
133
 
108
134
  cursor: pointer;
109
135
 
@@ -122,25 +148,19 @@
122
148
  }
123
149
  }
124
150
 
125
- @include media-breakpoint-down(sm) {
151
+ @include media-breakpoint-down(md) {
126
152
  html, body {
127
153
  overflow-x: hidden;
128
154
  }
129
155
 
130
156
  .app-wrapper {
131
- margin-left: -$sidebar-width;
132
- margin-right: 0;
157
+ width: calc(100% + var(--sidebar-width));
133
158
 
134
- &.animate {
135
- transition: all $sidebar-transition-duration ease-out;
136
- transition-property: margin-left, margin-right;
137
- }
138
- }
159
+ translate: calc(var(--sidebar-width) * -1);
160
+ transition: translate var(--sidebar-transition-duration) ease-out;
139
161
 
140
- .mobile-nav-expanded {
141
- .app-wrapper {
142
- margin-left: 0;
143
- margin-right: -$sidebar-width;
162
+ .mobile-nav-expanded & {
163
+ translate: 0;
144
164
  }
145
165
  }
146
166
 
@@ -151,14 +171,14 @@
151
171
  .app-sidebar-header {
152
172
  position: absolute;
153
173
  top: 0;
154
- left: $sidebar-width;
174
+ left: var(--sidebar-width);
155
175
  right: 0;
156
176
  z-index: 1;
157
177
  }
158
178
 
159
179
  .app-sidebar-title {
160
180
  justify-content: center;
161
- padding: 10px 5px;
181
+ padding: var(--sidebar-padding-collapsed);
162
182
 
163
183
  // Match right margin with navbar toggler width:
164
184
  // (margin + border + font-size * icon-width + padding)
@@ -170,16 +190,19 @@
170
190
  }
171
191
  }
172
192
 
173
- @include media-breakpoint-between(md, lg) {
193
+ @include media-breakpoint-between(md, xl) {
174
194
  .app-sidebar {
175
- width: $sidebar-width-collapsed;
195
+ width: var(--sidebar-width-collapsed);
176
196
 
177
197
  .app-sidebar-header {
178
198
  text-align: center;
179
199
  }
180
200
 
181
201
  .app-sidebar-title {
182
- padding: 10px 5px;
202
+ width: var(--sidebar-width-collapsed);
203
+ flex-basis: var(--sidebar-width-collapsed);
204
+
205
+ padding: var(--sidebar-padding-collapsed);
183
206
  justify-content: center;
184
207
 
185
208
  img {
@@ -200,14 +223,17 @@
200
223
  }
201
224
 
202
225
  .sidebar-expanded & {
203
- width: $sidebar-width;
226
+ width: var(--sidebar-width);
204
227
 
205
228
  .app-sidebar-header {
206
229
  text-align: left;
207
230
  }
208
231
 
209
232
  .app-sidebar-title {
210
- padding: 10px 15px;
233
+ width: var(--sidebar-width);
234
+ flex-basis: var(--sidebar-width);
235
+
236
+ padding: var(--sidebar-padding);
211
237
  justify-content: flex-start;
212
238
 
213
239
  img {
@@ -233,14 +259,17 @@
233
259
  @include media-breakpoint-up(xl) {
234
260
  .app-sidebar {
235
261
  .sidebar-collapsed & {
236
- width: $sidebar-width-collapsed;
262
+ width: var(--sidebar-width-collapsed);
237
263
 
238
264
  .app-sidebar-header {
239
265
  text-align: center;
240
266
  }
241
267
 
242
268
  .app-sidebar-title {
243
- padding: 10px 5px;
269
+ width: var(--sidebar-width-collapsed);
270
+ flex-basis: var(--sidebar-width-collapsed);
271
+
272
+ padding: var(--sidebar-padding-collapsed);
244
273
  justify-content: center;
245
274
 
246
275
  img {
@@ -262,3 +291,10 @@
262
291
  }
263
292
  }
264
293
  }
294
+
295
+ @media (prefers-reduced-motion) {
296
+ .app-sidebar,
297
+ .app-wrapper {
298
+ transition: none;
299
+ }
300
+ }
@@ -3,6 +3,7 @@
3
3
  // Mixins & functions
4
4
  @import "bootstrap/scss/functions";
5
5
  @import "bootstrap/scss/mixins";
6
+ @import "trestle/frontend/css/core/functions";
6
7
  @import "trestle/frontend/css/core/mixins";
7
8
 
8
9
  // Variables
@@ -11,4 +12,5 @@
11
12
  @import "bootstrap/scss/variables";
12
13
 
13
14
  // Icon variables
15
+ @import "@fortawesome/fontawesome-free/scss/functions";
14
16
  @import "@fortawesome/fontawesome-free/scss/variables";
@@ -3,6 +3,7 @@
3
3
  // Mixins & functions
4
4
  @import "~bootstrap/scss/functions";
5
5
  @import "~bootstrap/scss/mixins";
6
+ @import "../core/functions";
6
7
  @import "../core/mixins";
7
8
 
8
9
  // Variables
@@ -11,4 +12,5 @@
11
12
  @import "~bootstrap/scss/variables";
12
13
 
13
14
  // Icon variables
15
+ @import "~@fortawesome/fontawesome-free/scss/functions";
14
16
  @import "~@fortawesome/fontawesome-free/scss/variables";