baldur 0.3.1 → 0.3.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: 84f1d524fb1dd31856ada448cc5d8d97f82dd5749c13d2e9709db0b1fa79a859
4
- data.tar.gz: 26c743de89e5e8de9b6f9af83d274cf8eb14a32a9416c97183c4d9486a0718fc
3
+ metadata.gz: 93d95869911e4f187f207071f260e42ad456a4557aa81180f40c814316b8a5a3
4
+ data.tar.gz: 3a99ddd5a6e5c8d959e79cd27b1abd180885b22a9f8b158e03f6f73f2e8bb87a
5
5
  SHA512:
6
- metadata.gz: ea50eff0d113bb2ebbbbc331e9b5d1f8b41b8a5c57a1a7ed894579ed0bc75dda917c6b60787362ba790b2d9762f8f53f948290c597fd5ef4d57168da2109508a
7
- data.tar.gz: 63e9b46efb73d8aa286e1d7fbc67156e7f6e27f83cc9a90fac5ef5f2dd29d8b19d8ebe47b24876436caee4c09460dd7002484c4dea6de47168049e51e77943ce
6
+ metadata.gz: 718213b3df5efacd1e60055c7ee591e17aa63f62be2f458bbdc53b4328593299b29967c03afcdf824c291f9c3e1faf16f86cea593b75c8fb9f9822d7ef84ae4a
7
+ data.tar.gz: 6c5a9baba3be1cacd3ba7a96c85864137962100c86d97fc9a02541f2989e9b527c924bdfa2f1ef3c03773da76a36e82fb18241b1ff5a1f5bfa6271470401d3dc
@@ -39,12 +39,12 @@
39
39
  <% if actions.present? || collapsible %>
40
40
  <div class="alert__rail">
41
41
  <% if actions.present? %>
42
- <div class="alert__actions" data-alert-target="actions" <%= "hidden" if collapsed %>>
42
+ <div class="alert__actions" data-alert-target="actions" <% if collapsed %>hidden<% end %>>
43
43
  <%= actions %>
44
44
  </div>
45
45
  <% end %>
46
46
  <% if collapsible %>
47
- <div class="alert__summary-action" data-alert-target="expandButton" <%= "hidden" unless collapsed %>>
47
+ <div class="alert__summary-action" data-alert-target="expandButton" <% if !collapsed %>hidden<% end %>>
48
48
  <%= ui_button(
49
49
  label: local_assigns[:collapsed_summary_action_label].presence || "More",
50
50
  variant: :text,
@@ -96,4 +96,4 @@
96
96
  </div>
97
97
  </div>
98
98
  </div>
99
- </div>
99
+ </div>
@@ -11,7 +11,7 @@
11
11
  data-date-field-target="toggle"
12
12
  aria-label="<%= toggle_label %>"
13
13
  title="<%= toggle_label %>"
14
- <%= "disabled" if native_input_options[:disabled] %>>
14
+ <% if native_input_options[:disabled] %>disabled<% end %>>
15
15
  <%= ui_icon(icon_name, class_name: "h-[18px] w-[18px]") %>
16
16
  </button>
17
17
  </div>
@@ -7,7 +7,7 @@
7
7
  data-controller="menu-select"
8
8
  data-menu-select="true"
9
9
  data-menu-placement="bottom"
10
- <%= %(data-menu-select-disabled="true") if disabled %>>
10
+ <% if disabled %>data-menu-select-disabled="true"<% end %>>
11
11
  <% hidden_input_data = input_data.present? ? input_data.dup : {} %>
12
12
  <% hidden_input_data[:"menu-select-input"] = true %>
13
13
  <% hidden_input_data[:menu_select_target] ||= "input" %>
@@ -18,9 +18,9 @@
18
18
  id="<%= field_id %>"
19
19
  aria-haspopup="menu"
20
20
  aria-expanded="false"
21
- aria-disabled="<%= disabled ? "true" : "false" %>"
22
- <%= "disabled" if disabled %>
23
- data-menu-select-trigger
21
+ aria-disabled="<%= disabled ? "true" : "false" %>"
22
+ <% if disabled %>disabled<% end %>
23
+ data-menu-select-trigger
24
24
  data-menu-select-target="trigger">
25
25
  <span class="menu-select__label"
26
26
  data-menu-select-label
@@ -7,4 +7,4 @@
7
7
  data-modal="true"
8
8
  aria-hidden="true">
9
9
  <%= body %>
10
- </div>
10
+ </div>
@@ -22,7 +22,7 @@
22
22
  <li
23
23
  class="stepper__item <%= status_class %>"
24
24
  role="listitem"
25
- <%= 'aria-current="step"' if status == :current %>>
25
+ <% if status == :current %>aria-current="step"<% end %>>
26
26
  <div class="stepper__indicator-row">
27
27
  <div class="<%= left_classes.join(" ") %>" aria-hidden="true"></div>
28
28
  <div class="stepper__indicator" aria-hidden="true">
@@ -87,25 +87,30 @@
87
87
  </td>
88
88
  </tr>
89
89
  <% else %>
90
- <% rows.each do |row|
91
- cells = if row.is_a?(Hash)
92
- normalized_columns.map { |column| row[column[:key]] }
93
- else
94
- Array(row)
95
- end
96
- dynamic_attributes =
97
- case row_attributes_config
98
- when Proc
99
- row_attributes_config.call(row) || {}
100
- when Hash
101
- row_attributes_config
102
- else
103
- {}
104
- end
105
- attributes = dynamic_attributes.deep_dup
106
- classes = [row_classes, attributes.delete(:class)].compact.join(" ").presence
107
- attributes[:class] = classes if classes.present?
108
- %>
90
+ <% rows.each do |row| %>
91
+ <%
92
+ cells = if row.is_a?(Hash)
93
+ normalized_columns.map { |column| row[column[:key]] }
94
+ else
95
+ Array(row)
96
+ end
97
+ %>
98
+ <%
99
+ dynamic_attributes =
100
+ case row_attributes_config
101
+ when Proc
102
+ row_attributes_config.call(row) || {}
103
+ when Hash
104
+ row_attributes_config
105
+ else
106
+ {}
107
+ end
108
+ %>
109
+ <%
110
+ attributes = dynamic_attributes.deep_dup
111
+ classes = [row_classes, attributes.delete(:class)].compact.join(" ").presence
112
+ attributes[:class] = classes if classes.present?
113
+ %>
109
114
  <%= tag.tr(**attributes) do %>
110
115
  <% cells.each_with_index do |cell, index| %>
111
116
  <% column_cell_class = [cell_classes, ("text-right" if normalized_columns[index]&.fetch(:numeric, nil)), normalized_columns[index]&.fetch(:cell_class, nil)].compact.join(" ") %>
@@ -27,7 +27,7 @@
27
27
  data-field-support="true"
28
28
  data-default-support="<%= supporting_text.to_s %>"
29
29
  aria-live="polite"
30
- <%= "hidden" if support_hidden %>>
30
+ <% if support_hidden %>hidden<% end %>>
31
31
  <%= support_output %>
32
32
  </p>
33
33
  </div>
@@ -9,7 +9,7 @@
9
9
  <input type="checkbox"
10
10
  data-theme-target="toggle"
11
11
  data-theme-toggle
12
- aria-label="<%= aria_label %>" />
12
+ aria-label="<%= aria_label %>">
13
13
  <span class="switch__track">
14
14
  <span class="switch__icon switch__icon--sun" aria-hidden="true"><%= ui_icon("sun", class_name: "h-4 w-4") %></span>
15
15
  <span class="switch__icon switch__icon--moon" aria-hidden="true"><%= ui_icon("moon", class_name: "h-4 w-4") %></span>
@@ -20,4 +20,4 @@
20
20
  <span class="theme-toggle__compact-icon theme-toggle__compact-icon--moon"><%= ui_icon("moon", class_name: "h-5 w-5") %></span>
21
21
  </span>
22
22
  <span class="sr-only"><%= aria_label %></span>
23
- </label>
23
+ </label>
@@ -5,7 +5,7 @@
5
5
  }
6
6
  section_attributes[:id] = payload[:id] if payload[:id].present?
7
7
  %>
8
- <section <%= tag.attributes(section_attributes) %>>
8
+ <%= tag.section(section_attributes) do %>
9
9
  <div class="mx-auto flex max-w-6xl flex-col gap-6 md:flex-row md:items-center md:justify-between">
10
10
  <div class="max-w-3xl">
11
11
  <h2 class="text-neutral-50"><%= payload[:title] %></h2>
@@ -17,4 +17,4 @@
17
17
  class: "inline-flex h-11 items-center justify-center rounded-[1rem] bg-white px-5 text-base font-semibold text-[#1f1f27] shadow-[var(--elev-1)] transition-transform duration-150 hover:-translate-y-0.5" %>
18
18
  </div>
19
19
  </div>
20
- </section>
20
+ <% end %>
@@ -32,7 +32,7 @@
32
32
  data-tab="<%= tab[:value] %>"
33
33
  role="tabpanel"
34
34
  class="<%= panel_classes %>"
35
- <%= 'hidden aria-hidden="true"' unless active %>>
35
+ <% unless active %>hidden aria-hidden="true"<% end %>>
36
36
  <div class="grid items-start gap-8 md:grid-cols-[0.9fr_1.1fr]">
37
37
  <div class="rounded-3xl border border-outline-variant bg-surface p-6">
38
38
  <h3 class="text-2xl font-semibold text-on-surface"><%= tab[:panel_title].presence || tab[:label] %></h3>
@@ -1,3 +1,3 @@
1
1
  module Baldur
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baldur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Varun Murkar