katalyst-koi 4.18.0 → 5.0.0.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/koi/icons/add.svg +3 -0
  3. data/app/assets/images/koi/icons/close.svg +1 -0
  4. data/app/assets/images/koi/koi.png +0 -0
  5. data/app/assets/javascripts/koi/controllers/file_field_controller.js +2 -2
  6. data/app/assets/javascripts/koi/controllers/index.js +0 -3
  7. data/app/assets/javascripts/koi/controllers/koi/modal_controller.js +40 -0
  8. data/app/assets/javascripts/koi/controllers/navigation_controller.js +14 -21
  9. data/app/assets/javascripts/koi/controllers/webauthn_registration_controller.js +4 -1
  10. data/app/assets/stylesheets/koi/blocks/actions.css +8 -0
  11. data/app/assets/stylesheets/koi/blocks/application-header.css +15 -0
  12. data/app/assets/stylesheets/koi/blocks/application-navigation.css +54 -0
  13. data/app/assets/stylesheets/koi/blocks/button.css +90 -0
  14. data/app/assets/stylesheets/koi/blocks/flash.css +19 -0
  15. data/app/assets/stylesheets/koi/blocks/icon.css +15 -0
  16. data/app/assets/stylesheets/koi/blocks/index.css +13 -0
  17. data/app/assets/stylesheets/koi/blocks/modal.css +26 -0
  18. data/app/assets/stylesheets/koi/blocks/navigation.css +23 -0
  19. data/app/assets/stylesheets/koi/blocks/page-header.css +31 -0
  20. data/app/assets/stylesheets/koi/blocks/pagy.css +82 -0
  21. data/app/assets/stylesheets/koi/blocks/prose.css +37 -0
  22. data/app/assets/stylesheets/koi/blocks/tables/index.css +4 -0
  23. data/app/assets/stylesheets/koi/{components/_query.scss → blocks/tables/query.css} +13 -13
  24. data/app/assets/stylesheets/koi/{base/_tables.scss → blocks/tables/table.css} +11 -59
  25. data/app/assets/stylesheets/koi/compositions/cover.css +17 -0
  26. data/app/assets/stylesheets/koi/{base/_flow.scss → compositions/flow.css} +1 -1
  27. data/app/assets/stylesheets/koi/compositions/index.css +4 -0
  28. data/app/assets/stylesheets/koi/compositions/wrapper.css +11 -0
  29. data/app/assets/stylesheets/koi/forms/caption.css +22 -0
  30. data/app/assets/stylesheets/koi/forms/checkboxes.css +153 -0
  31. data/app/assets/stylesheets/koi/forms/date-input.css +12 -0
  32. data/app/assets/stylesheets/koi/{components/_document-field.scss → forms/document-field.css} +20 -15
  33. data/app/assets/stylesheets/koi/forms/errors.css +38 -0
  34. data/app/assets/stylesheets/koi/forms/fieldset.css +73 -0
  35. data/app/assets/stylesheets/koi/forms/file-upload.css +20 -0
  36. data/app/assets/stylesheets/koi/forms/form-group.css +19 -0
  37. data/app/assets/stylesheets/koi/forms/hint.css +11 -0
  38. data/app/assets/stylesheets/koi/forms/image-field.css +96 -0
  39. data/app/assets/stylesheets/koi/forms/index.css +44 -0
  40. data/app/assets/stylesheets/koi/forms/input.css +194 -0
  41. data/app/assets/stylesheets/koi/forms/label.css +43 -0
  42. data/app/assets/stylesheets/koi/forms/password.css +18 -0
  43. data/app/assets/stylesheets/koi/forms/radios.css +162 -0
  44. data/app/assets/stylesheets/koi/forms/select.css +18 -0
  45. data/app/assets/stylesheets/koi/forms/textarea.css +3 -0
  46. data/app/assets/stylesheets/koi/forms/trix.css +33 -0
  47. data/app/assets/stylesheets/koi/global/fonts.css +22 -0
  48. data/app/assets/stylesheets/koi/global/global-styles.css +297 -0
  49. data/app/assets/stylesheets/koi/global/reset.css +98 -0
  50. data/app/assets/stylesheets/koi/global/variables.css +97 -0
  51. data/app/assets/stylesheets/koi/icons.css +14 -0
  52. data/app/assets/stylesheets/koi/{admin.scss → index.css} +16 -7
  53. data/app/assets/stylesheets/koi/login.css +26 -0
  54. data/app/assets/stylesheets/koi/themes/_index.scss +0 -1
  55. data/app/assets/stylesheets/koi/utilities/index.css +1 -0
  56. data/app/assets/stylesheets/koi/utilities/visually-hidden.css +18 -0
  57. data/app/components/concerns/koi/tables/cells.rb +3 -3
  58. data/app/components/koi/header/edit_component.rb +1 -1
  59. data/app/components/koi/header/index_component.rb +1 -1
  60. data/app/components/koi/header/new_component.rb +1 -1
  61. data/app/components/koi/header/show_component.rb +1 -1
  62. data/app/components/koi/header_component.html.erb +12 -11
  63. data/app/components/koi/header_component.rb +4 -2
  64. data/app/components/koi/table_component.rb +8 -0
  65. data/app/controllers/admin/admin_users_controller.rb +24 -18
  66. data/app/controllers/admin/application_controller.rb +1 -3
  67. data/app/controllers/admin/credentials_controller.rb +18 -14
  68. data/app/controllers/admin/otps_controller.rb +15 -13
  69. data/app/controllers/admin/sessions_controller.rb +12 -1
  70. data/app/controllers/admin/url_rewrites_controller.rb +19 -17
  71. data/app/controllers/admin/well_knowns_controller.rb +20 -18
  72. data/app/controllers/concerns/koi/controller.rb +37 -0
  73. data/app/helpers/koi/form_helper.rb +18 -0
  74. data/app/helpers/koi/header_helper.rb +122 -0
  75. data/app/helpers/koi/index_actions_helper.rb +3 -2
  76. data/app/helpers/koi/modal_helper.rb +71 -0
  77. data/app/models/admin/user.rb +7 -1
  78. data/app/models/url_rewrite.rb +1 -9
  79. data/app/views/admin/admin_users/_form.html+self.erb +8 -0
  80. data/app/views/admin/admin_users/_form.html.erb +8 -0
  81. data/app/views/admin/admin_users/archived.html.erb +7 -4
  82. data/app/views/admin/admin_users/edit.html+self.erb +12 -0
  83. data/app/views/admin/admin_users/edit.html.erb +13 -8
  84. data/app/views/admin/admin_users/index.html.erb +10 -5
  85. data/app/views/admin/admin_users/new.html.erb +8 -8
  86. data/app/views/admin/admin_users/show.html+self.erb +26 -14
  87. data/app/views/admin/admin_users/show.html.erb +22 -20
  88. data/app/views/admin/credentials/_credentials.html+self.erb +8 -6
  89. data/app/views/admin/credentials/_credentials.html.erb +3 -1
  90. data/app/views/admin/credentials/create.turbo_stream.erb +4 -3
  91. data/app/views/admin/credentials/destroy.turbo_stream.erb +4 -2
  92. data/app/views/admin/credentials/new.html.erb +42 -36
  93. data/app/views/admin/dashboards/show.html.erb +13 -1
  94. data/app/views/admin/otps/_form.html.erb +7 -7
  95. data/app/views/admin/otps/create.turbo_stream.erb +3 -3
  96. data/app/views/admin/otps/new.html.erb +5 -3
  97. data/app/views/admin/sessions/new.html.erb +2 -3
  98. data/app/views/admin/sessions/otp.html.erb +1 -3
  99. data/app/views/admin/sessions/password.html.erb +1 -3
  100. data/app/views/admin/tokens/show.html.erb +4 -6
  101. data/app/views/admin/url_rewrites/_form.html.erb +9 -0
  102. data/app/views/admin/url_rewrites/edit.html.erb +13 -9
  103. data/app/views/admin/url_rewrites/index.html.erb +10 -7
  104. data/app/views/admin/url_rewrites/new.html.erb +8 -8
  105. data/app/views/admin/url_rewrites/show.html.erb +17 -12
  106. data/app/views/admin/well_knowns/_form.html.erb +9 -0
  107. data/app/views/admin/well_knowns/edit.html.erb +13 -9
  108. data/app/views/admin/well_knowns/index.html.erb +8 -5
  109. data/app/views/admin/well_knowns/new.html.erb +8 -8
  110. data/app/views/admin/well_knowns/show.html.erb +14 -13
  111. data/app/views/katalyst/content/asides/_aside.html+form.erb +6 -4
  112. data/app/views/katalyst/content/columns/_column.html+form.erb +5 -3
  113. data/app/views/katalyst/content/contents/_content.html+form.erb +8 -6
  114. data/app/views/katalyst/content/figures/_figure.html+form.erb +8 -5
  115. data/app/views/katalyst/content/groups/_group.html+form.erb +5 -3
  116. data/app/views/katalyst/content/items/_item.html+form.erb +5 -3
  117. data/app/views/katalyst/content/sections/_section.html+form.erb +5 -3
  118. data/app/views/katalyst/content/tables/_table.html+form.erb +16 -11
  119. data/app/views/katalyst/navigation/items/_button.html.erb +6 -12
  120. data/app/views/katalyst/navigation/items/_heading.html.erb +3 -10
  121. data/app/views/katalyst/navigation/items/_link.html.erb +6 -11
  122. data/app/views/katalyst/navigation/menus/edit.html.erb +10 -6
  123. data/app/views/katalyst/navigation/menus/index.html.erb +4 -2
  124. data/app/views/katalyst/navigation/menus/new.html.erb +5 -3
  125. data/app/views/katalyst/navigation/menus/show.html.erb +8 -7
  126. data/app/views/layouts/koi/_application_header.html.erb +20 -0
  127. data/app/views/layouts/koi/_application_navigation.html.erb +34 -0
  128. data/app/views/layouts/koi/_flash.html.erb +6 -3
  129. data/app/views/layouts/koi/_navigation_header.html.erb +0 -2
  130. data/app/views/layouts/koi/application.html.erb +22 -27
  131. data/app/views/layouts/koi/frame.html.erb +1 -3
  132. data/app/views/layouts/koi/login.html.erb +12 -5
  133. data/config/locales/koi.en.yml +9 -1
  134. data/config/routes.rb +1 -1
  135. data/lib/generators/koi/admin/admin_generator.rb +3 -12
  136. data/lib/generators/koi/admin_controller/admin_controller_generator.rb +6 -16
  137. data/lib/generators/koi/admin_controller/templates/controller.rb.tt +82 -18
  138. data/lib/generators/koi/admin_controller/templates/controller_spec.rb.tt +113 -47
  139. data/lib/generators/koi/admin_route/admin_route_generator.rb +60 -6
  140. data/lib/generators/koi/admin_views/USAGE +18 -7
  141. data/lib/generators/koi/admin_views/admin_views_generator.rb +19 -11
  142. data/lib/generators/koi/admin_views/templates/_form.html.erb.tt +8 -0
  143. data/lib/generators/koi/admin_views/templates/archived.html.erb.tt +33 -0
  144. data/lib/generators/koi/admin_views/templates/edit.html.erb.tt +17 -9
  145. data/lib/generators/koi/admin_views/templates/index.html.erb.tt +31 -3
  146. data/lib/generators/koi/admin_views/templates/new.html.erb.tt +8 -8
  147. data/lib/generators/koi/admin_views/templates/show.html.erb.tt +15 -18
  148. data/lib/generators/koi/helpers/attribute_helpers.rb +147 -0
  149. data/lib/generators/koi/helpers/attribute_types.rb +218 -0
  150. data/lib/generators/koi/helpers/resource_helpers.rb +121 -0
  151. data/lib/generators/koi/{active_record/active_record_generator.rb → model/model_generator.rb} +1 -1
  152. data/lib/koi/config.rb +3 -1
  153. data/lib/koi/engine.rb +0 -9
  154. data/lib/koi/form/builder.rb +4 -4
  155. data/lib/koi/form/content.rb +55 -0
  156. data/lib/koi/form/elements/document.rb +1 -1
  157. data/lib/koi/form/elements/image.rb +1 -1
  158. data/lib/koi/form_builder.rb +1 -0
  159. data/lib/koi/menu.rb +14 -1
  160. data/spec/factories/admins.rb +1 -1
  161. metadata +92 -101
  162. data/app/assets/builds/koi/admin.css +0 -1
  163. data/app/assets/stylesheets/koi/base/_button.scss +0 -122
  164. data/app/assets/stylesheets/koi/base/_icon.scss +0 -29
  165. data/app/assets/stylesheets/koi/base/_index.scss +0 -21
  166. data/app/assets/stylesheets/koi/base/_input.scss +0 -19
  167. data/app/assets/stylesheets/koi/base/_link.scss +0 -26
  168. data/app/assets/stylesheets/koi/base/_list.scss +0 -11
  169. data/app/assets/stylesheets/koi/base/_typography.scss +0 -160
  170. data/app/assets/stylesheets/koi/components/_actions-group.scss +0 -7
  171. data/app/assets/stylesheets/koi/components/_image-field.scss +0 -95
  172. data/app/assets/stylesheets/koi/components/_index.scss +0 -9
  173. data/app/assets/stylesheets/koi/components/_pagy.scss +0 -29
  174. data/app/assets/stylesheets/koi/components/_summary-list.scss +0 -40
  175. data/app/assets/stylesheets/koi/layouts/_banner.scss +0 -7
  176. data/app/assets/stylesheets/koi/layouts/_content.scss +0 -40
  177. data/app/assets/stylesheets/koi/layouts/_flash.scss +0 -41
  178. data/app/assets/stylesheets/koi/layouts/_header.scss +0 -61
  179. data/app/assets/stylesheets/koi/layouts/_index.scss +0 -48
  180. data/app/assets/stylesheets/koi/layouts/_main.scss +0 -23
  181. data/app/assets/stylesheets/koi/layouts/_navigation.scss +0 -180
  182. data/app/assets/stylesheets/koi/layouts/_stack.scss +0 -13
  183. data/app/assets/stylesheets/koi/pages/_index.scss +0 -1
  184. data/app/assets/stylesheets/koi/pages/_login.scss +0 -46
  185. data/app/assets/stylesheets/koi/themes/_govuk.scss +0 -56
  186. data/app/assets/stylesheets/koi/themes/_kpop.scss +0 -5
  187. data/app/assets/stylesheets/koi/utils/_breakpoints.scss +0 -13
  188. data/app/assets/stylesheets/koi/utils/_hide.scss +0 -11
  189. data/app/assets/stylesheets/koi/utils/_index.scss +0 -2
  190. data/app/assets/stylesheets/koi/utils/_typography.scss +0 -42
  191. data/app/components/koi/content/editor/item_form_component.html.erb +0 -11
  192. data/app/components/koi/content/editor/item_form_component.rb +0 -94
  193. data/app/components/koi/summary_list/attachment_component.rb +0 -47
  194. data/app/components/koi/summary_list/base.rb +0 -59
  195. data/app/components/koi/summary_list/boolean_component.rb +0 -15
  196. data/app/components/koi/summary_list/date_component.rb +0 -17
  197. data/app/components/koi/summary_list/datetime_component.rb +0 -17
  198. data/app/components/koi/summary_list/item_component.rb +0 -26
  199. data/app/components/koi/summary_list/number_component.rb +0 -21
  200. data/app/components/koi/summary_list/rich_text_component.rb +0 -8
  201. data/app/components/koi/summary_list/text_component.rb +0 -8
  202. data/app/components/koi/summary_list_component.html.erb +0 -5
  203. data/app/components/koi/summary_list_component.rb +0 -75
  204. data/app/controllers/concerns/koi/controller/is_admin_controller.rb +0 -66
  205. data/app/helpers/koi/application_helper.rb +0 -7
  206. data/app/helpers/koi/date_helper.rb +0 -26
  207. data/app/helpers/koi/definition_list_helper.rb +0 -10
  208. data/app/views/admin/admin_users/_fields.html+self.erb +0 -3
  209. data/app/views/admin/admin_users/_fields.html.erb +0 -3
  210. data/app/views/admin/url_rewrites/_fields.html.erb +0 -4
  211. data/app/views/admin/well_knowns/_fields.html.erb +0 -6
  212. data/app/views/layouts/koi/_environment.html.erb +0 -4
  213. data/app/views/layouts/koi/_header.html.erb +0 -11
  214. data/app/views/layouts/koi/_navigation.html.erb +0 -23
  215. data/app/views/layouts/koi/_navigation_collapse.html.erb +0 -3
  216. data/lib/generators/koi/admin_views/templates/_fields.html.erb.tt +0 -3
  217. data/lib/generators/koi/helpers/admin_generator_attributes.rb +0 -66
  218. data/lib/koi/extensions/dartsass.rb +0 -23
  219. /data/app/assets/stylesheets/koi/{components/_clipboard.scss → blocks/clipboard.css} +0 -0
  220. /data/app/assets/stylesheets/koi/{components/_index-actions.scss → blocks/index-actions.css} +0 -0
  221. /data/app/assets/stylesheets/koi/{components/_toolbar.scss → blocks/toolbar.css} +0 -0
  222. /data/app/assets/stylesheets/koi/{base/_repel.scss → compositions/repel.css} +0 -0
