alembic 0.8.1 → 0.8.3

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: 38b85ba5df0fb5c018bdda961a5fbfedff2a8984c580f1cd3111bed2a172dcaf
4
- data.tar.gz: 42f4e71e2eded17a8c739f058e772f3eb8c5e017cc421f0f3c60074ace786426
3
+ metadata.gz: 414b18ccf58a55058214c461aa4fe906fb77c7e1044d749b26e95fd1bf23e982
4
+ data.tar.gz: cf244807438a8324fbc6ea2c79822a7921a0760b34b98aa57768d1ab43699475
5
5
  SHA512:
6
- metadata.gz: 96d4a18b7007ffe69ad222ef08bdee58957ebfe7c3d5a69f59426af2c11e405e10309dab90c0503f3620db2b5ab691fa99c282c889b2a6db93e98db3d471c1a3
7
- data.tar.gz: 9b7f7c1e6fd198a91291667438282ff42106bb5eae407639dc614ac7b925eb07a65d8d2158f8b2c6f9b9d455d05689af62045a8d712b9c975af6b28ff2463ec5
6
+ metadata.gz: 24209db470a718be9af4a25a3e4c4223a25c7c80ad493995a277a2052d341ec02389b2f087f6e468dacfdef826115c523b6a65fbee4a1007e864f25cb3b0ad5b
7
+ data.tar.gz: 87a2aa618d2ee1ed3adf08fff98f0fb0c25c75768c7da4a931e07310f02005d33933b0f7b02f11c97f57da360761bd4660573ebc6656e57e6892400142de79d7
@@ -10,7 +10,7 @@ module Alembic
10
10
  helper ContentBlocksHelper
11
11
  helper KsBlocks::LayoutHelper
12
12
  after_action :keep_ended_inner_run, only: :step
13
- helper_method :flow_summary, :first_step_path, :summary_values, :intro_values, :start_over_path, :finish_link, :visited_flow_address
13
+ helper_method :flow_summary, :first_step_path, :summary_values, :intro_values, :start_over_path, :finish_link, :visited_flow_address, :answered_right?
14
14
  end
15
15
 
16
16
  private
@@ -78,6 +78,10 @@ module Alembic
78
78
  .merge("slug" => @guide.slug, "note" => result_note, "answers" => answers_given)
79
79
  end
80
80
 
81
+ def answered_right?(step, value)
82
+ (run&.flow || flow).scored? && Outputs::WeightedSum.weight_of(@guide.step(step).config, value).positive?
83
+ end
84
+
81
85
  def answers_given
82
86
  @answered.map { |step, value| [ @guide.question_text(step), @guide.choice_label(step, value) ] }
83
87
  end
@@ -11,7 +11,7 @@ module Alembic
11
11
  render "alembic/blocks/facts", facts: facts
12
12
  end
13
13
 
14
- START_LOOK = "inline-flex items-center justify-center font-semibold rounded-lg bg-accent-600 text-white hover:bg-accent-500 px-6 py-3 cursor-pointer".freeze
14
+ START_LOOK = "ks-button ks-button-primary ks-button-lg".freeze
15
15
 
16
16
  def alembic_start_block(start_path:, label: "Start →", starts_a_run: false)
17
17
  return button_to(label, start_path, method: :post, class: START_LOOK) if starts_a_run
@@ -1,10 +1,10 @@
1
1
  <div>
2
- <h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-4"><%= heading %></h2>
3
- <ul class="divide-y divide-gray-100 border-y border-gray-100">
2
+ <h2 class="ks-caption mb-4"><%= heading %></h2>
3
+ <ul class="divide-y divide-(color:--ks-color-divider) border-y border-(color:--ks-color-divider) dark:divide-(color:--ks-color-divider-dark) dark:border-(color:--ks-color-divider-dark)">
4
4
  <% answers.each do |question, answer| %>
5
5
  <li class="flex items-baseline justify-between gap-6 py-3">
6
- <span class="text-gray-600"><%= question %></span>
7
- <span class="shrink-0 font-semibold text-gray-900"><%= answer %></span>
6
+ <span class="ks-tone-muted"><%= question %></span>
7
+ <span class="ks-tone-neutral shrink-0 font-semibold"><%= answer %></span>
8
8
  </li>
9
9
  <% end %>
10
10
  </ul>
@@ -1,6 +1,6 @@
1
1
  <div class="text-center">
2
2
  <span class="inline-block mt-5 px-4 py-1.5 rounded-full text-sm font-semibold text-white <%= tone %>"><%= band["name"] %></span>
3
3
  <% if band["description"].present? %>
4
- <p class="text-gray-600 leading-relaxed max-w-lg mx-auto mt-4"><%= band["description"] %></p>
4
+ <p class="ks-tone-muted leading-relaxed max-w-lg mx-auto mt-4"><%= band["description"] %></p>
5
5
  <% end %>
6
6
  </div>
@@ -1,9 +1,9 @@
1
1
  <div>
2
- <h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-4"><%= heading %></h2>
2
+ <h2 class="ks-caption mb-4"><%= heading %></h2>
3
3
  <% shares.each do |name, share| %>
4
4
  <div class="flex items-center gap-3 mb-2.5">
5
- <span class="text-sm text-gray-600 w-44 shrink-0"><%= name %></span>
6
- <span class="flex-1 h-2 bg-gray-100 rounded-full overflow-hidden">
5
+ <span class="ks-tone-muted text-sm w-44 shrink-0"><%= name %></span>
6
+ <span class="ks-progress-track flex-1 h-2 overflow-hidden">
7
7
  <span class="block h-full rounded-full <%= alembic_tone(share) %>" style="width:<%= [ share.to_i, 4 ].max %>%"></span>
8
8
  </span>
9
9
  </div>
@@ -1 +1 @@
1
- <pre class="overflow-x-auto rounded-lg bg-gray-900 p-4 text-sm text-gray-100"><code><%= code %></code></pre>
1
+ <pre class="ks-code-block overflow-x-auto rounded-lg text-sm"><code><%= code %></code></pre>
@@ -1,5 +1,5 @@
1
1
  <div class="flex flex-wrap gap-2 mb-8">
2
2
  <% facts.each do |value, label| %>
3
- <span class="text-sm text-gray-500 bg-gray-50 border border-gray-200 rounded-md px-3 py-1.5"><% if label %><b class="text-gray-900"><%= value %></b> <%= label %><% else %><%= value %><% end %></span>
3
+ <span class="ks-tone-muted text-sm bg-(color:--ks-color-raised) dark:bg-(color:--ks-color-raised-dark) border border-(color:--ks-color-border) dark:border-(color:--ks-color-border-dark) rounded-md px-3 py-1.5"><% if label %><b class="ks-tone-neutral"><%= value %></b> <%= label %><% else %><%= value %><% end %></span>
4
4
  <% end %>
5
5
  </div>
@@ -1,9 +1,9 @@
1
1
  <div>
2
2
  <% if kicker.present? %>
3
- <p class="text-xs font-semibold uppercase tracking-widest text-accent-600 mb-3"><%= kicker %></p>
3
+ <p class="text-xs font-semibold uppercase tracking-widest text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) mb-3"><%= kicker %></p>
4
4
  <% end %>
5
- <h1 class="text-3xl md:text-4xl font-bold tracking-tight text-gray-900 mb-3"><%= headline %></h1>
5
+ <h1 class="ks-hero-title text-3xl md:text-4xl tracking-tight mb-3"><%= headline %></h1>
6
6
  <% if text.present? %>
7
- <p class="text-lg text-gray-600 mb-6"><%= text %></p>
7
+ <p class="ks-hero-subtitle text-lg mb-6"><%= text %></p>
8
8
  <% end %>
9
9
  </div>
@@ -1,7 +1,7 @@
1
1
  <%= ui_panel(padding: :lg) do %>
2
- <h2 class="text-xl font-semibold text-gray-900 mb-2"><%= heading %></h2>
2
+ <h2 class="ks-heading text-xl mb-2"><%= heading %></h2>
3
3
  <% if blurb.present? %>
4
- <p class="text-gray-600 mb-5"><%= blurb %></p>
4
+ <p class="ks-tone-muted mb-5"><%= blurb %></p>
5
5
  <% end %>
6
6
  <%= form_with url: address, method: :post, class: "flex flex-col sm:flex-row gap-3" do %>
7
7
  <%= render Alembic.lead_fields_partial if Alembic.lead_fields_partial %>
@@ -10,6 +10,6 @@
10
10
  <div class="flex-1">
11
11
  <%= ui_input(name: "email", type: :email, placeholder: placeholder) %>
12
12
  </div>
13
- <button type="submit" class="inline-flex items-center justify-center font-semibold rounded-lg bg-accent-600 text-white hover:bg-accent-500 px-6 py-3 cursor-pointer whitespace-nowrap"><%= button %></button>
13
+ <%= ui_button(label: button, type: :submit) %>
14
14
  <% end %>
15
15
  <% end %>
@@ -2,40 +2,40 @@
2
2
  <details id="outcome-<%= entry["key"] %>" class="group" <%= "open" if open %>>
3
3
  <summary class="flex items-start gap-3 cursor-pointer list-none">
4
4
  <% if entry["label"].present? %>
5
- <span class="text-xs font-semibold uppercase tracking-wider text-accent-600 border border-accent-200 rounded px-2 py-1 shrink-0"><%= entry["label"] %></span>
5
+ <span class="text-xs font-semibold uppercase tracking-wider text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) border border-(color:--ks-color-tint-border) rounded px-2 py-1 shrink-0"><%= entry["label"] %></span>
6
6
  <% end %>
7
7
  <span class="flex-1">
8
- <span class="block text-lg font-semibold text-gray-900"><%= entry["name"] %></span>
9
- <span class="block text-sm text-gray-500"><%= entry["tagline"] %></span>
8
+ <span class="ks-heading block text-lg"><%= entry["name"] %></span>
9
+ <span class="ks-tone-muted block text-sm"><%= entry["tagline"] %></span>
10
10
  </span>
11
- <span class="text-gray-400 transition group-open:rotate-90">&#9656;</span>
11
+ <span class="text-(color:--ks-color-icon) dark:text-(color:--ks-color-icon-dark) transition group-open:rotate-90">&#9656;</span>
12
12
  </summary>
13
13
 
14
14
  <div class="mt-5 space-y-5">
15
15
  <% if Array(entry["facts"]).any? %>
16
- <dl class="grid grid-cols-1 sm:grid-cols-3 gap-px overflow-hidden rounded-lg bg-gray-200">
16
+ <dl class="grid grid-cols-1 sm:grid-cols-3 gap-px overflow-hidden rounded-lg bg-(color:--ks-color-border) dark:bg-(color:--ks-color-border-dark)">
17
17
  <% Array(entry["facts"]).each do |label, value| %>
18
- <div class="bg-gray-50 p-3"><dt class="text-xs uppercase tracking-wide text-gray-400 mb-1"><%= label %></dt><dd class="text-sm text-gray-900"><%= value %></dd></div>
18
+ <div class="bg-(color:--ks-color-raised) dark:bg-(color:--ks-color-raised-dark) p-3"><dt class="ks-tone-muted text-xs uppercase tracking-wide mb-1"><%= label %></dt><dd class="ks-tone-neutral text-sm"><%= value %></dd></div>
19
19
  <% end %>
20
20
  </dl>
21
21
  <% end %>
22
22
 
23
23
  <% Array(entry["sections"]).each do |section| %>
24
24
  <div>
25
- <h4 class="text-xs font-semibold uppercase tracking-wider <%= section["note"].present? ? "text-red-600" : "text-accent-600" %> mb-1"><%= section["heading"] %></h4>
26
- <p class="text-gray-700"><%= section["text"] %></p>
25
+ <h4 class="text-xs font-semibold uppercase tracking-wider <%= section["note"].present? ? "ks-tone-danger" : "text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark)" %> mb-1"><%= section["heading"] %></h4>
26
+ <p class="ks-tone-neutral"><%= section["text"] %></p>
27
27
  <% if section["note"].present? %>
28
- <p class="mt-1 text-sm text-red-700"><span class="font-semibold">Result:</span> <%= section["note"] %></p>
28
+ <p class="ks-tone-danger mt-1 text-sm"><span class="font-semibold">Result:</span> <%= section["note"] %></p>
29
29
  <% end %>
30
30
  </div>
31
31
  <% end %>
32
32
 
33
33
  <% if Array(entry["steps"]).any? %>
34
34
  <div>
35
- <h4 class="text-xs font-semibold uppercase tracking-wider text-accent-600 mb-2">How to build it</h4>
35
+ <h4 class="text-xs font-semibold uppercase tracking-wider text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) mb-2">How to build it</h4>
36
36
  <% Array(entry["steps"]).each_with_index do |step, index| %>
