playbook_ui 13.28.0.pre.alpha.PLAY1343fixTooltiprunwayissue2987 → 13.28.0.pre.alpha.PLAY1349checkboxzindexsticky2947
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +4 -14
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +2 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -10
- data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +0 -1
- data/dist/playbook-rails.js +2 -2
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +0 -34
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +0 -31
- data/lib/playbook/forms/builder/dropdown_field.rb +0 -14
@@ -13,7 +13,6 @@ module Playbook
|
|
13
13
|
require_relative "builder/intl_telephone_field"
|
14
14
|
require_relative "builder/multi_level_select_field"
|
15
15
|
require_relative "builder/phone_number_field"
|
16
|
-
require_relative "builder/dropdown_field"
|
17
16
|
|
18
17
|
prepend(FormFieldBuilder.new(:email_field, kit_name: "text_input"))
|
19
18
|
prepend(FormFieldBuilder.new(:number_field, kit_name: "text_input"))
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.28.0.pre.alpha.
|
4
|
+
version: 13.28.0.pre.alpha.PLAY1349checkboxzindexsticky2947
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -263,8 +263,6 @@ files:
|
|
263
263
|
- app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
|
264
264
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
|
265
265
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md
|
266
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
|
267
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
|
268
266
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
|
269
267
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
|
270
268
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
|
@@ -299,8 +297,6 @@ files:
|
|
299
297
|
- app/pb_kits/playbook/pb_advanced_table/table_header.rb
|
300
298
|
- app/pb_kits/playbook/pb_advanced_table/table_row.html.erb
|
301
299
|
- app/pb_kits/playbook/pb_advanced_table/table_row.rb
|
302
|
-
- app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb
|
303
|
-
- app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb
|
304
300
|
- app/pb_kits/playbook/pb_avatar/Utilities/GetPlacementPropsHelper.tsx
|
305
301
|
- app/pb_kits/playbook/pb_avatar/_avatar.scss
|
306
302
|
- app/pb_kits/playbook/pb_avatar/_avatar.tsx
|
@@ -2934,7 +2930,6 @@ files:
|
|
2934
2930
|
- lib/playbook/forms/builder/checkbox_field.rb
|
2935
2931
|
- lib/playbook/forms/builder/collection_select_field.rb
|
2936
2932
|
- lib/playbook/forms/builder/date_picker_field.rb
|
2937
|
-
- lib/playbook/forms/builder/dropdown_field.rb
|
2938
2933
|
- lib/playbook/forms/builder/form_field_builder.rb
|
2939
2934
|
- lib/playbook/forms/builder/intl_telephone_field.rb
|
2940
2935
|
- lib/playbook/forms/builder/multi_level_select_field.rb
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
column_definitions = [
|
3
|
-
{
|
4
|
-
accessor: "year",
|
5
|
-
label: "Year",
|
6
|
-
cellAccessors: ["quarter", "month", "day"],
|
7
|
-
},
|
8
|
-
{
|
9
|
-
accessor: "newEnrollments",
|
10
|
-
label: "New Enrollments",
|
11
|
-
},
|
12
|
-
{
|
13
|
-
accessor: "scheduledMeetings",
|
14
|
-
label: "Scheduled Meetings",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
accessor: "attendanceRate",
|
18
|
-
label: "Attendance Rate",
|
19
|
-
},
|
20
|
-
{
|
21
|
-
accessor: "completedClasses",
|
22
|
-
label: "Completed Classes",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
accessor: "classCompletionRate",
|
26
|
-
label: "Class Completion Rate",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "graduatedStudents",
|
30
|
-
label: "Graduated Students",
|
31
|
-
}
|
32
|
-
]
|
33
|
-
|
34
|
-
subrow_headers = ["Quarter", "Month", "Day"]
|
35
|
-
%>
|
36
|
-
|
37
|
-
<%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
|
38
|
-
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
39
|
-
<%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
|
40
|
-
<% end %>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
`subrow_headers` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
|
2
|
-
|
3
|
-
`enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<%= content_tag(:div,
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id) do %>
|
6
|
-
<% object.column_definitions.each_with_index do |column, index| %>
|
7
|
-
<%= pb_rails("table/table_cell", props: { tag: "div", classname: object.td_classname}) do %>
|
8
|
-
<%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
|
9
|
-
<div style="padding-left: <%= depth * 1.25 %>em">
|
10
|
-
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
11
|
-
<% if index.zero? && object.row[:children].present? %>
|
12
|
-
<button class="gray-icon toggle-all-icon" onclick="expandAllSubRows(this, <%= depth %>)">
|
13
|
-
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right:"xs" }) %>
|
14
|
-
</button>
|
15
|
-
<% end %>
|
16
|
-
<%= pb_rails("flex/flex_item") do %>
|
17
|
-
<% if index.zero? %>
|
18
|
-
<%= pb_rails("caption", props: { margin_left: object.row[:children].present? ? "none" : "xs", text: object.subrow_header }) %>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
<% end %>
|
24
|
-
<% end %>
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<script type="text/javascript">
|
29
|
-
var expandAllSubRows = (element, rowDepth) => {
|
30
|
-
element.closest(".toggle-content").querySelectorAll('.depth-sub-row-' + rowDepth + ' [data-advanced-table]').forEach((button) => {
|
31
|
-
button.dispatchEvent(new Event('click'));
|
32
|
-
});
|
33
|
-
};
|
34
|
-
</script>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbAdvancedTable
|
5
|
-
class TableSubrowHeader < Playbook::KitBase
|
6
|
-
prop :column_definitions, type: Playbook::Props::Array,
|
7
|
-
default: []
|
8
|
-
prop :depth
|
9
|
-
prop :row
|
10
|
-
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
11
|
-
values: %w[all header none],
|
12
|
-
default: "header"
|
13
|
-
prop :subrow_header, type: Playbook::Props::String,
|
14
|
-
default: ""
|
15
|
-
|
16
|
-
def classname
|
17
|
-
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
18
|
-
end
|
19
|
-
|
20
|
-
def td_classname
|
21
|
-
generate_classname("id-cell", "chrome-styles", separator: " ")
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def subrow_depth_classname
|
27
|
-
depth.positive? ? "depth-sub-row-#{depth}" : ""
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module Forms
|
5
|
-
class Builder
|
6
|
-
def dropdown_field(name, props: {})
|
7
|
-
props[:name] = name
|
8
|
-
props[:margin_bottom] = "sm"
|
9
|
-
props[:label] = @template.label(@object_name, name) if props[:label] == true
|
10
|
-
@template.pb_rails("dropdown", props: props)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|