playbook_ui 14.9.0.pre.alpha.play1703errorstatealignment4991 → 14.9.0.pre.alpha.play1703errorstatealignment5060
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/Components/CollapsibleTrail.tsx +1 -6
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +36 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +4 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +8 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +2 -0
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +2 -2
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +11 -3
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -37
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +17 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +17 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +15 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +2 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +15 -1
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +32 -0
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +29 -0
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +30 -11
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +166 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +89 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +115 -46
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +9 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +3 -2
- data/dist/chunks/_weekday_stacked-DkCMUF58.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +9 -3
- data/dist/chunks/_weekday_stacked-B28kYXl9.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cafdaf728f6e7924b815a4a2525dd59cb72dcb4986d8062dbc8df9a56ca3897
|
4
|
+
data.tar.gz: 45233fb274a14a0522f2c8bb7f1d8ce4222e6d7d69298bbf839be73ea1d3de7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20668527d152f490902220ba60775ab6479f1cb7dc0a18e33341759c064751eb12d55ee5e17953c0fec90d2e24b2916880110fe89c92df8e1cbb5f98af9f8eba
|
7
|
+
data.tar.gz: 5aeebf46b23221b0cb447ca22b3a197ea38fc7181fd157aa4504490dfef84f4024536d9d10a58f91ed3704754f735b46b0b295ab17d058a2ad7b15b870fb3503
|
@@ -3,18 +3,13 @@ import React from "react"
|
|
3
3
|
//CollapsibleTrail component
|
4
4
|
const CollapsibleTrail = ({ leftOffset }: { leftOffset: number }) => {
|
5
5
|
const style: { [key: string]: string | number } = {
|
6
|
-
position: "absolute",
|
7
6
|
left: `${leftOffset}em`,
|
8
|
-
top: 0,
|
9
|
-
bottom: 0,
|
10
|
-
width: "2px",
|
11
|
-
backgroundColor: "#E4E8F0",
|
12
7
|
}
|
13
8
|
|
14
9
|
return (
|
15
10
|
<div
|
16
11
|
className="collapsible-trail"
|
17
|
-
style={style}
|
12
|
+
style={style}
|
18
13
|
/>
|
19
14
|
)
|
20
15
|
}
|
@@ -110,6 +110,14 @@
|
|
110
110
|
height: auto;
|
111
111
|
}
|
112
112
|
|
113
|
+
.collapsible-trail {
|
114
|
+
background-color: $border_light;
|
115
|
+
position: absolute;
|
116
|
+
top: 0;
|
117
|
+
bottom: 0;
|
118
|
+
width: 2px;
|
119
|
+
}
|
120
|
+
|
113
121
|
// Responsive Styles
|
114
122
|
@media only screen and (max-width: $screen-xl-min) {
|
115
123
|
&[class*="table-responsive-scroll"] {
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
accessor: "newEnrollments",
|
9
|
+
label: "New Enrollments",
|
10
|
+
},
|
11
|
+
{
|
12
|
+
accessor: "scheduledMeetings",
|
13
|
+
label: "Scheduled Meetings",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
accessor: "attendanceRate",
|
17
|
+
label: "Attendance Rate",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
accessor: "completedClasses",
|
21
|
+
label: "Completed Classes",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
accessor: "classCompletionRate",
|
25
|
+
label: "Class Completion Rate",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "graduatedStudents",
|
29
|
+
label: "Graduated Students",
|
30
|
+
}
|
31
|
+
] %>
|
32
|
+
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "collapsible_trail", table_data: @table_data, column_definitions: column_definitions }) do %>
|
34
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
|
35
|
+
<%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions, collapsible_trail: false }) %>
|
36
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
`collapsible_trail` is an optional prop that is set to 'true' by default. If set to 'false', it will remove the trail on the left of the rows when subRows are toggled open.
|
@@ -2,6 +2,7 @@ examples:
|
|
2
2
|
rails:
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
4
4
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
5
|
+
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
5
6
|
- advanced_table_beta_sort: Enable Sorting
|
6
7
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
7
8
|
|
@@ -14,14 +14,16 @@ module Playbook
|
|
14
14
|
default: "header"
|
15
15
|
prop :subrow_headers, type: Playbook::Props::Array,
|
16
16
|
default: []
|
17
|
+
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
18
|
+
default: true
|
17
19
|
|
18
20
|
def render_row_and_children(row, column_definitions, current_depth, first_parent_child)
|
19
21
|
output = ActiveSupport::SafeBuffer.new
|
20
22
|
is_first_child_of_subrow = current_depth.positive? && first_parent_child && subrow_headers[current_depth - 1].present?
|
21
23
|
|
22
|
-
output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: column_definitions, depth: current_depth, subrow_header: subrow_headers[current_depth - 1] }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
|
24
|
+
output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: column_definitions, depth: current_depth, subrow_header: subrow_headers[current_depth - 1], collapsible_trail: collapsible_trail }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
|
23
25
|
|
24
|
-
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: column_definitions, depth: current_depth })
|
26
|
+
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: column_definitions, depth: current_depth, collapsible_trail: collapsible_trail })
|
25
27
|
|
26
28
|
if row[:children].present?
|
27
29
|
output << content_tag(:div, class: "toggle-content", data: { advanced_table_content: row.object_id.to_s + id }) do
|
@@ -2,6 +2,14 @@
|
|
2
2
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
3
|
<%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
|
4
4
|
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
5
|
+
<% if collapsible_trail && index.zero? %>
|
6
|
+
<% (1..depth).each do |i| %>
|
7
|
+
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
|
8
|
+
<% left_offset = i * 1.0 + additional_offset %>
|
9
|
+
<div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
5
13
|
<div style="padding-left: <%= depth * 1.25 %>em">
|
6
14
|
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
7
15
|
<% if index.zero? && object.row[:children].present? %>
|
@@ -6,6 +6,14 @@
|
|
6
6
|
<% object.column_definitions.each_with_index do |column, index| %>
|
7
7
|
<%= pb_rails("table/table_cell", props: { tag: "div", classname: object.td_classname}) do %>
|
8
8
|
<%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
|
9
|
+
<% if collapsible_trail && index.zero? %>
|
10
|
+
<% (1..depth).each do |i| %>
|
11
|
+
<% additional_offset = i > 1 ? (i - 1) * 0.25 : 0 %>
|
12
|
+
<% left_offset = i * 1.0 + additional_offset %>
|
13
|
+
<div class="collapsible-trail" style="left: <%= left_offset %>em"></div>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
|
9
17
|
<div style="padding-left: <%= depth * 1.25 %>em">
|
10
18
|
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
11
19
|
<% if index.zero? && object.row[:children].present? %>
|
@@ -12,6 +12,8 @@ module Playbook
|
|
12
12
|
default: "header"
|
13
13
|
prop :subrow_header, type: Playbook::Props::String,
|
14
14
|
default: ""
|
15
|
+
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
16
|
+
default: true
|
15
17
|
|
16
18
|
def classname
|
17
19
|
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
@@ -287,7 +287,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
287
287
|
{...ariaProps}
|
288
288
|
{...dataProps}
|
289
289
|
{...htmlProps}
|
290
|
-
style={dynamicInlineProps}
|
291
290
|
className={classnames(drawerClassNames.base, {
|
292
291
|
[drawerClassNames.afterOpen]:
|
293
292
|
animationState === "afterOpen",
|
@@ -296,6 +295,7 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
296
295
|
})}
|
297
296
|
id={id}
|
298
297
|
onClick={(e) => e.stopPropagation()}
|
298
|
+
style={dynamicInlineProps}
|
299
299
|
>
|
300
300
|
{children}
|
301
301
|
</div>
|
@@ -306,7 +306,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
306
306
|
{...dataProps}
|
307
307
|
{...htmlProps}
|
308
308
|
className={classes}
|
309
|
-
style={dynamicInlineProps}
|
310
309
|
>
|
311
310
|
{isModalVisible && (
|
312
311
|
<div
|
@@ -327,6 +326,7 @@ const Drawer = (props: DrawerProps): React.ReactElement => {
|
|
327
326
|
animationState === "beforeClose",
|
328
327
|
})}
|
329
328
|
onClick={(e) => e.stopPropagation()}
|
329
|
+
style={dynamicInlineProps}
|
330
330
|
>
|
331
331
|
{children}
|
332
332
|
</div>
|
@@ -20,12 +20,20 @@
|
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
-
@mixin error-state-
|
23
|
+
@mixin error-state-right-side-select-kit {
|
24
24
|
&:has(.pb_text_input_kit:not(.error)):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error),
|
25
25
|
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper) {
|
26
26
|
align-items: flex-start;
|
27
27
|
|
28
|
-
.pb_select_kit_wrapper
|
28
|
+
.pb_select_kit_wrapper {
|
29
|
+
padding-top: $space_md;
|
30
|
+
margin-top: 2px;
|
31
|
+
|
32
|
+
.pb_select_kit_caret {
|
33
|
+
padding-top: $space_md;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
29
37
|
.pb_select_kit_wrapper.error {
|
30
38
|
padding-top: $space_md;
|
31
39
|
margin-top: 2px;
|
@@ -37,7 +45,7 @@
|
|
37
45
|
}
|
38
46
|
}
|
39
47
|
|
40
|
-
@mixin error-state-
|
48
|
+
@mixin error-state-left-side-select-kit {
|
41
49
|
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_phone_number_input):has(.pb_text_input_kit.error) {
|
42
50
|
align-items: flex-start;
|
43
51
|
|
@@ -21,43 +21,6 @@
|
|
21
21
|
@include error-state-left-side-select-kit;
|
22
22
|
@include error-state-right-side-select-kit;
|
23
23
|
|
24
|
-
// &:has(.pb_text_input_kit.error):has(.pb_text_input_kit),
|
25
|
-
// &:has(.pb_text_input_kit):has(.pb_date_picker_kit.error),
|
26
|
-
// &:has(.pb_text_input_kit):has(.pb_select_kit_wrapper.error),
|
27
|
-
// &:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error) {
|
28
|
-
// align-items: flex-start;
|
29
|
-
// }
|
30
|
-
|
31
|
-
// &:has(.pb_text_input_kit:not(.error)):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error),
|
32
|
-
// &:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper) {
|
33
|
-
// align-items: flex-start;
|
34
|
-
// .pb_select_kit_wrapper,
|
35
|
-
// .pb_select_kit_wrapper.error {
|
36
|
-
// padding-top: $space_md;
|
37
|
-
// margin-top: 2px;
|
38
|
-
// .pb_select_kit_caret {
|
39
|
-
// padding-top: $space_xl;
|
40
|
-
// }
|
41
|
-
// }
|
42
|
-
// }
|
43
|
-
|
44
|
-
// &:has(.pb_select_kit_label):has(.pb_select_kit_wrapper.error):has(.pb_phone_number_input),
|
45
|
-
// &:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has([class^=pb_button_kit]) {
|
46
|
-
// align-items: center;
|
47
|
-
// }
|
48
|
-
|
49
|
-
// &:has(.pb_select_kit_label):has(.pb_select_kit_wrapper.error):has(.pb_phone_number_input):has(.pb_text_input_kit.error) {
|
50
|
-
// align-items: flex-end;
|
51
|
-
// }
|
52
|
-
|
53
|
-
// &:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_phone_number_input):has(.pb_text_input_kit.error) {
|
54
|
-
// align-items: flex-start;
|
55
|
-
// .pb_text_input_kit.error {
|
56
|
-
// padding-top: $space_md;
|
57
|
-
// margin-top: 2px;
|
58
|
-
// }
|
59
|
-
// }
|
60
|
-
|
61
24
|
& [class^=pb_text_input_kit] .text_input_wrapper,
|
62
25
|
& [class^=pb_date_picker_kit] .input_wrapper,
|
63
26
|
& [class^=pb_select] {
|
@@ -18,7 +18,7 @@ type HomeAddressStreetProps = {
|
|
18
18
|
className?: string,
|
19
19
|
data?: { [key: string]: string },
|
20
20
|
dark?: boolean,
|
21
|
-
emphasis: "street" | "city",
|
21
|
+
emphasis: "street" | "city" | "none",
|
22
22
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
23
23
|
homeId: string,
|
24
24
|
houseStyle: string,
|
@@ -129,6 +129,22 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
|
|
129
129
|
</div>
|
130
130
|
</div>
|
131
131
|
}
|
132
|
+
{emphasis == 'none' &&
|
133
|
+
<div>
|
134
|
+
<Body dark={dark}>
|
135
|
+
{joinPresent([titleize(address), houseStyle], ' · ')}
|
136
|
+
</Body>
|
137
|
+
<Body dark={dark}>{titleize(addressCont)}</Body>
|
138
|
+
<div>
|
139
|
+
<Body
|
140
|
+
color="light"
|
141
|
+
dark={dark}
|
142
|
+
>
|
143
|
+
{`${titleize(city)}, ${state} ${zipcode}`}
|
144
|
+
</Body>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
}
|
132
148
|
{homeId &&
|
133
149
|
<Hashtag
|
134
150
|
classname="home-hashtag"
|
data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb
CHANGED
@@ -24,4 +24,20 @@
|
|
24
24
|
state: "PA",
|
25
25
|
zipcode: "19382",
|
26
26
|
territory: "PHL",
|
27
|
-
}) %>
|
27
|
+
}) %>
|
28
|
+
|
29
|
+
<br>
|
30
|
+
<br>
|
31
|
+
|
32
|
+
<%= pb_rails("home_address_street", props: {
|
33
|
+
address: "70 Prospect Ave",
|
34
|
+
address_cont: "Apt M18",
|
35
|
+
city: "West Chester",
|
36
|
+
emphasis: "none",
|
37
|
+
home_id: 8250263,
|
38
|
+
home_url: "https://powerhrg.com/",
|
39
|
+
house_style: "Colonial",
|
40
|
+
state: "PA",
|
41
|
+
zipcode: "19382",
|
42
|
+
territory: "PHL",
|
43
|
+
}) %>
|
@@ -32,6 +32,21 @@ const HomeAddressStreetEmphasis = (props) => {
|
|
32
32
|
zipcode="19382"
|
33
33
|
{...props}
|
34
34
|
/>
|
35
|
+
<br />
|
36
|
+
<br />
|
37
|
+
<HomeAddressStreet
|
38
|
+
address="70 Prospect Ave"
|
39
|
+
addressCont="Apt M18"
|
40
|
+
city="West Chester"
|
41
|
+
emphasis="none"
|
42
|
+
homeId="8250263"
|
43
|
+
homeUrl="https://powerhrg.com/"
|
44
|
+
houseStyle="Colonial"
|
45
|
+
state="PA"
|
46
|
+
territory="PHL"
|
47
|
+
zipcode="19382"
|
48
|
+
{...props}
|
49
|
+
/>
|
35
50
|
</div>
|
36
51
|
)
|
37
52
|
}
|
@@ -7,7 +7,7 @@ module Playbook
|
|
7
7
|
prop :address_cont
|
8
8
|
prop :city
|
9
9
|
prop :emphasis, type: Playbook::Props::Enum,
|
10
|
-
values: %w[street city],
|
10
|
+
values: %w[street city none],
|
11
11
|
default: "street"
|
12
12
|
prop :home_id, type: Playbook::Props::Number
|
13
13
|
prop :home_url
|
@@ -77,6 +77,20 @@ module Playbook
|
|
77
77
|
}
|
78
78
|
end
|
79
79
|
|
80
|
+
def none_emphasis_props
|
81
|
+
{
|
82
|
+
address_house_style: address_house_style,
|
83
|
+
address_house_style2: address_house_style2,
|
84
|
+
city_state_zip: city_state_zip,
|
85
|
+
dark: dark,
|
86
|
+
home_id: home_id,
|
87
|
+
home_url: home_url,
|
88
|
+
target: target_option,
|
89
|
+
new_window: new_window,
|
90
|
+
territory: territory,
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
80
94
|
def target_option
|
81
95
|
if target && home_url
|
82
96
|
target
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= pb_rails "body", props: {
|
2
|
+
classname: "pb_home_address_street_address",
|
3
|
+
size: 4,
|
4
|
+
text: object.address_house_style,
|
5
|
+
dark: object.dark
|
6
|
+
} %>
|
7
|
+
<%= pb_rails "body", props: {
|
8
|
+
classname: "pb_home_address_street_address",
|
9
|
+
size: 4,
|
10
|
+
text: object.address_house_style2,
|
11
|
+
dark: object.dark
|
12
|
+
} %>
|
13
|
+
<%= pb_rails "body", props: {
|
14
|
+
color: "light",
|
15
|
+
text: object.city_state_zip,
|
16
|
+
dark: object.dark
|
17
|
+
} %>
|
18
|
+
|
19
|
+
<% if object.home_id %>
|
20
|
+
<%= pb_rails("hashtag", props: {
|
21
|
+
text: "#{object.home_id}",
|
22
|
+
url: object.home_url || "#",
|
23
|
+
type: "home",
|
24
|
+
dark: object.dark,
|
25
|
+
classname: "home-hashtag",
|
26
|
+
new_window: object.new_window,
|
27
|
+
target: object.target_option}) %>
|
28
|
+
<% end %>
|
29
|
+
|
30
|
+
<%= pb_rails "body", props: { color: "light", tag: "span", dark: object.dark } do %>
|
31
|
+
<small><%= object.territory %></small>
|
32
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Playbook
|
4
|
+
module PbHomeAddressStreet
|
5
|
+
class NoneEmphasis < Playbook::KitBase
|
6
|
+
prop :address_house_style
|
7
|
+
prop :address_house_style2
|
8
|
+
prop :city_state_zip
|
9
|
+
prop :home_id, type: Playbook::Props::Number
|
10
|
+
prop :home_url
|
11
|
+
prop :new_window, type: Playbook::Props::Boolean,
|
12
|
+
default: false
|
13
|
+
prop :target
|
14
|
+
prop :territory
|
15
|
+
prop :dark, type: Playbook::Props::Boolean,
|
16
|
+
default: false
|
17
|
+
|
18
|
+
def target_option
|
19
|
+
if target && home_url
|
20
|
+
target
|
21
|
+
elsif new_window
|
22
|
+
"_blank"
|
23
|
+
else
|
24
|
+
"_self"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -24,34 +24,37 @@ type LayoutPropTypes = {
|
|
24
24
|
type LayoutSideProps = {
|
25
25
|
children: React.ReactNode[] | React.ReactNode,
|
26
26
|
className?: string,
|
27
|
-
}
|
27
|
+
} & GlobalProps
|
28
28
|
|
29
29
|
type LayoutBodyProps = {
|
30
30
|
children: React.ReactNode[] | React.ReactNode,
|
31
31
|
className?: string,
|
32
|
-
}
|
32
|
+
} & GlobalProps
|
33
33
|
|
34
34
|
type LayoutItemProps = {
|
35
35
|
children: React.ReactNode[] | React.ReactNode,
|
36
36
|
className?: string,
|
37
37
|
size?: "sm" | "md" | "lg"
|
38
|
-
}
|
38
|
+
} & GlobalProps
|
39
39
|
|
40
40
|
type LayoutHeaderProps = {
|
41
41
|
children: React.ReactNode[] | React.ReactNode,
|
42
42
|
className?: string,
|
43
|
-
}
|
43
|
+
} & GlobalProps
|
44
44
|
|
45
45
|
type LayoutFooterProps = {
|
46
46
|
children: React.ReactNode[] | React.ReactNode,
|
47
47
|
className?: string,
|
48
|
-
}
|
48
|
+
} & GlobalProps
|
49
49
|
|
50
|
-
// Side component
|
51
50
|
const Side = (props: LayoutSideProps) => {
|
52
51
|
const { children, className } = props
|
52
|
+
const dynamicInlineProps = globalInlineProps(props)
|
53
53
|
return (
|
54
|
-
<div
|
54
|
+
<div
|
55
|
+
className={classnames('layout_sidebar', globalProps(props), className)}
|
56
|
+
style={dynamicInlineProps}
|
57
|
+
>
|
55
58
|
{children}
|
56
59
|
</div>
|
57
60
|
)
|
@@ -60,8 +63,12 @@ const Side = (props: LayoutSideProps) => {
|
|
60
63
|
// Body component
|
61
64
|
const Body = (props: LayoutBodyProps) => {
|
62
65
|
const { children, className } = props
|
66
|
+
const dynamicInlineProps = globalInlineProps(props)
|
63
67
|
return (
|
64
|
-
<div
|
68
|
+
<div
|
69
|
+
className={classnames('layout_body', globalProps(props), className)}
|
70
|
+
style={dynamicInlineProps}
|
71
|
+
>
|
65
72
|
{children}
|
66
73
|
</div>
|
67
74
|
)
|
@@ -71,8 +78,12 @@ const Body = (props: LayoutBodyProps) => {
|
|
71
78
|
const Item = (props: LayoutItemProps) => {
|
72
79
|
const { children, className, size = 'sm' } = props
|
73
80
|
const sizeClass = `size_${size}`
|
81
|
+
const dynamicInlineProps = globalInlineProps(props)
|
74
82
|
return (
|
75
|
-
<div
|
83
|
+
<div
|
84
|
+
className={classnames('layout_item', sizeClass, globalProps(props), className)}
|
85
|
+
style={dynamicInlineProps}
|
86
|
+
>
|
76
87
|
{children}
|
77
88
|
</div>
|
78
89
|
)
|
@@ -81,8 +92,12 @@ const Item = (props: LayoutItemProps) => {
|
|
81
92
|
// Header component
|
82
93
|
const Header = (props: LayoutHeaderProps) => {
|
83
94
|
const { children, className } = props
|
95
|
+
const dynamicInlineProps = globalInlineProps(props)
|
84
96
|
return (
|
85
|
-
<div
|
97
|
+
<div
|
98
|
+
className={classnames('layout_header', globalProps(props), className)}
|
99
|
+
style={dynamicInlineProps}
|
100
|
+
>
|
86
101
|
{children}
|
87
102
|
</div>
|
88
103
|
)
|
@@ -91,8 +106,12 @@ const Header = (props: LayoutHeaderProps) => {
|
|
91
106
|
// Footer component
|
92
107
|
const Footer = (props: LayoutFooterProps) => {
|
93
108
|
const { children, className } = props
|
109
|
+
const dynamicInlineProps = globalInlineProps(props)
|
94
110
|
return (
|
95
|
-
<div
|
111
|
+
<div
|
112
|
+
className={classnames('layout_footer', globalProps(props), className)}
|
113
|
+
style={dynamicInlineProps}
|
114
|
+
>
|
96
115
|
{children}
|
97
116
|
</div>
|
98
117
|
)
|