37
- <p class="text-sm font-semibold text-gray-900 mt-3"><%= index + 1 %>. <%= step["title"] %></p>
38
- <pre class="mt-1 overflow-x-auto rounded-lg bg-gray-900 p-4 text-xs leading-relaxed text-gray-100"><code><%= step["code"] %></code></pre>
37
+ <p class="ks-tone-neutral text-sm font-semibold mt-3"><%= index + 1 %>. <%= step["title"] %></p>
38
+ <pre class="ks-code-block mt-1 overflow-x-auto rounded-lg text-xs leading-relaxed"><code><%= step["code"] %></code></pre>
39
39
  <% end %>
40
40
  </div>
41
41
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <div>
2
2
  <% if heading.present? %>
3
- <h2 class="text-2xl font-bold tracking-tight text-gray-900 mb-6"><%= heading %></h2>
3
+ <h2 class="ks-heading text-2xl tracking-tight mb-6"><%= heading %></h2>
4
4
  <% end %>
5
5
  <div class="space-y-3">
6
6
  <% entries.each do |entry| %>
@@ -1,7 +1,7 @@
1
1
  <div class="text-center">
2
- <p class="text-xs font-semibold uppercase tracking-widest text-accent-600 mb-4"><%= kicker %></p>
3
- <div class="text-7xl md:text-8xl font-bold tracking-tight text-gray-900"><%= value.nil? ? "—" : "#{value}%" %></div>
2
+ <p class="text-xs font-semibold uppercase tracking-widest text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) mb-4"><%= kicker %></p>
3
+ <div class="ks-tone-neutral text-7xl md:text-8xl font-bold tracking-tight"><%= value.nil? ? "—" : "#{value}%" %></div>
4
4
  <% if caption.present? %>
5
- <p class="text-sm text-gray-500 mt-1"><%= caption %></p>
5
+ <p class="ks-tone-muted text-sm mt-1"><%= caption %></p>
6
6
  <% end %>
7
7
  </div>
@@ -1,17 +1,17 @@
1
1
  <div class="overflow-x-auto">
2
2
  <table class="w-full text-sm text-left">
3
3
  <thead>
4
- <tr class="border-b border-gray-200">
4
+ <tr class="border-b border-(color:--ks-color-border) dark:border-(color:--ks-color-border-dark)">
5
5
  <% heading.each do |cell| %>
6
- <th class="py-2 pr-4 font-semibold text-gray-900"><%= cell %></th>
6
+ <th class="ks-tone-neutral py-2 pr-4 font-semibold"><%= cell %></th>
7
7
  <% end %>
8
8
  </tr>
9
9
  </thead>
10
10
  <tbody>
11
11
  <% rows.each do |row| %>
12
- <tr class="border-b border-gray-100">
12
+ <tr class="border-b border-(color:--ks-color-divider) dark:border-(color:--ks-color-divider-dark)">
13
13
  <% row.each do |cell| %>
14
- <td class="py-2 pr-4 text-gray-600"><%= cell %></td>
14
+ <td class="ks-tone-muted py-2 pr-4"><%= cell %></td>
15
15
  <% end %>
16
16
  </tr>
17
17
  <% end %>
@@ -1,11 +1,11 @@
1
1
  <div>
2
- <h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 mb-4"><%= heading %></h2>
2
+ <h2 class="ks-caption mb-4"><%= heading %></h2>
3
3
  <div class="space-y-4">
4
4
  <% categories.each do |category| %>
5
5
  <%= ui_panel(padding: :lg) do %>
6
- <h3 class="text-lg font-semibold text-gray-900 mb-1.5"><%= category["name"] %></h3>
7
- <p class="text-gray-700 mb-2"><%= category["miss"] %></p>
8
- <p class="text-sm text-accent-700"><span class="font-semibold"><%= cost_label %></span> <%= category["cost"] %></p>
6
+ <h3 class="ks-heading text-lg mb-1.5"><%= category["name"] %></h3>
7
+ <p class="ks-tone-neutral mb-2"><%= category["miss"] %></p>
8
+ <p class="text-sm text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark)"><span class="font-semibold"><%= cost_label %></span> <%= category["cost"] %></p>
9
9
  <% end %>
10
10
  <% end %>
11
11
  </div>
@@ -1,20 +1,20 @@
1
1
  <fieldset>
2
2
  <% if category.present? %>
3
- <p class="text-xs font-semibold uppercase tracking-wider text-accent-600 mb-2"><%= category %></p>
3
+ <p class="text-xs font-semibold uppercase tracking-wider text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) mb-2"><%= category %></p>
4
4
  <% end %>
