completion-kit 0.5.21 → 0.5.22

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e04e66d89aab0762a3d58532984bf73a8a18c47c7f29002c4138c0770f412fd9
4
- data.tar.gz: 221647dc0afd30c24644be27e1b909e901752478044b3270abc9fd717355d782
3
+ metadata.gz: 3849ee4680223b7e395bf66c8bf99c69fe58e297571d82c7d0e4785c6f20e9ff
4
+ data.tar.gz: 66a2b835cd71061fba1587d27d37b7729c996f4218514ad33e5046c265598703
5
5
  SHA512:
6
- metadata.gz: a974fe2b24af3ab7e12a354ab946ec1817f5740507c0c052266879dfa9a2a82d091f79034140e15585c60fd6c6a7c80ae1e86fe7bcd262da8b8ea686ea65f0a6
7
- data.tar.gz: cb1339bc6e3b4787a2fb3a6b82a789d46432938781d17745914cb8763590b7c339f9d666c6139ea9e4e8f4c44818de49727234af9fe7b1585379abdca3c308ec
6
+ metadata.gz: 527ec77e97348588f25383a84561a2659f47e9634c21ccb858ec298f12788cac44804616e28271831799bd8ed7be774511635f8579a8c096ecc581e9f1828457
7
+ data.tar.gz: 99b245e3401f1eb5bc196c8704660de5928c12a193b8c1b01732d17e7ec5082d07b568e1bdb467986c26cc3adcbaaaae4af01f1f3e5cf46698b12f4ca2840df7
@@ -118,6 +118,35 @@ form.button_to {
118
118
  padding: 0.75rem 0;
119
119
  }
120
120
 
121
+ /* Mobile navigation — a <details> hamburger. On desktop the trigger is
122
+ hidden and the nav shows inline; at the mobile breakpoint the nav
123
+ collapses behind the trigger and opens as a dropdown panel. The two
124
+ always-show rules cover both the legacy and ::details-content models for
125
+ hiding closed <details> content. This block must precede the mobile media
126
+ query so the media query's rules win on source order. */
127
+ .ck-nav-menu {
128
+ position: relative;
129
+ display: flex;
130
+ }
131
+ .ck-nav-menu > .ck-nav { display: flex; }
132
+ .ck-nav-menu::details-content { content-visibility: visible; }
133
+ .ck-nav-menu__trigger {
134
+ display: none;
135
+ align-items: center;
136
+ justify-content: center;
137
+ width: 2.6rem;
138
+ height: 2.6rem;
139
+ color: var(--ck-text);
140
+ background: var(--ck-surface);
141
+ border: 1px solid var(--ck-line);
142
+ border-radius: var(--ck-radius);
143
+ cursor: pointer;
144
+ list-style: none;
145
+ }
146
+ .ck-nav-menu__trigger::-webkit-details-marker { display: none; }
147
+ .ck-nav-menu__trigger::marker { content: ""; }
148
+ .ck-nav-menu[open] .ck-nav-menu__trigger { border-color: var(--ck-dim); }
149
+
121
150
  .ck-brand {
122
151
  display: inline-flex;
123
152
  align-items: center;
@@ -2755,12 +2784,21 @@ select.ck-input {
2755
2784
  }
2756
2785
 
2757
2786
  .ck-actions,
2758
- .ck-toolbar,
2759
- .ck-nav {
2787
+ .ck-toolbar {
2760
2788
  width: 100%;
2761
2789
  }
2762
2790
 
2791
+ /* Page header stacks: title, then lead text full-width, then action. */
2792
+ .ck-page-header {
2793
+ flex-direction: column;
2794
+ align-items: stretch;
2795
+ }
2796
+
2797
+ /* Result tables scroll horizontally within their own box instead of
2798
+ stretching the page — fixed column widths overflow a phone otherwise. */
2763
2799
  .ck-results-table {
2800
+ display: block;
2801
+ overflow-x: auto;
2764
2802
  font-size: 0.85rem;
2765
2803
  }
2766
2804
 
@@ -2776,6 +2814,29 @@ select.ck-input {
2776
2814
  .ck-review-card {
2777
2815
  padding: 1rem;
2778
2816
  }
2817
+
2818
+ /* Topbar nav collapses behind the hamburger trigger. */
2819
+ .ck-nav-menu__trigger {
2820
+ display: inline-flex;
2821
+ }
2822
+ .ck-nav-menu:not([open]) > .ck-nav {
2823
+ display: none;
2824
+ }
2825
+ .ck-nav-menu[open] > .ck-nav {
2826
+ position: absolute;
2827
+ right: 0;
2828
+ top: calc(100% + 0.6rem);
2829
+ flex-direction: column;
2830
+ align-items: stretch;
2831
+ width: 13rem;
2832
+ padding: 0.5rem;
2833
+ gap: 0.35rem;
2834
+ background: var(--ck-surface);
2835
+ border: 1px solid var(--ck-line);
2836
+ border-radius: var(--ck-radius);
2837
+ box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
2838
+ z-index: 50;
2839
+ }
2779
2840
  }
2780
2841
 
2781
2842
  .ck-api-endpoint {
@@ -4728,6 +4789,7 @@ a.tag-mark {
4728
4789
  right: 0;
4729
4790
  z-index: 30;
4730
4791
  width: 22rem;
4792
+ max-width: calc(100vw - 1.5rem);
4731
4793
  max-height: 19rem;
4732
4794
  overflow-y: auto;
4733
4795
  margin: 0;
@@ -17,6 +17,10 @@
17
17
  <div class="ck-wrap ck-topbar__inner">
18
18
  <%= link_to (main_app.respond_to?(:root_path) ? main_app.root_path : prompts_path), class: "ck-brand" do %><%= image_tag "completion_kit/logo.png", alt: "CompletionKit", style: "height: 64px; width: auto;" %><span class="ck-brand__name">Completion<span class="ck-brand__kit">Kit</span></span><% end %>
19
19
 
20
+ <details class="ck-nav-menu">
21
+ <summary class="ck-nav-menu__trigger" aria-label="Menu">
22
+ <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
23
+ </summary>
20
24
  <nav class="ck-nav">
21
25
  <% active = ->(path) { request.path.start_with?(path) ? ck_button_classes(:dark) : ck_button_classes(:light, variant: :outline) } %>
22
26
  <%= link_to "Prompts", prompts_path, class: active.(prompts_path) %>
@@ -39,6 +43,7 @@
39
43
  <%= button_to "Log out", main_app.logout_path, method: :delete, class: ck_button_classes(:light, variant: :outline) %>
40
44
  <% end %>
41
45
  </nav>
46
+ </details>
42
47
  </div>
43
48
  </header>
44
49
 
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.5.21"
2
+ VERSION = "0.5.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.21
4
+ version: 0.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin