katalyst-navigation 1.8.4 → 2.0.0

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -2
  3. data/app/assets/builds/katalyst/navigation.esm.js +207 -109
  4. data/app/assets/builds/katalyst/navigation.js +207 -109
  5. data/app/assets/builds/katalyst/navigation.min.js +1 -1
  6. data/app/assets/builds/katalyst/navigation.min.js.map +1 -1
  7. data/app/assets/images/katalyst/navigation/icons/button.svg +1 -0
  8. data/app/assets/images/katalyst/navigation/icons/collapse.svg +3 -0
  9. data/app/assets/images/katalyst/navigation/icons/edit.svg +1 -0
  10. data/app/assets/images/katalyst/navigation/icons/expand.svg +3 -0
  11. data/app/assets/images/katalyst/navigation/icons/heading.svg +1 -0
  12. data/app/assets/images/katalyst/navigation/icons/hidden.svg +1 -0
  13. data/app/assets/images/katalyst/navigation/icons/indent.svg +3 -0
  14. data/app/assets/images/katalyst/navigation/icons/link.svg +1 -0
  15. data/app/assets/images/katalyst/navigation/icons/outdent.svg +4 -0
  16. data/app/assets/images/katalyst/navigation/icons/remove.svg +1 -0
  17. data/app/assets/stylesheets/katalyst/_navigation.scss +3 -0
  18. data/app/assets/stylesheets/katalyst/navigation/editor.css +175 -0
  19. data/app/assets/stylesheets/katalyst/navigation/icons.css +54 -0
  20. data/app/assets/stylesheets/katalyst/navigation/{editor/_status-bar.scss → status-bar.css} +30 -34
  21. data/app/assets/stylesheets/katalyst/navigation.css +3 -0
  22. data/app/components/katalyst/navigation/editor/base_component.rb +0 -6
  23. data/app/components/katalyst/navigation/editor/item_component.html.erb +26 -16
  24. data/app/components/katalyst/navigation/editor/item_component.rb +2 -3
  25. data/app/components/katalyst/navigation/editor/item_editor_component.rb +16 -19
  26. data/app/components/katalyst/navigation/editor/new_item_component.html.erb +15 -14
  27. data/app/components/katalyst/navigation/editor/new_item_component.rb +7 -10
  28. data/app/components/katalyst/navigation/editor/new_items_component.html.erb +41 -2
  29. data/app/components/katalyst/navigation/editor/new_items_component.rb +0 -2
  30. data/app/components/katalyst/navigation/editor/row_component.html.erb +2 -1
  31. data/app/components/katalyst/navigation/editor/status_bar_component.rb +9 -11
  32. data/app/components/katalyst/navigation/editor/table_component.html.erb +0 -6
  33. data/app/components/katalyst/navigation/editor/table_component.rb +12 -14
  34. data/app/components/katalyst/navigation/editor_component.html.erb +7 -0
  35. data/app/components/katalyst/navigation/editor_component.rb +13 -16
  36. data/app/controllers/katalyst/navigation/items_controller.rb +1 -1
  37. data/app/controllers/katalyst/navigation/menus_controller.rb +1 -1
  38. data/app/javascript/navigation/application.js +8 -3
  39. data/app/javascript/navigation/editor/item.js +1 -1
  40. data/app/javascript/navigation/editor/item_editor_controller.js +54 -0
  41. data/app/javascript/navigation/editor/list_controller.js +11 -103
  42. data/app/javascript/navigation/editor/new_items_controller.js +145 -0
  43. data/app/views/katalyst/navigation/items/_button.html.erb +24 -28
  44. data/app/views/katalyst/navigation/items/_form.html.erb +6 -0
  45. data/app/views/katalyst/navigation/items/_form_errors.html.erb +1 -1
  46. data/app/views/katalyst/navigation/items/_heading.html.erb +12 -14
  47. data/app/views/katalyst/navigation/items/_link.html.erb +24 -26
  48. data/app/views/katalyst/navigation/items/edit.html.erb +40 -2
  49. data/app/views/katalyst/navigation/items/edit.turbo_stream.erb +2 -0
  50. data/app/views/katalyst/navigation/items/update.turbo_stream.erb +0 -1
  51. data/app/views/katalyst/navigation/menus/show.html.erb +0 -1
  52. data/lib/katalyst/navigation/engine.rb +0 -1
  53. metadata +21 -28
  54. data/app/assets/stylesheets/katalyst/navigation/editor/_icon.scss +0 -17
  55. data/app/assets/stylesheets/katalyst/navigation/editor/_index.scss +0 -145
  56. data/app/assets/stylesheets/katalyst/navigation/editor/_item-actions.scss +0 -93
  57. data/app/assets/stylesheets/katalyst/navigation/editor/_item-rules.scss +0 -19
  58. data/app/assets/stylesheets/katalyst/navigation/editor/_new-items.scss +0 -67
  59. data/app/javascript/navigation/editor/new_item_controller.js +0 -12
@@ -1,10 +1,6 @@
1
1
  import { Controller } from "@hotwired/stimulus";
2
2
 
3
3
  export default class ListController extends Controller {
4
- connect() {
5
- this.enterCount = 0;
6
- }
7
-
8
4
  /**
9
5
  * When the user starts a drag within the list, set the item's dataTransfer
10
6
  * properties to indicate that it's being dragged and update its style.
@@ -28,11 +24,6 @@ export default class ListController extends Controller {
28
24
  * When the user drags an item over another item in the last, swap the
29
25
  * dragging item with the item under the cursor.
30
26
  *
31
- * As a special case, if the item is dragged over placeholder space at the end
32
- * of the list, move the item to the bottom of the list instead. This allows
33
- * users to hit the list element more easily when adding new items to an empty
34
- * list.
35
- *
36
27
  * @param event {DragEvent}
37
28
  */
38
29
  dragover(event) {
@@ -46,53 +37,7 @@ export default class ListController extends Controller {
46
37
  }
47
38
 
48
39
  /**
49
- * When the user drags an item into the list, create a placeholder item to
50
- * represent the new item. Note that we can't access the drag data
51
- * until drop, so we assume that this is our template item for now.
52
- *
53
- * Users can cancel the drag by dragging the item out of the list or by
54
- * pressing escape. Both are handled by `cancelDrag`.
55
- *
56
- * @param event {DragEvent}
57
- */
58
- dragenter(event) {
59
- event.preventDefault();
60
-
61
- // Safari doesn't support relatedTarget, so we count enter/leave pairs
62
- this.enterCount++;
63
-
64
- if (copyAllowed(event) && !this.dragItem) {
65
- const item = document.createElement("li");
66
- item.dataset.dragging = "";
67
- item.dataset.newItem = "";
68
- this.element.appendChild(item);
69
- }
70
- }
71
-
72
- /**
73
- * When the user drags the item out of the list, remove the placeholder.
74
- * This allows users to cancel the drag by dragging the item out of the list.
75
- *
76
- * @param event {DragEvent}
77
- */
78
- dragleave(event) {
79
- // Safari doesn't support relatedTarget, so we count enter/leave pairs
80
- // https://bugs.webkit.org/show_bug.cgi?id=66547
81
- this.enterCount--;
82
-
83
- if (
84
- this.enterCount <= 0 &&
85
- this.dragItem.dataset.hasOwnProperty("newItem")
86
- ) {
87
- this.cancelDrag(event);
88
- }
89
- }
90
-
91
- /**
92
- * When the user drops an item into the list, end the drag and reindex the list.
93
- *
94
- * If the item is a new item, we replace the placeholder with the template
95
- * item data from the dataTransfer API.
40
+ * When the user drops an item, end the drag and reindex the list.
96
41
  *
97
42
  * @param event {DragEvent}
98
43
  */
@@ -105,18 +50,6 @@ export default class ListController extends Controller {
105
50
  delete item.dataset.dragging;
106
51
  swap(dropTarget(event.target), item);
107
52
 
108
- if (item.dataset.hasOwnProperty("newItem")) {
109
- const placeholder = item;
110
- const template = document.createElement("template");
111
- template.innerHTML = event.dataTransfer.getData("text/html");
112
- item = template.content.querySelector("li");
113
-
114
- this.element.replaceChild(item, placeholder);
115
- requestAnimationFrame(() =>
116
- item.querySelector("[role='button'][value='edit']").click(),
117
- );
118
- }
119
-
120
53
  this.dispatch("drop", {
121
54
  target: item,
122
55
  bubbles: true,
@@ -125,16 +58,13 @@ export default class ListController extends Controller {
125
58
  }
126
59
 
127
60
  /**
128
- * End an in-progress drag. If the item is a new item, remove it, otherwise
129
- * reset the item's style and restore its original position in the list.
61
+ * End an in-progress drag by resetting the item's style and restoring its
62
+ * original position in the list.
130
63
  */
131
64
  dragend() {
132
65
  const item = this.dragItem;
133
66
 
134
- if (!item) {
135
- } else if (item.dataset.hasOwnProperty("newItem")) {
136
- item.remove();
137
- } else {
67
+ if (item) {
138
68
  delete item.dataset.dragging;
139
69
  this.reset();
140
70
  }
@@ -158,7 +88,7 @@ export default class ListController extends Controller {
158
88
  }
159
89
 
160
90
  /**
161
- * Swaps two list items. If target is a list, the item is appended.
91
+ * Swaps two list items.
162
92
  *
163
93
  * @param target the target element to swap with
164
94
  * @param item the item the user is dragging
@@ -167,39 +97,17 @@ function swap(target, item) {
167
97
  if (!target) return;
168
98
  if (target === item) return;
169
99
 
170
- if (target.nodeName === "LI") {
171
- const positionComparison = target.compareDocumentPosition(item);
172
- if (positionComparison & Node.DOCUMENT_POSITION_FOLLOWING) {
173
- target.insertAdjacentElement("beforebegin", item);
174
- } else if (positionComparison & Node.DOCUMENT_POSITION_PRECEDING) {
175
- target.insertAdjacentElement("afterend", item);
176
- }
177
- }
178
-
179
- if (target.nodeName === "OL") {
180
- target.appendChild(item);
100
+ const positionComparison = target.compareDocumentPosition(item);
101
+ if (positionComparison & Node.DOCUMENT_POSITION_FOLLOWING) {
102
+ target.insertAdjacentElement("beforebegin", item);
103
+ } else if (positionComparison & Node.DOCUMENT_POSITION_PRECEDING) {
104
+ target.insertAdjacentElement("afterend", item);
181
105
  }
182
106
  }
183
107
 
184
- /**
185
- * Returns true if the event supports copy or copy move.
186
- *
187
- * Chrome and Firefox use copy, but Safari only supports copyMove.
188
- */
189
- function copyAllowed(event) {
190
- return (
191
- event.dataTransfer.effectAllowed === "copy" ||
192
- event.dataTransfer.effectAllowed === "copyMove"
193
- );
194
- }
195
-
196
108
  /**
197
109
  * Given an event target, return the closest drop target, if any.
198
110
  */
199
111
  function dropTarget(e) {
200
- return (
201
- e &&
202
- (e.closest("[data-controller='navigation--editor--list'] > *") ||
203
- e.closest("[data-controller='navigation--editor--list']"))
204
- );
112
+ return e && e.closest("[data-controller='navigation--editor--list'] > *");
205
113
  }
@@ -0,0 +1,145 @@
1
+ import { Controller } from "@hotwired/stimulus";
2
+
3
+ const EDGE_AREA = 24;
4
+
5
+ export default class NewItemsController extends Controller {
6
+ static targets = ["inline"];
7
+
8
+ connect() {
9
+ this.form.addEventListener("mousemove", this.move);
10
+ }
11
+
12
+ disconnect() {
13
+ this.form?.removeEventListener("mousemove", this.move);
14
+ delete this.currentItem;
15
+ }
16
+
17
+ open(e) {
18
+ e.preventDefault();
19
+ this.dialog.showModal();
20
+ }
21
+
22
+ close(e) {
23
+ e.preventDefault();
24
+ this.dialog.close();
25
+ }
26
+
27
+ noop(e) {}
28
+
29
+ /**
30
+ * Add the selected item to the DOM at the current position or the end of the list.
31
+ */
32
+ add(e) {
33
+ e.preventDefault();
34
+
35
+ const template = e.target.querySelector("template");
36
+ const item = template.content.querySelector("li").cloneNode(true);
37
+ const target = this.currentItem;
38
+
39
+ if (target) {
40
+ target.insertAdjacentElement("beforebegin", item);
41
+ } else {
42
+ this.list.insertAdjacentElement("beforeend", item);
43
+ }
44
+
45
+ this.toggleInline(false);
46
+ this.dialog.close();
47
+
48
+ requestAnimationFrame(() => {
49
+ item.querySelector(`[value="edit"]`).click();
50
+ });
51
+ }
52
+
53
+ morph(e) {
54
+ e.preventDefault();
55
+ this.dialog.close();
56
+ }
57
+
58
+ move = (e) => {
59
+ if (this.isOverInlineTarget(e)) return;
60
+ if (this.dialog.open) return;
61
+
62
+ const target = this.getCurrentItem(e);
63
+
64
+ // return if we're already showing this item
65
+ if (this.currentItem === target) return;
66
+
67
+ // hide the button if it's already visible
68
+ if (this.currentItem) this.toggleInline(false);
69
+
70
+ this.currentItem = target;
71
+
72
+ // clear any previously set timer
73
+ if (this.timer) clearTimeout(this.timer);
74
+
75
+ // show the button after a debounce pause
76
+ this.timer = setTimeout(() => {
77
+ delete this.timer;
78
+ this.toggleInline();
79
+ }, 100);
80
+ };
81
+
82
+ toggleInline(show = !!this.currentItem) {
83
+ if (show) {
84
+ this.inlineTarget.style.top = `${this.currentItem.offsetTop}px`;
85
+ this.inlineTarget.toggleAttribute("hidden", false);
86
+ } else {
87
+ this.inlineTarget.toggleAttribute("hidden", true);
88
+ }
89
+ }
90
+
91
+ get dialog() {
92
+ return this.element.querySelector("dialog");
93
+ }
94
+
95
+ /**
96
+ * @returns {HTMLFormElement}
97
+ */
98
+ get form() {
99
+ return this.element.closest("form");
100
+ }
101
+
102
+ /**
103
+ * @returns {HTMLUListElement,null}
104
+ */
105
+ get list() {
106
+ return this.form.querySelector(
107
+ `[data-controller="navigation--editor--list"]`,
108
+ );
109
+ }
110
+
111
+ /**
112
+ * @param {MouseEvent} e
113
+ * @returns {HTMLLIElement,null}
114
+ */
115
+ getCurrentItem(e) {
116
+ const item = document.elementFromPoint(e.clientX, e.clientY).closest("li");
117
+ if (!item) return null;
118
+
119
+ const bounds = item.getBoundingClientRect();
120
+
121
+ // check X for center(ish) mouse position
122
+ if (e.clientX < bounds.left + bounds.width / 2 - 2 * EDGE_AREA) return null;
123
+ if (e.clientX > bounds.left + bounds.width / 2 + 2 * EDGE_AREA) return null;
124
+
125
+ // check Y for hits on this item or it's next sibling
126
+ if (e.clientY - bounds.y <= EDGE_AREA) {
127
+ return item;
128
+ } else if (bounds.y + bounds.height - e.clientY <= EDGE_AREA) {
129
+ return item.nextElementSibling;
130
+ } else {
131
+ return null;
132
+ }
133
+ }
134
+
135
+ /**
136
+ * @param {MouseEvent} e
137
+ * @returns {Boolean} true when the target of the event is the floating button
138
+ */
139
+ isOverInlineTarget(e) {
140
+ return (
141
+ this.inlineTarget ===
142
+ document.elementFromPoint(e.clientX, e.clientY).closest("div")
143
+ );
144
+ }
145
+ }
@@ -1,34 +1,30 @@
1
- <%= form_with model: item, scope: :item, url: path do |form| %>
2
- <%= form.hidden_field :type %>
3
- <%= render "form_errors", form: %>
1
+ <%# locals: (form:) %>
4
2
 
5
- <div class="input">
6
- <%= form.label :title %>
7
- <%= form.text_field :title %>
8
- </div>
3
+ <%= render "form_errors", form: %>
9
4
 
10
- <div class="input">
11
- <%= form.label :url %>
12
- <%= form.text_field :url %>
13
- </div>
5
+ <div class="field">
6
+ <%= form.label :title %>
7
+ <%= form.text_field :title %>
8
+ </div>
14
9
 
15
- <div class="input">
16
- <%= form.label :http_method %>
17
- <%= form.select :http_method, Katalyst::Navigation::Button::HTTP_METHODS %>
18
- </div>
10
+ <div class="field">
11
+ <%= form.label :url %>
12
+ <%= form.text_field :url %>
13
+ </div>
19
14
 
20
- <div class="field">
21
- <%= form.label :target %>
22
- <%= form.select :target, Katalyst::Navigation::Button::TARGETS %>
23
- </div>
15
+ <div class="field">
16
+ <%= form.label :http_method %>
17
+ <%= form.select :http_method, Katalyst::Navigation::Button::HTTP_METHODS %>
18
+ </div>
24
19
 
25
- <div class="input">
26
- <%= form.check_box :visible %>
27
- <%= form.label :visible %>
28
- </div>
20
+ <div class="field">
21
+ <%= form.label :target %>
22
+ <%= form.select :target, Katalyst::Navigation::Button::TARGETS %>
23
+ </div>
29
24
 
30
- <div class="button-row">
31
- <%= form.submit "Done" %>
32
- <%= link_to "Discard", menu_path(item.menu), class: "button--text" %>
33
- </div>
34
- <% end %>
25
+ <div class="field">
26
+ <%= form.label(:visible) do %>
27
+ <%= form.check_box :visible %>
28
+ Visible
29
+ <% end %>
30
+ </div>
@@ -0,0 +1,6 @@
1
+ <%# locals: (model:, scope:, url:, id:) %>
2
+
3
+ <%= form_with(model:, scope:, url:, id:) do |form| %>
4
+ <%= form.hidden_field(:type) %>
5
+ <%= render(model.model_name.param_key, form:) %>
6
+ <% end %>
@@ -1,4 +1,4 @@
1
- <%= tag.ul class: "errors" do %>
1
+ <%= tag.ul(class: "errors", role: "list") do %>
2
2
  <% form.object.errors.full_messages.each do |error| %>
3
3
  <li class="error"><%= error %></li>
4
4
  <% end %>
@@ -1,17 +1,15 @@
1
- <%= form_with model: item, scope: :item, url: path do |form| %>
2
- <%= form.hidden_field :type %>
3
- <%= render "form_errors", form: %>
1
+ <%# locals: (form:) %>
4
2
 
5
- <div class="field">
6
- <%= form.label :title %>
7
- <%= form.text_field :title %>
8
- </div>
3
+ <%= render "form_errors", form: %>
9
4
 
10
- <div class="field">
11
- <%= form.label :visible %>
12
- <%= form.check_box :visible %>
13
- </div>
5
+ <div class="field">
6
+ <%= form.label :title %>
7
+ <%= form.text_field :title %>
8
+ </div>
14
9
 
15
- <%= form.submit "Done" %>
16
- <%= link_to "Discard", item.menu %>
17
- <% end %>
10
+ <div class="field">
11
+ <%= form.label(:visible) do %>
12
+ <%= form.check_box :visible %>
13
+ Visible
14
+ <% end %>
15
+ </div>
@@ -1,32 +1,30 @@
1
- <%= form_with model: item, scope: :item, url: path do |form| %>
2
- <%= form.hidden_field :type %>
3
- <%= render "form_errors", form: %>
1
+ <%# locals: (form:) %>
4
2
 
5
- <div class="field">
6
- <%= form.label :title %>
7
- <%= form.text_field :title %>
8
- </div>
3
+ <%= render "form_errors", form: %>
9
4
 
10
- <div class="field">
11
- <%= form.label :url %>
12
- <%= form.text_field :url %>
13
- </div>
5
+ <div class="field">
6
+ <%= form.label :title %>
7
+ <%= form.text_field :title %>
8
+ </div>
14
9
 
15
- <div class="input">
16
- <%= form.label :http_method %>
17
- <%= form.select :http_method, Katalyst::Navigation::Link::HTTP_METHODS %>
18
- </div>
10
+ <div class="field">
11
+ <%= form.label :url %>
12
+ <%= form.text_field :url %>
13
+ </div>
19
14
 
20
- <div class="field">
21
- <%= form.label :target %>
22
- <%= form.select :target, Katalyst::Navigation::Link::TARGETS %>
23
- </div>
15
+ <div class="input">
16
+ <%= form.label :http_method %>
17
+ <%= form.select :http_method, Katalyst::Navigation::Link::HTTP_METHODS %>
18
+ </div>
24
19
 
25
- <div class="field">
26
- <%= form.label :visible %>
27
- <%= form.check_box :visible %>
28
- </div>
20
+ <div class="field">
21
+ <%= form.label :target %>
22
+ <%= form.select :target, Katalyst::Navigation::Link::TARGETS %>
23
+ </div>
29
24
 
30
- <%= form.submit "Done" %>
31
- <%= link_to "Discard", item.menu %>
32
- <% end %>
25
+ <div class="field">
26
+ <%= form.label(:visible) do %>
27
+ <%= form.check_box :visible %>
28
+ Visible
29
+ <% end %>
30
+ </div>
@@ -1,3 +1,41 @@
1
- <%= render Kpop::ModalComponent.new(title: item_editor.title, layout: "side-panel") do %>
2
- <%= render item_editor %>
1
+ <%= turbo_frame_tag(
2
+ "navigation--editor--item-editor",
3
+ data: { controller: "navigation--editor--item-editor" },
4
+ ) do %>
5
+ <dialog class="modal"
6
+ data-navigation--editor--item-editor-target="dialog"
7
+ data-action="
8
+ click->navigation--editor--item-editor#dismiss
9
+ close->navigation--editor--item-editor#dismiss
10
+ "
11
+ data-item-id="<%= dom_id(item_editor.item) %>"
12
+ <%= "data-item-persisted" if item_editor.item.persisted? %>>
13
+ <article class="flow" data-action="click->navigation--editor--item-editor#noop:stop">
14
+ <header class="repel" data-nowrap>
15
+ <h2><%= item_editor.title %></h2>
16
+ <button form="<%= item_editor.id %>"
17
+ formmethod="dialog"
18
+ class="button"
19
+ data-button-padding="tight"
20
+ data-text-button>
21
+ <icon aria-hidden="true" class="icon" data-icon="close">&nbsp;</icon>
22
+ <span class="visually-hidden">Close</span>
23
+ </button>
24
+ </header>
25
+ <main>
26
+ <%= render item_editor %>
27
+ </main>
28
+ <footer class="actions" data-reverse>
29
+ <button form="<%= item_editor.id %>" class="button">
30
+ Done
31
+ </button>
32
+ <button form="<%= item_editor.id %>"
33
+ formmethod="dialog"
34
+ class="button"
35
+ data-ghost-button>
36
+ Discard
37
+ </button>
38
+ </footer>
39
+ </article>
40
+ </dialog>
3
41
  <% end %>
@@ -1,3 +1,5 @@
1
+ <%# locals: (item_editor:) %>
2
+
1
3
  <%= turbo_stream.replace item_editor.id do %>
2
4
  <%= render item_editor %>
3
5
  <% end %>
@@ -1,4 +1,3 @@
1
- <%= turbo_stream.kpop.dismiss %>
2
1
  <%= turbo_stream.replace dom_id(previous) do %>
3
2
  <%= render editor.item(item:) %>
4
3
  <% end %>
@@ -2,4 +2,3 @@
2
2
 
3
3
  <%= render editor.status_bar %>
4
4
  <%= render editor %>
5
- <%= render editor.new_items %>
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "katalyst/kpop"
4
3
  require "katalyst/tables"
5
4
  require "rails/engine"
6
5
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
10
+ date: 2025-03-14 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: katalyst-html-attributes
@@ -24,20 +23,6 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: katalyst-kpop
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
26
  - !ruby/object:Gem::Dependency
42
27
  name: katalyst-tables
43
28
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +51,6 @@ dependencies:
66
51
  - - ">="
67
52
  - !ruby/object:Gem::Version
68
53
  version: '0'
69
- description:
70
54
  email:
71
55
  - developers@katalyst.com.au
72
56
  executables: []
@@ -80,12 +64,21 @@ files:
80
64
  - app/assets/builds/katalyst/navigation.min.js
81
65
  - app/assets/builds/katalyst/navigation.min.js.map
82
66
  - app/assets/config/katalyst-navigation.js
83
- - app/assets/stylesheets/katalyst/navigation/editor/_icon.scss
84
- - app/assets/stylesheets/katalyst/navigation/editor/_index.scss
85
- - app/assets/stylesheets/katalyst/navigation/editor/_item-actions.scss
86
- - app/assets/stylesheets/katalyst/navigation/editor/_item-rules.scss
87
- - app/assets/stylesheets/katalyst/navigation/editor/_new-items.scss
88
- - app/assets/stylesheets/katalyst/navigation/editor/_status-bar.scss
67
+ - app/assets/images/katalyst/navigation/icons/button.svg
68
+ - app/assets/images/katalyst/navigation/icons/collapse.svg
69
+ - app/assets/images/katalyst/navigation/icons/edit.svg
70
+ - app/assets/images/katalyst/navigation/icons/expand.svg
71
+ - app/assets/images/katalyst/navigation/icons/heading.svg
72
+ - app/assets/images/katalyst/navigation/icons/hidden.svg
73
+ - app/assets/images/katalyst/navigation/icons/indent.svg
74
+ - app/assets/images/katalyst/navigation/icons/link.svg
75
+ - app/assets/images/katalyst/navigation/icons/outdent.svg
76
+ - app/assets/images/katalyst/navigation/icons/remove.svg
77
+ - app/assets/stylesheets/katalyst/_navigation.scss
78
+ - app/assets/stylesheets/katalyst/navigation.css
79
+ - app/assets/stylesheets/katalyst/navigation/editor.css
80
+ - app/assets/stylesheets/katalyst/navigation/icons.css
81
+ - app/assets/stylesheets/katalyst/navigation/status-bar.css
89
82
  - app/components/katalyst/navigation/editor/base_component.rb
90
83
  - app/components/katalyst/navigation/editor/errors_component.html.erb
91
84
  - app/components/katalyst/navigation/editor/errors_component.rb
@@ -111,10 +104,11 @@ files:
111
104
  - app/javascript/navigation/application.js
112
105
  - app/javascript/navigation/editor/item.js
113
106
  - app/javascript/navigation/editor/item_controller.js
107
+ - app/javascript/navigation/editor/item_editor_controller.js
114
108
  - app/javascript/navigation/editor/list_controller.js
115
109
  - app/javascript/navigation/editor/menu.js
116
110
  - app/javascript/navigation/editor/menu_controller.js
117
- - app/javascript/navigation/editor/new_item_controller.js
111
+ - app/javascript/navigation/editor/new_items_controller.js
118
112
  - app/javascript/navigation/editor/rules-engine.js
119
113
  - app/javascript/navigation/editor/status_bar_controller.js
120
114
  - app/models/concerns/katalyst/navigation/garbage_collection.rb
@@ -129,6 +123,7 @@ files:
129
123
  - app/models/katalyst/navigation/node.rb
130
124
  - app/models/katalyst/navigation/types/nodes_type.rb
131
125
  - app/views/katalyst/navigation/items/_button.html.erb
126
+ - app/views/katalyst/navigation/items/_form.html.erb
132
127
  - app/views/katalyst/navigation/items/_form_errors.html.erb
133
128
  - app/views/katalyst/navigation/items/_heading.html.erb
134
129
  - app/views/katalyst/navigation/items/_link.html.erb
@@ -156,7 +151,6 @@ licenses:
156
151
  - MIT
157
152
  metadata:
158
153
  rubygems_mfa_required: 'true'
159
- post_install_message:
160
154
  rdoc_options: []
161
155
  require_paths:
162
156
  - lib
@@ -171,8 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
165
  - !ruby/object:Gem::Version
172
166
  version: '0'
173
167
  requirements: []
174
- rubygems_version: 3.5.16
175
- signing_key:
168
+ rubygems_version: 3.6.2
176
169
  specification_version: 4
177
170
  summary: Navigation generator and editor
178
171
  test_files: []
@@ -1,17 +0,0 @@
1
- %icon-block {
2
- display: block;
3
- cursor: pointer;
4
- position: relative;
5
- padding: 0.65rem;
6
- min-width: 2.5rem;
7
- min-height: 2.5rem;
8
- }
9
-
10
- %icon {
11
- position: absolute;
12
- content: "";
13
- width: 1.2rem;
14
- height: 1.2rem;
15
- background-repeat: no-repeat;
16
- background-position: center;
17
- }