5
- <legend class="text-xl font-semibold text-gray-900 mb-5 leading-snug"><%= question.text %></legend>
5
+ <legend class="ks-heading text-xl mb-5 leading-snug"><%= question.text %></legend>
6
6
  <div class="space-y-3">
7
7
  <% question.choices.each do |choice| %>
8
8
  <label class="block cursor-pointer">
9
9
  <%= radio_button_tag "answers[#{question.id}]", choice.value, false, class: "peer sr-only", onchange: (local_assigns.fetch(:sends_on_choice, true) ? "this.form.requestSubmit()" : nil) %>
10
- <span class="flex items-start gap-3 rounded-lg border-2 border-gray-200 bg-white px-4 py-3 transition hover:border-gray-400 peer-checked:border-accent-500 peer-checked:bg-accent-50">
10
+ <span class="ks-radio-card ks-radio-card-highlight flex items-start gap-3 transition hover:border-(color:--ks-color-hover-border)">
11
11
  <% if shows_values %>
12
- <span class="text-xs font-semibold uppercase tracking-wider text-accent-600 border border-accent-200 rounded px-2 py-0.5 shrink-0 mt-0.5"><%= choice.value %></span>
12
+ <span class="text-xs font-semibold uppercase tracking-wider text-(color:--ks-color-link) dark:text-(color:--ks-color-link-dark) border border-(color:--ks-color-tint-border) rounded px-2 py-0.5 shrink-0 mt-0.5"><%= choice.value %></span>
13
13
  <% end %>
14
- <span class="text-gray-900">
14
+ <span class="ks-radio-card-label">
15
15
  <%= choice.label.presence || choice.value %>
16
16
  <% if choice.hint.present? %>
17
- <small class="block text-gray-500"><%= choice.hint %></small>
17
+ <small class="ks-radio-card-hint block font-normal"><%= choice.hint %></small>
18
18
  <% end %>
19
19
  </span>
20
20
  </span>
@@ -40,7 +40,12 @@
40
40
  <% @answered.each do |step, value| %>
41
41
  <li data-answer="<%= step %>" class="flex items-baseline justify-between gap-6 py-3">
42
42
  <span class="ks-tone-muted"><%= @guide.question_text(step) %></span>
43
- <span class="shrink-0 font-(weight:--ks-font-weight-medium) ks-tone-neutral"><%= @guide.choice_label(step, value) %></span>
43
+ <span class="flex shrink-0 items-center gap-2 font-(weight:--ks-font-weight-medium) ks-tone-neutral">
44
+ <%= @guide.choice_label(step, value) %>
45
+ <% if answered_right?(step, value) %>
46
+ <svg aria-label="Right" role="img" class="size-5 ks-tone-success" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z" clip-rule="evenodd" /></svg>
47
+ <% end %>
48
+ </span>
44
49
  </li>
45
50
  <% end %>
46
51
  </ul>
@@ -6,30 +6,25 @@
6
6
  <section class="py-20 md:py-28">
7
7
  <div class="max-w-2xl mx-auto px-6">
8
8
  <% if (starting_over = start_over_path) %>
9
- <%= link_to "← Start over", starting_over, class: "text-sm text-accent-600 hover:text-accent-700" %>
9
+ <%= link_to "← Start over", starting_over, class: "text-sm text-(color:--ks-color-link) hover:text-(color:--ks-color-link-hover) dark:text-(color:--ks-color-link-dark) dark:hover:text-(color:--ks-color-link-hover-dark)" %>
10
10
  <% end %>
11
11
 
12
12
  <%= form_with url: flow_step_path(visited_flow_address), method: :get, data: { turbo: false, one_page: true }, class: "mt-6" do %>
13
13
  <% @questions.each_with_index do |question, index| %>
14
14
  <div data-one-page-question>
15
- <div class="flex items-center justify-between text-sm text-gray-500 mb-2">
16
- <span>Question <%= index + 1 %> of <%= @questions.size %></span>
17
- </div>
18
- <div class="h-1.5 bg-gray-100 rounded-full overflow-hidden mb-8">
19
- <i class="block h-full bg-accent-600 rounded-full transition-all" style="width:<%= (index * 100.0 / @questions.size).round %>%"></i>
20
- </div>
15
+ <div class="mb-8"><%= ui_progress(value: index, max: @questions.size, label: "Question #{index + 1} of #{@questions.size}") %></div>
21
16
  <%= render "alembic/flows/question", question: question, category: step_category(question), shows_values: shows_answer_values?, sends_on_choice: false %>
