katalyst-koi 5.0.0.alpha.1 → 5.0.0.alpha.4
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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/koi/blocks/flash.css +4 -4
- data/app/assets/stylesheets/koi/blocks/tables/table.css +1 -1
- data/app/assets/stylesheets/koi/index.css +0 -19
- data/app/controllers/admin/sessions_controller.rb +1 -1
- data/app/controllers/concerns/koi/controller.rb +1 -0
- data/app/helpers/koi/modal_helper.rb +6 -5
- data/lib/generators/koi/admin/admin_generator.rb +0 -1
- data/lib/generators/koi/admin_views/templates/archived.html.erb.tt +3 -3
- data/lib/generators/koi/helpers/resource_helpers.rb +1 -1
- metadata +1 -5
- data/app/assets/stylesheets/koi/themes/_content.scss +0 -62
- data/app/assets/stylesheets/koi/themes/_index.scss +0 -4
- data/app/assets/stylesheets/koi/themes/_navigation.scss +0 -5
- data/app/assets/stylesheets/koi/themes/_trix.scss +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fcedc1a4ceaad07f40a65c739317ff349bf3eb7e758e5ed044ec2839c04e825
|
4
|
+
data.tar.gz: f3305d49058f1c1dcfb3b6481580bd5c32b1061442905c43eab21f7aa609566a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53676e2729ac91e2483d8cc71627de7e3eeb4bef19ff0542abb1acae2df07dc0ed1a67dc95ea7aa7d858b3abdc16b947b4e84326ef113ade0096ede7d67575dc
|
7
|
+
data.tar.gz: aafc8b03af7a5fb846d5a45ed2a49b47a32489359e7d9c469614580f3dbfd77899dedf7f8560399eb2f30a651f6faf1df1e1f6fb94cacae6a0ba38cfe21dbd19
|
@@ -3,17 +3,17 @@
|
|
3
3
|
}
|
4
4
|
|
5
5
|
.flash:is([data-flash-type="alert"]) {
|
6
|
-
--flash-color: var(--
|
6
|
+
--flash-color: var(--color-alert);
|
7
7
|
}
|
8
8
|
|
9
9
|
.flash:is([data-flash-type="notice"]) {
|
10
|
-
--flash-color: var(--
|
10
|
+
--flash-color: var(--color-notice);
|
11
11
|
}
|
12
12
|
|
13
13
|
.flash:is([data-flash-type="success"]) {
|
14
|
-
--flash-color: var(--
|
14
|
+
--flash-color: var(--color-success);
|
15
15
|
}
|
16
16
|
|
17
17
|
.flash:is([data-flash-type="warning"], [data-flash-type="error"]) {
|
18
|
-
--flash-color: var(--
|
18
|
+
--flash-color: var(--color-warning);
|
19
19
|
}
|
@@ -15,22 +15,3 @@
|
|
15
15
|
@import url("blocks/index.css");
|
16
16
|
|
17
17
|
@import url("icons.css");
|
18
|
-
|
19
|
-
:root {
|
20
|
-
/* Color styles */
|
21
|
-
--site-primary-light: #5a87c9;
|
22
|
-
--site-primary: #266dd3;
|
23
|
-
--site-primary-dark: #344055;
|
24
|
-
--site-on-primary: #ffffff;
|
25
|
-
--site-secondary-light: #5a87c9;
|
26
|
-
--site-secondary: #266dd3;
|
27
|
-
--site-secondary-dark: #344055;
|
28
|
-
--site-on-secondary: #ffffff;
|
29
|
-
--site-text-color: #000000;
|
30
|
-
--site-success: #129d7f;
|
31
|
-
--site-warning: #ffc759;
|
32
|
-
--site-alert: #ea3946;
|
33
|
-
--site-notice: rgb(37, 99, 235);
|
34
|
-
--site-disabled: #9ca3af;
|
35
|
-
--site-link: #266dd3;
|
36
|
-
}
|
@@ -6,7 +6,7 @@ module Admin
|
|
6
6
|
include Koi::Controller::RecordsAuthentication
|
7
7
|
|
8
8
|
before_action :redirect_authenticated, only: %i[new], if: :admin_signed_in?
|
9
|
-
before_action :authenticate_local_admin, only: %i[new], if: -> { Koi.config.authenticate_local_admins
|
9
|
+
before_action :authenticate_local_admin, only: %i[new], if: -> { Koi.config.authenticate_local_admins }
|
10
10
|
|
11
11
|
layout "koi/login"
|
12
12
|
|
@@ -18,11 +18,12 @@ module Koi
|
|
18
18
|
tag.header(class: "repel", data: "nowrap") do
|
19
19
|
concat(tag.h2(title))
|
20
20
|
concat(tag.button(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
class: "button",
|
22
|
+
data: {
|
23
|
+
action: "koi--modal#dismiss",
|
24
|
+
button_padding: "tight",
|
25
|
+
"text-button": "",
|
26
|
+
},
|
26
27
|
) do
|
27
28
|
tag.icon(" ".html_safe, aria: { hidden: true }, class: "icon", data: { icon: "close" }) +
|
28
29
|
tag.span("Close", class: "visually-hidden")
|
@@ -4,7 +4,6 @@ require "rails/generators/named_base"
|
|
4
4
|
|
5
5
|
module Koi
|
6
6
|
class AdminGenerator < Rails::Generators::NamedBase
|
7
|
-
|
8
7
|
class_option :force, type: :boolean, default: true
|
9
8
|
|
10
9
|
hook_for :admin_controller, in: :koi, as: :admin, type: :boolean, default: true do |instance, controller|
|
@@ -7,10 +7,10 @@
|
|
7
7
|
|
8
8
|
<h1>Archived <%= human_name.pluralize.titleize %></h1>
|
9
9
|
<%% end %>
|
10
|
+
<%- if query? -%>
|
10
11
|
|
11
|
-
<% if query? %>
|
12
12
|
<%%= table_query_with(collection:) %>
|
13
|
-
|
13
|
+
<%- end -%>
|
14
14
|
|
15
15
|
<%%= table_selection_with(collection:) do %>
|
16
16
|
<%%= tag.button("Restore", formaction: <%= restore_admin_helper %>, formmethod: :put, class: "button") %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<%- end -%>
|
28
28
|
<%% row.date :archived_at %>
|
29
29
|
<%% end %>
|
30
|
-
|
31
30
|
<%- if paginate? -%>
|
31
|
+
|
32
32
|
<%%= table_pagination_with(collection:) %>
|
33
33
|
<%- end -%>
|
@@ -111,7 +111,7 @@ module Koi
|
|
111
111
|
limit = [controller.size, model.size].min
|
112
112
|
|
113
113
|
(1..limit).reverse_each do |size|
|
114
|
-
return model.slice(0...size) if controller.slice(size - 1..-1) == model.slice(0...size)
|
114
|
+
return model.slice(0...size) if controller.slice((size - 1)..-1) == model.slice(0...size)
|
115
115
|
end
|
116
116
|
|
117
117
|
[]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-koi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.alpha.
|
4
|
+
version: 5.0.0.alpha.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
@@ -330,10 +330,6 @@ files:
|
|
330
330
|
- app/assets/stylesheets/koi/icons.css
|
331
331
|
- app/assets/stylesheets/koi/index.css
|
332
332
|
- app/assets/stylesheets/koi/login.css
|
333
|
-
- app/assets/stylesheets/koi/themes/_content.scss
|
334
|
-
- app/assets/stylesheets/koi/themes/_index.scss
|
335
|
-
- app/assets/stylesheets/koi/themes/_navigation.scss
|
336
|
-
- app/assets/stylesheets/koi/themes/_trix.scss
|
337
333
|
- app/assets/stylesheets/koi/utilities/index.css
|
338
334
|
- app/assets/stylesheets/koi/utilities/visually-hidden.css
|
339
335
|
- app/components/concerns/koi/tables/cells.rb
|
@@ -1,62 +0,0 @@
|
|
1
|
-
@use "katalyst/content/editor/variables" as variables;
|
2
|
-
@use "katalyst/content";
|
3
|
-
|
4
|
-
[data-controller="content--editor--container"] {
|
5
|
-
--heading--h4: 1rem;
|
6
|
-
}
|
7
|
-
|
8
|
-
[data-controller="content--editor--table"] {
|
9
|
-
.content--editor--table-editor {
|
10
|
-
// ensure the table editor is easy to target when empty
|
11
|
-
&:not(:has(table)) {
|
12
|
-
min-height: 4rem !important;
|
13
|
-
}
|
14
|
-
|
15
|
-
// tight wrap the table editor around the table and use table borders
|
16
|
-
&:has(table) {
|
17
|
-
border: none !important;
|
18
|
-
padding: 0 !important;
|
19
|
-
}
|
20
|
-
|
21
|
-
table {
|
22
|
-
width: 100%;
|
23
|
-
}
|
24
|
-
|
25
|
-
table,
|
26
|
-
th,
|
27
|
-
td {
|
28
|
-
border: 2px solid black;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
|
32
|
-
// restore webkit spinners, hidden by govuk
|
33
|
-
// these are not ideal, but spinners are much easier to work with for this
|
34
|
-
// use case than the default number input, because we submit the form on
|
35
|
-
// change to implement the live preview
|
36
|
-
input[type="number"]::-webkit-inner-spin-button {
|
37
|
-
position: relative;
|
38
|
-
right: -1px;
|
39
|
-
margin-top: -2px;
|
40
|
-
margin-bottom: -4px;
|
41
|
-
-webkit-appearance: inner-spin-button !important;
|
42
|
-
opacity: 1 !important;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
[data-enum="state"][data-value="published"] {
|
47
|
-
--tag-background-color: #{variables.$status-published-background-color};
|
48
|
-
--tag-color: #{variables.$status-published-color};
|
49
|
-
border: 1px solid variables.$status-published-border-color;
|
50
|
-
}
|
51
|
-
|
52
|
-
[data-enum="state"][data-value="draft"] {
|
53
|
-
--tag-background-color: #{variables.$status-draft-background-color};
|
54
|
-
--tag-color: #{variables.$status-draft-color};
|
55
|
-
border: 1px solid variables.$status-draft-border-color;
|
56
|
-
}
|
57
|
-
|
58
|
-
[data-enum="state"][data-value="unpublished"] {
|
59
|
-
--tag-background-color: #{variables.$status-draft-background-color};
|
60
|
-
--tag-color: #{variables.$status-draft-color};
|
61
|
-
border: 1px solid variables.$status-draft-border-color;
|
62
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
// navigation and content already load trix, ensure they are loaded first
|
2
|
-
@use "content";
|
3
|
-
@use "navigation";
|
4
|
-
|
5
|
-
// overrides for default trix styles to match our button styles
|
6
|
-
trix-toolbar {
|
7
|
-
.trix-button-group {
|
8
|
-
border: 1px solid var(--site-text-color);
|
9
|
-
border-radius: 0;
|
10
|
-
}
|
11
|
-
|
12
|
-
.trix-button {
|
13
|
-
color: var(--site-secondary);
|
14
|
-
border-bottom: none;
|
15
|
-
}
|
16
|
-
|
17
|
-
.trix-button:not(:first-child) {
|
18
|
-
border-left: 1px solid var(--site-text-color);
|
19
|
-
}
|
20
|
-
|
21
|
-
.trix-button.trix-active {
|
22
|
-
background-color: var(--site-secondary-light);
|
23
|
-
color: var(--site-on-secondary);
|
24
|
-
border-bottom: none;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
// set a maximim width for the text editor and toolbar to match other inputs
|
29
|
-
trix-toolbar,
|
30
|
-
trix-editor {
|
31
|
-
max-width: var(--text-width);
|
32
|
-
}
|