@@ -1,26 +0,0 @@
1
- a[href]:not([class]) {
2
- color: var(--site-link);
3
- text-decoration: none;
4
-
5
- &:hover,
6
- &:focus {
7
- color: var(--site-link);
8
- text-decoration: underline;
9
- outline: none;
10
- }
11
-
12
- &.no-hover-link {
13
- text-decoration: none;
14
-
15
- &:hover,
16
- &:focus {
17
- text-decoration: none;
18
- }
19
- }
20
-
21
- &[disabled] {
22
- color: var(--site-disabled);
23
- pointer-events: none;
24
- opacity: 0.45;
25
- }
26
- }
@@ -1,11 +0,0 @@
1
- ol,
2
- ul {
3
- margin: 0;
4
- padding-left: 3ch;
5
- }
6
-
7
- ul.no-bullet {
8
- padding-left: 0;
9
- list-style-type: none;
10
- max-width: none;
11
- }
@@ -1,160 +0,0 @@
1
- $font-sizes: (
2
- h1: 3.3125rem,
3
- h2: 2rem,
4
- h3: 1.5rem,
5
- h4: 1.125rem,
6
- h5: 1.125rem,
7
- h6: 1rem,
8
- paragraph: 1rem,
9
- small: 0.875rem,
10
- ) !default;
11
-
12
- $line-heights: (
13
- h1: 1.03em,
14
- h2: 1.09em,
15
- h3: 1.04em,
16
- h4: 1.11em,
17
- h5: 1.11em,
18
- // used for labels
19
- h6: 1.5em,
20
- paragraph: 1.14em,
21
- small: 1.25em,
22
- ) !default;
23
-
24
- @use "../utils/breakpoints";
25
- @use "../utils/typography" as * with (
26
- $-font-sizes: $font-sizes,
27
- $-line-heights: $line-heights
28
- );
29
-
30
- :root {
31
- font-family: "Inter", sans-serif;
32
- font-size: 100%; // defaults to 16px
33
- color: var(--site-text-color);
34
-
35
- /* Text-size styles */
36
- /* base size: paragraph (16px) */
37
- --heading--h1: #{font-size(h1)};
38
- --heading--h2: #{font-size(h2)};
39
- --heading--h3: #{font-size(h3)};
40
- --heading--h4: #{font-size(h4)};
41
- --heading--h5: #{font-size(h5)};
42
- --heading--h6: #{font-size(h6)};
43
- --paragraph: #{font-size(paragraph)};
44
- --paragraph--strong: #{font-size(paragraph)};
45
- --paragraph--em: #{font-size(paragraph)};
46
- --paragraph--small: #{font-size(small)};
47
- --text-width: 70ch;
48
- }
49
-
50
- @supports (font-variation-settings: normal) {
51
- :root {
52
- font-family: "Inter var", sans-serif;
53
- }
54
- }
55
-
56
- h1,
57
- .heading-one {
58
- font-size: var(--heading--h1);
59
- font-weight: 400;
60
- line-height: line-height(h1);
61
- margin-bottom: 0.25em;
62
- letter-spacing: -0.015em;
63
- color: var(--site-text-color);
64
- }
65
-
66
- h2,
67
- .heading-two {
68
- font-size: var(--heading--h2);
69
- font-weight: 400;
70
- line-height: line-height(h2);
71
- margin-bottom: 0.25em;
72
- letter-spacing: -0.015em;
73
- color: var(--site-text-color);
74
- }
75
-
76
- h3,
77
- .heading-three {
78
- font-size: var(--heading--h3);
79
- font-weight: 400;
80
- line-height: line-height(h3);
81
- margin: 0 0 0.25em;
82
- letter-spacing: -0.015em;
83
- color: var(--site-text-color);
84
- }
85
-
86
- h4,
87
- .heading-four {
88
- font-size: var(--heading--h4);
89
- font-weight: 400;
90
- line-height: line-height(h4);
91
- margin: 0 0 0.25em;
92
- letter-spacing: -0.015em;
93
- color: var(--site-text-color);
94
- }
95
-
96
- h5,
97
- .heading-five {
98
- font-size: var(--heading--h5);
99
- font-weight: 400;
100
- line-height: line-height(h5);
101
- margin: 0 0 0.25em;
102
- letter-spacing: -0.015em;
103
- color: var(--site-text-color);
104
- }
105
-
106
- h6,
107
- .heading-six {
108
- font-size: var(--heading--h6);
109
- font-weight: 400; // Bold
110
- line-height: line-height(h6);
111
- margin: 0 0 0.25em;
112
- letter-spacing: -0.015em;
113
- color: var(--site-text-color);
114
- }
115
-
116
- label {
117
- font-size: var(--heading-h6);
118
- font-weight: 500; // Bold
119
- line-height: line-height(h6);
120
- margin-bottom: 0.125rem;
121
- letter-spacing: 0.01em;
122
- color: var(--site-text-color);
123
- }
124
-
125
- p,
126
- .body-one {
127
- font-size: var(--paragraph);
128
- line-height: line-height(paragraph);
129
- letter-spacing: 0.01em;
130
- color: var(--site-text-color);
131
- }
132
-
133
- small,
134
- em {
135
- font-size: var(--paragraph--em);
136
- line-height: line-height(paragraph);
137
- letter-spacing: 0.01em;
138
- font-weight: 300;
139
- color: var(--site-text-color);
140
- }
141
-
142
- strong {
143
- font-size: var(--paragraph--strong);
144
- font-weight: 600;
145
- letter-spacing: 0.01em;
146
- color: var(--site-text-color);
147
- }
148
-
149
- h1,
150
- h2,
151
- h3,
152
- h4,
153
- p,
154
- small,
155
- legend,
156
- label,
157
- input,
158
- textarea {
159
- max-width: var(--text-width);
160
- }
@@ -1,7 +0,0 @@
1
- .actions-group,
2
- .actions {
3
- display: flex;
4
- align-items: stretch;
5
- flex-direction: row;
6
- column-gap: 0.5rem;
7
- }
@@ -1,95 +0,0 @@
1
- .govuk-image-field {
2
- display: grid;
3
- grid-template-areas:
4
- "label preview"
5
- "hint preview"
6
- "error preview"
7
- "file preview"
8
- "supplemental supplemental";
9
- grid-template-columns: 1fr auto;
10
- grid-template-rows: auto auto auto 1fr auto;
11
- gap: 0 1rem;
12
- max-width: var(--text-width);
13
-
14
- label {
15
- grid-area: label;
16
- }
17
-
18
- .govuk-hint {
19
- grid-area: hint;
20
- }
21
-
22
- .govuk-error-message {
23
- grid-area: error;
24
- }
25
-
26
- input {
27
- grid-area: file;
28
- align-self: start;
29
- }
30
-
31
- .govuk-file-upload {
32
- margin-left: 0;
33
- padding: 3px;
34
- }
35
-
36
- .preview-image {
37
- grid-area: preview;
38
- position: relative;
39
- display: grid;
40
- overflow: visible;
41
- align-self: start;
42
- align-items: center;
43
- justify-items: center;
44
- background-color: #f4f4f4;
45
- border: 2px solid black;
46
-
47
- min-width: calc(8rem + 4px);
48
- min-height: calc(8rem + 4px);
49
-
50
- .image-thumbnail {
51
- max-width: 8rem;
52
- max-height: 8rem;
53
- }
54
-
55
- .file-destroy {
56
- appearance: none;
57
- position: absolute;
58
- background-color: rgba(0, 0, 0, 0.6);
59
- color: white;
60
- border-radius: 1rem;
61
- border: none;
62
- display: block;
63
- padding: 0;
64
- bottom: -10px;
65
- right: 50%;
66
- margin-right: -10px;
67
-
68
- &::after {
69
- content: "×";
70
- display: block;
71
- position: relative;
72
- width: 21px;
73
- line-height: 21px;
74
- font-size: 21px;
75
- top: -1px;
76
- }
77
- }
78
- }
79
-
80
- > div:last-child {
81
- grid-area: supplemental;
82
- }
83
-
84
- .govuk-form-group {
85
- margin-top: 30px;
86
- }
87
-
88
- .preview-image.hidden {
89
- display: block !important;
90
-
91
- .file-destroy {
92
- display: none;
93
- }
94
- }
95
- }
@@ -1,9 +0,0 @@
1
- @use "actions-group";
2
- @use "clipboard";
3
- @use "document-field";
4
- @use "image-field";
5
- @use "index-actions";
6
- @use "pagy";
7
- @use "query";
8
- @use "summary-list";
9
- @use "toolbar";
@@ -1,29 +0,0 @@
1
- @use "../base/button" as *;
2
-
3
- .pagy.nav a {
4
- @include button-text;
5
- border: 2px solid transparent;
6
-
7
- &[aria-disabled] {
8
- pointer-events: none;
9
- color: var(--site-disabled);
10
- font-weight: 500;
11
- }
12
-
13
- &[aria-current] {
14
- @include button-outline;
15
- pointer-events: none;
16
- }
17
-
18
- &[href]:hover {
19
- text-decoration: none;
20
- }
21
-
22
- &:first-child {
23
- padding-left: 0;
24
- }
25
-
26
- &:last-child {
27
- padding-right: 0;
28
- }
29
- }
@@ -1,40 +0,0 @@
1
- $grey: #f0ecf3 !default;
2
-
3
- $table-header-color: transparent !default;
4
- $row-border-color: $grey !default;
5
- $row-height: 48px !default;
6
-
7
- .summary-list {
8
- --row-height: #{$row-height};
9
- --table-header-color: #{$table-header-color};
10
- --row-border-color: #{$row-border-color};
11
- }
12
-
13
- .summary-list {
14
- display: grid;
15
- margin: 1rem 0;
16
- border-bottom: 1px solid var(--row-border-color);
17
- grid-template-columns: 1fr 3fr;
18
- grid-auto-flow: row;
19
- grid-auto-rows: auto;
20
-
21
- dt,
22
- dd {
23
- display: flex;
24
- align-items: center;
25
- border-top: 1px solid var(--row-border-color);
26
- padding: 0.5rem 1rem;
27
- min-height: var(--row-height);
28
- line-height: 1.5rem;
29
- }
30
-
31
- dt {
32
- font-weight: bold;
33
- padding-left: 0;
34
- grid-column-start: 1;
35
- }
36
-
37
- dd {
38
- grid-column-start: 2;
39
- }
40
- }
@@ -1,7 +0,0 @@
1
- %banner {
2
- line-height: 2rem;
3
- text-align: center;
4
- color: #eee;
5
- background: #555;
6
- box-shadow: inset 0 -1px 4px #333;
7
- }
@@ -1,40 +0,0 @@
1
- @use "header";
2
- @use "flash";
3
-
4
- $inset: 1rem !default;
5
- $space: 1rem !default;
6
-
7
- %content {
8
- margin: $space $inset;
9
- display: grid;
10
- grid-template-columns: minmax(auto, 72rem);
11
- grid-template-areas: "main";
12
- grid-gap: $space;
13
- max-width: 72rem;
14
-
15
- > [role="main"] {
16
- grid-area: main;
17
- }
18
-
19
- &.has-sidebar {
20
- grid-template-columns: minmax(auto, 2fr) minmax(auto, 1fr);
21
- grid-template-areas: "main sidebar";
22
- max-width: (72rem + 36rem);
23
-
24
- > [role="main"] {
25
- grid-column: 1/2;
26
- }
27
- }
28
-
29
- .page--sidebar {
30
- grid-area: sidebar;
31
- > * {
32
- position: sticky;
33
- top: $space;
34
- }
35
- }
36
-
37
- #flash {
38
- @include flash.flash;
39
- }
40
- }
@@ -1,41 +0,0 @@
1
- @mixin flash {
2
- padding: 0;
3
-
4
- li {
5
- display: flex;
6
- justify-content: space-between;
7
- min-height: 3rem;
8
- line-height: 3rem;
9
- padding: 0 1.5rem;
10
- list-style: none;
11
- grid-area: status;
12
- font-weight: bold;
13
- border: 1px solid var(--flash-color);
14
- color: var(--flash-color);
15
- }
16
-
17
- button {
18
- display: inline;
19
- background: white;
20
- border: none;
21
- color: var(--flash-color);
22
- cursor: pointer;
23
- }
24
-
25
- .alert {
26
- --flash-color: var(--site-alert);
27
- }
28
-
29
- .notice {
30
- --flash-color: var(--site-notice);
31
- }
32
-
33
- .success {
34
- --flash-color: var(--site-success);
35
- }
36
-
37
- .warning,
38
- .error {
39
- --flash-color: var(--site-warning);
40
- }
41
- }
@@ -1,61 +0,0 @@
1
- $inset: 2rem !default;
2
-
3
- $title: 4rem;
4
- $breadcrumbs: 3rem;
5
- $actions: 3rem;
6
- $height: $title + $breadcrumbs + $actions;
7
-
8
- @mixin list($separator, $margin: 1em, $padding: 0.5em) {
9
- display: flex;
10
- align-items: center;
11
- list-style-position: outside;
12
- margin-inline: $inset;
13
-
14
- > * {
15
- display: list-item;
16
- margin-inline-start: $margin;
17
- padding-inline-start: $padding;
18
- }
19
-
20
- > *::marker {
21
- content: $separator;
22
- color: rgba(0, 0, 0, 0.4);
23
- }
24
-
25
- > *:first-child {
26
- display: block;
27
- margin-inline-start: 0;
28
- padding-inline-start: 0;
29
- }
30
- }
31
-
32
- %header {
33
- border-bottom: 1px solid #ececec;
34
- color: #b2b2b2;
35
- background: #ececec;
36
-
37
- display: grid;
38
- grid-template-areas: "breadcrumbs" "title" "actions";
39
- grid-template-rows: $breadcrumbs $title $actions;
40
-
41
- .heading {
42
- grid-area: title;
43
- margin: 0 $inset;
44
- white-space: nowrap;
45
- overflow: hidden;
46
- text-overflow: ellipsis;
47
- }
48
-
49
- .breadcrumbs {
50
- grid-area: breadcrumbs;
51
-
52
- @include list("›");
53
- }
54
-
55
- .actions {
56
- grid-area: actions;
57
- gap: 0;
58
-
59
- @include list("|", $margin: 0.8em);
60
- }
61
- }
@@ -1,48 +0,0 @@
1
- @use "navigation" as *;
2
- @use "main" as *;
3
- @use "banner" as *;
4
- @use "stack";
5
-
6
- html,
7
- body {
8
- width: 100%;
9
- height: 100%;
10
- }
11
-
12
- body {
13
- display: grid;
14
- grid-template-areas: "banner banner" "navigation main";
15
- grid-template-rows: auto 1fr;
16
- grid-template-columns: auto 3fr;
17
- }
18
-
19
- body > header {
20
- grid-area: banner;
21
- height: 2rem;
22
- overflow-y: auto;
23
- @extend %banner;
24
- }
25
-
26
- body > nav {
27
- grid-area: navigation;
28
- height: 100%;
29
- overflow-y: auto;
30
- width: 2rem;
31
- transition: width 0.25s;
32
- @extend %navigation;
33
-
34
- &[aria-expanded] {
35
- width: 17rem;
36
- }
37
- }
38
-
39
- .navigation-collapse {
40
- grid-area: navigation;
41
- }
42
-
43
- body > main {
44
- grid-area: main;
45
- height: 100%;
46
- overflow: clip auto;
47
- @extend %main;
48
- }
@@ -1,23 +0,0 @@
1
- @use "header" as * with (
2
- $inset: 2rem
3
- );
4
- @use "content" as * with (
5
- $inset: 2rem,
6
- $space: 2rem
7
- );
8
-
9
- %main {
10
- display: grid;
11
- grid-template-areas: "header" "content";
12
- grid-template-rows: auto 1fr;
13
-
14
- > header {
15
- grid-area: header;
16
- @extend %header;
17
- }
18
-
19
- > .page {
20
- grid-area: content;
21
- @extend %content;
22
- }
23
- }