22
17
  <% if index.positive? %>
23
- <button type="button" data-one-page-previous hidden class="mt-6 cursor-pointer text-sm text-gray-500 underline underline-offset-2 hover:text-gray-900">← Previous</button>
18
+ <button type="button" data-one-page-previous hidden class="mt-6 ks-tone-muted cursor-pointer text-sm underline underline-offset-2 hover:text-(color:--ks-color-text) dark:hover:text-(color:--ks-color-text-dark)">← Previous</button>
24
19
  <% end %>
25
20
  </div>
26
21
  <% end %>
27
22
 
28
23
  <div data-one-page-ready class="mt-8">
29
- <p class="text-gray-600 mb-5">That's every question.</p>
24
+ <p class="ks-tone-muted mb-5">That's every question.</p>
30
25
  <div class="flex items-center gap-4">
31
- <button type="submit" class="inline-flex items-center justify-center font-semibold rounded-lg bg-accent-600 text-white hover:bg-accent-500 px-6 py-3 cursor-pointer">See my results</button>
32
- <button type="button" data-one-page-previous hidden class="cursor-pointer text-sm text-gray-500 underline underline-offset-2 hover:text-gray-900">← Previous</button>
26
+ <%= ui_button(label: "See my results", type: :submit) %>
27
+ <button type="button" data-one-page-previous hidden class="ks-tone-muted cursor-pointer text-sm underline underline-offset-2 hover:text-(color:--ks-color-text) dark:hover:text-(color:--ks-color-text-dark)">← Previous</button>
33
28
  </div>
34
29
  </div>
35
30
  <% end %>
@@ -3,24 +3,19 @@
3
3
  <section class="py-20 md:py-28">
4
4
  <div class="max-w-2xl mx-auto px-6">
5
5
  <% if (starting_over = start_over_path) %>
6
- <%= link_to "← Start over", starting_over, class: "text-sm text-accent-600 hover:text-accent-700" %>
6
+ <%= link_to "← Start over", starting_over, class: "text-sm text-(color:--ks-color-link) hover:text-(color:--ks-color-link-hover) dark:text-(color:--ks-color-link-dark) dark:hover:text-(color:--ks-color-link-hover-dark)" %>
7
7
  <% end %>
8
8
 
9
9
  <% answered = @answers.size %>
10
10
  <% questions = answered + @guide.questions_left(@answers) %>
11
- <div class="mt-6 flex items-center justify-between text-sm text-gray-500 mb-2">
12
- <span>Question <%= answered + 1 %> of <%= questions %></span>
13
- </div>
14
- <div class="h-1.5 bg-gray-100 rounded-full overflow-hidden mb-8">
15
- <i class="block h-full bg-accent-600 rounded-full transition-all" style="width:<%= (answered * 100.0 / [ questions, 1 ].max).round %>%"></i>
16
- </div>
11
+ <div class="mt-6 mb-8"><%= ui_progress(value: answered, max: [ questions, 1 ].max, label: "Question #{answered + 1} of #{questions}") %></div>
17
12
 
18
13
  <% if flash[:alert] %>
19
14
  <div class="mt-6"><%= ui_alert(message: flash[:alert], type: :error) %></div>
20
15
  <% end %>
21
16
 
22
17
  <% if @waiting %>
23
- <p class="mt-6 text-gray-700">Waiting for <%= @waiting %>.</p>
18
+ <p class="mt-6 ks-tone-neutral">Waiting for <%= @waiting %>.</p>
24
19
  <% else %>
25
20
  <%= form_with url: step_form[:url], method: step_form[:method], data: { turbo: false }, class: "mt-6" do %>
26
21
  <%= hidden_field_tag :asked, @question.id %>
@@ -40,7 +35,7 @@
40
35
  <div class="mt-8 flex items-center gap-4">
41
36
  <%= ui_button(label: "Next", type: :submit) %>
42
37
  <% if @answers.any? %>
43
- <button type="submit" name="back" value="1" formnovalidate class="cursor-pointer text-sm text-gray-500 underline underline-offset-2 hover:text-gray-900">← Back</button>
38
+ <button type="submit" name="back" value="1" formnovalidate class="ks-tone-muted cursor-pointer text-sm underline underline-offset-2 hover:text-(color:--ks-color-text) dark:hover:text-(color:--ks-color-text-dark)">← Back</button>
44
39
  <% end %>
45
40
  </div>
46
41
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Alembic
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alembic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider