Skip to content

Commit c895376

Browse files
committed
wip
1 parent b59e963 commit c895376

File tree

11 files changed

+21
-11
lines changed

11 files changed

+21
-11
lines changed

app/assets/stylesheets/application.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
--breakpoint-xs: 30rem;
4747

48+
--container-8xl: 96rem;
49+
4850
/* Tiny text size originally added for discreet information */
4951
--text-tiny: 0.625rem;
5052
}

app/assets/stylesheets/css/components/field-wrapper.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@
5454
@apply w-full;
5555
}
5656
}
57+
58+
.container-small {
59+
.field-wrapper__content-wrapper {
60+
@apply w-full;
61+
}
62+
}

app/assets/stylesheets/css/components/ui/panel_header.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.header {
2-
@apply flex flex-col gap-2 items-start justify-center pe-0 py-0 !mb-0 px-1;
2+
@apply flex flex-col gap-2 items-start justify-center pe-0 py-0 px-1;
33
}
44

55
.header__main {

app/components/avo/field_wrapper_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
data: {slot: "value"} do %>
2424
<%= tag.div class: "field-wrapper__content-wrapper" do %>
2525
<% if on_show? %>
26-
<div class="flex flex-row items-center group gap-x-1 group/clipboard">
26+
<div class="flex flex-row items-center group gap-x-1 group/clipboard w-full">
2727
<% if render_dash? %>
2828
2929
<% else %>

app/components/avo/fields/common/files/list_viewer_component.html.erb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<%= content_tag :div, class: class_names(
2-
{
3-
"-mt-9": @field.stacked && !@field.hide_view_type_switcher
4-
}
2+
"w-full @container",
3+
"-mt-6": @field.stacked && !@field.hide_view_type_switcher
54
) do %>
65
<%= turbo_frame_tag @field.id do %>
76
<% unless @field.hide_view_type_switcher %>
@@ -19,7 +18,7 @@
1918
"py-4 rounded-2xl max-w-full",
2019
{
2120
"flex flex-col space-y-2": @view_type == :list,
22-
"relative grid xs:grid-cols-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6 gap-6": @view_type == :grid
21+
"relative grid xs:grid-cols-2 @sm:grid-cols-2 @xl:grid-cols-3 @2xl:grid-cols-4 @4xl:grid-cols-5 @6xl:grid-cols-6 @7xl:grid-cols-7 @8xl:grid-cols-8 gap-6": @view_type == :grid
2322
}
2423
) do %>
2524
<% @field.value.attachments.each do |file| %>

app/components/avo/items/switcher_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</div>
3636
<% end %>
3737

38-
<%= render ui.panel_header(title:, description: @resource.description, index:) do |header| %>
38+
<%= render ui.panel_header(title:, description: @resource.description, index:, class: "!-mb-14") do |header| %>
3939
<% header.with_controls do %>
4040
<% controls.each do |control| %>
4141
<%= render_control control %>

app/components/avo/u_i/panel_header_component.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<%= tag.div class: class_names(
2+
@class,
23
"header",
34
"header--size-medium": size_medium?,
45
"header--size-small": size_small?

app/components/avo/u_i/panel_header_component.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Avo::UI::PanelHeaderComponent < Avo::BaseComponent
77
prop :url
88
prop :target
99
prop :index
10+
prop :class
1011

1112
renders_one :title_slot
1213
renders_one :avatar

app/components/avo/views/resource_show_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
selected_resources: [@resource.record_param],
88
**@resource.stimulus_data_attributes
99
} do %>
10-
<%= content_tag :div, class: 'space-y-12' do %>
10+
<%= content_tag :div, class: 'flex flex-col gap-y-12' do %>
1111
<%= render_cards_component %>
1212

1313
<% @resource.get_items.each_with_index do |item, index| %>

lib/avo/fields/files_field.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ class FilesField < BaseField
1010
attr_reader :hide_view_type_switcher
1111

1212
def initialize(id, **args, &block)
13-
super(id, **args, &block)
13+
super
1414

1515
@is_audio = args[:is_audio].present? ? args[:is_audio] : false
1616
@is_image = args[:is_image].present? ? args[:is_image] : @is_avatar
1717
@direct_upload = args[:direct_upload].present? ? args[:direct_upload] : false
1818
@accept = args[:accept].present? ? args[:accept] : nil
19-
@display_filename = args[:display_filename].nil? ? true : args[:display_filename]
19+
@display_filename = args[:display_filename].nil? || args[:display_filename]
2020
@view_type = args[:view_type] || :grid
2121
@hide_view_type_switcher = args[:hide_view_type_switcher]
2222
end

0 commit comments

Comments
 (0)