playbook_ui 13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2345 → 13.19.0.pre.alpha.play1186collapsiblenaviconcolorbug2321
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_fixed_confirmation_toast/_fixed_confirmation_toast.scss +3 -7
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -45
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +11 -62
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -2
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +2 -2
- data/app/pb_kits/playbook/pb_table/styles/_structure.scss +2 -4
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +39 -49
- data/app/pb_kits/playbook/pb_table/table_header.rb +1 -8
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +7 -17
- data/app/pb_kits/playbook/pb_table/table_row.rb +1 -8
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -9
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.jsx +0 -20
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +1 -2
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -1
- data/dist/playbook-rails.js +3 -3
- data/lib/playbook/version.rb +1 -1
- metadata +2 -13
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.md +0 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.md +0 -3
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_body.rb +0 -15
- data/app/pb_kits/playbook/pb_table/table_cell.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_cell.rb +0 -17
- data/app/pb_kits/playbook/pb_table/table_head.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_head.rb +0 -15
- data/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4a0c9535e1e8a18819885ccf9f8a0cb1f99d043dfe98b8139e1c5eb25538a07
|
4
|
+
data.tar.gz: 8d1b59b1dba9d078a97621ad906f6e73ec52e18104b6b1b286188cd4041f64fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e8d6d9fbf50224808ef954c507edddd5a6960ae123af18130915008ab45bd8992c1443259ab04cb70f5f48930c889de87dfacbbf7b2296c4a84545240762a18
|
7
|
+
data.tar.gz: 2d1d0a1c3dcef04a3fb90b667aa6bbbf3410a36c5b8a2ce12dc08d24c340608656573bf3f5188569ac44658affc245f81afb6cb3440a4f1f4f4f5d9400b4a7bb
|
@@ -36,8 +36,6 @@ $confirmation_toast_colors: (
|
|
36
36
|
z-index: $z_9;
|
37
37
|
display: flex;
|
38
38
|
justify-content: space-around;
|
39
|
-
max-width: max-content;
|
40
|
-
width: 90%;
|
41
39
|
|
42
40
|
&.top {
|
43
41
|
top: $space_md;
|
@@ -84,11 +82,9 @@ $confirmation_toast_colors: (
|
|
84
82
|
|
85
83
|
&[class*=_multi_line] .pb_fixed_confirmation_toast_text {
|
86
84
|
color: $white;
|
87
|
-
|
88
|
-
|
89
|
-
-
|
90
|
-
-webkit-box-orient: vertical;
|
91
|
-
white-space: normal;
|
85
|
+
margin: 0 $space_md 0 $space_md;
|
86
|
+
max-width: 100%;
|
87
|
+
white-space: break-spaces;
|
92
88
|
}
|
93
89
|
}
|
94
90
|
}
|
@@ -1,49 +1,5 @@
|
|
1
|
-
<%= pb_rails("button", props: { text: "Short Multiline", variant: "secondary", data: { toast: "#toast-top-center-multi-short" } }) %>
|
2
|
-
|
3
1
|
<%= pb_rails("fixed_confirmation_toast", props: {
|
4
|
-
classname: "toast-to-hide",
|
5
|
-
closeable: true,
|
6
|
-
id: "toast-top-center-multi-short",
|
7
2
|
multi_line: true,
|
8
|
-
text: "
|
3
|
+
text: "Scan to Assign Selected Items. Click here to generate report",
|
9
4
|
status: "tip",
|
10
|
-
vertical: "top",
|
11
|
-
horizontal: "center"
|
12
5
|
}) %>
|
13
|
-
|
14
|
-
<%= pb_rails("button", props: { text: "Long Multiline", variant: "secondary", data: { toast: "#toast-top-center-multi-long" } }) %>
|
15
|
-
|
16
|
-
<%= pb_rails("fixed_confirmation_toast", props: {
|
17
|
-
classname: "toast-to-hide",
|
18
|
-
closeable: true,
|
19
|
-
id: "toast-top-center-multi-long",
|
20
|
-
multi_line: true,
|
21
|
-
text: "Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.",
|
22
|
-
status: "tip",
|
23
|
-
vertical: "top",
|
24
|
-
horizontal: "center"
|
25
|
-
}) %>
|
26
|
-
|
27
|
-
<script type="text/javascript">
|
28
|
-
const alltoasts = document.queryselectorall(".toast-to-hide")
|
29
|
-
const allbuttons = document.queryselectorall("button[data-toast]")
|
30
|
-
|
31
|
-
const hidealltoasts = () => {
|
32
|
-
alltoasts.foreach((toast) => {
|
33
|
-
toast.style.display = "none"
|
34
|
-
})
|
35
|
-
}
|
36
|
-
|
37
|
-
hidealltoasts()
|
38
|
-
|
39
|
-
allbuttons.foreach((button) => {
|
40
|
-
button.onclick = () => {
|
41
|
-
hidealltoasts()
|
42
|
-
let toast = document.queryselector(button.getattribute("data-toast"))
|
43
|
-
|
44
|
-
if (toast) {
|
45
|
-
toast.style.display = "flex"
|
46
|
-
}
|
47
|
-
}
|
48
|
-
})
|
49
|
-
</script>
|
data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
CHANGED
@@ -1,69 +1,18 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react'
|
2
2
|
|
3
|
-
import Button from '../../pb_button/_button'
|
4
3
|
import FixedConfirmationToast from '../_fixed_confirmation_toast'
|
5
4
|
|
6
5
|
const FixedConfirmationToastMultiLine = (props) => {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const handleCloseShort = () => {
|
19
|
-
setOpenShort(false)
|
20
|
-
}
|
21
|
-
|
22
|
-
const handleCloseLong= () => {
|
23
|
-
setOpenLong(false)
|
24
|
-
}
|
25
|
-
|
26
|
-
return (
|
27
|
-
<>
|
28
|
-
<Button
|
29
|
-
onClick={handleClickShort}
|
30
|
-
text="Short Multiline"
|
31
|
-
variant="secondary"
|
32
|
-
{...props}
|
33
|
-
/>
|
34
|
-
{' '}
|
35
|
-
<Button
|
36
|
-
onClick={handleClickLong}
|
37
|
-
text="Long Multiline"
|
38
|
-
variant="secondary"
|
39
|
-
{...props}
|
40
|
-
/>
|
41
|
-
|
42
|
-
<FixedConfirmationToast
|
43
|
-
closeable
|
44
|
-
horizontal='center'
|
45
|
-
multiLine
|
46
|
-
onClose={handleCloseShort}
|
47
|
-
open={openShort}
|
48
|
-
status='tip'
|
49
|
-
text='Multi-line is used when the given text will not fit on one line.'
|
50
|
-
vertical='top'
|
51
|
-
{...props}
|
52
|
-
/>
|
53
|
-
|
54
|
-
<FixedConfirmationToast
|
55
|
-
closeable
|
56
|
-
horizontal='center'
|
57
|
-
multiLine
|
58
|
-
onClose={handleCloseLong}
|
59
|
-
open={openLong}
|
60
|
-
status='tip'
|
61
|
-
text='Multi-line is used when the given text will not fit on one line. Using Multi Line allows the height of the confirmation toast to grow. Simply resize the screen to see the fixed confirmation toast wrap the text.'
|
62
|
-
vertical='top'
|
63
|
-
{...props}
|
64
|
-
/>
|
65
|
-
</>
|
66
|
-
)
|
6
|
+
return (
|
7
|
+
<div>
|
8
|
+
<FixedConfirmationToast
|
9
|
+
multiLine
|
10
|
+
status="tip"
|
11
|
+
text="Scan to Assign Selected Items. Click here to generate report"
|
12
|
+
{...props}
|
13
|
+
/>
|
14
|
+
</div>
|
15
|
+
)
|
67
16
|
}
|
68
17
|
|
69
18
|
export default FixedConfirmationToastMultiLine
|
@@ -8,8 +8,8 @@
|
|
8
8
|
<% if content %>
|
9
9
|
<%= content %>
|
10
10
|
<% elsif object.show_text? %>
|
11
|
-
<%= pb_rails("title", props: { text: object.text, size: 4,
|
11
|
+
<%= pb_rails("title", props: { text: object.text, size: 4, classname: "pb_fixed_confirmation_toast_text" }) %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%= pb_rails("icon", props: { icon: "times", classname: "pb_icon", cursor: "pointer"
|
14
|
+
<%= pb_rails("icon", props: { icon: "times", classname: "pb_icon", cursor: "pointer" }) if object.closeable %>
|
15
15
|
<% end %>
|
@@ -25,9 +25,6 @@ examples:
|
|
25
25
|
- table_with_background_kit: Table With Background Kit
|
26
26
|
- table_vertical_border: Vertical Borders
|
27
27
|
- table_striped: Striped Table
|
28
|
-
- table_with_subcomponents: Table with Sub Components (Table Elements)
|
29
|
-
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
30
|
-
|
31
28
|
|
32
29
|
react:
|
33
30
|
# - table_div: Div
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[class^=pb_table] {
|
2
2
|
&.striped {
|
3
3
|
tbody, .pb_table_tbody {
|
4
|
-
tr:nth-child(odd), .
|
4
|
+
tr:nth-child(odd), .tr:nth-child(odd) {
|
5
5
|
background-color: $bg_light;
|
6
6
|
}
|
7
7
|
}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
&.dark {
|
11
11
|
&.striped {
|
12
12
|
tbody, .pb_table_tbody {
|
13
|
-
tr:nth-child(odd), .
|
13
|
+
tr:nth-child(odd), .tr:nth-child(odd) {
|
14
14
|
background-color: $bg_dark;
|
15
15
|
}
|
16
16
|
}
|
@@ -48,8 +48,7 @@
|
|
48
48
|
}
|
49
49
|
}
|
50
50
|
&.data_table {
|
51
|
-
thead tr th
|
52
|
-
.pb_table_thead .pb_table_tr .pb_table_th {
|
51
|
+
thead tr th {
|
53
52
|
padding-top: $cell-pad-sm;
|
54
53
|
padding-bottom: $cell-pad-sm;
|
55
54
|
&:first-child {
|
@@ -59,8 +58,7 @@
|
|
59
58
|
padding-right: $cell-pad-sm;
|
60
59
|
}
|
61
60
|
}
|
62
|
-
tbody tr td
|
63
|
-
.pb_table_tbody .pb_table_tr .pb_table_td {
|
61
|
+
tbody tr td {
|
64
62
|
padding-top: $cell-pad-sm;
|
65
63
|
padding-bottom: $cell-pad-sm;
|
66
64
|
&:first-child {
|
@@ -1,57 +1,47 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%=
|
1
|
+
<%= content_tag(:th,
|
2
|
+
colspan: object.colspan,
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: "pb-th#{object.id}" ) do %>
|
7
|
+
<% unless sorting_style? %>
|
8
|
+
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_nolink" }) do %>
|
9
|
+
<%= content.presence || object.text %>
|
10
|
+
<% end %>
|
11
|
+
<% else %>
|
12
|
+
<%= link_to next_link, style: link_style do %>
|
13
|
+
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_link" }) do %>
|
10
14
|
<%= content.presence || object.text %>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% if sorting_style? %>
|
17
|
-
<%= pb_rails("icon", props: { icon: object.sort_icon(active_item[:direction], active_item[:active]),
|
18
|
-
fixed_width: true,
|
19
|
-
classname: active_item.any? ? "pb_th_active" : "",
|
20
|
-
padding_left: "xs" }) %>
|
21
|
-
<% end %>
|
15
|
+
<% if sorting_style? %>
|
16
|
+
<%= pb_rails("icon", props: { icon: object.sort_icon(active_item[:direction], active_item[:active]),
|
17
|
+
fixed_width: true,
|
18
|
+
classname: active_item.any? ? "pb_th_active" : "",
|
19
|
+
padding_left: "xs" }) %>
|
22
20
|
<% end %>
|
23
21
|
<% end %>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
22
|
+
<% end %>
|
23
|
+
<% if use_dropdown_select %>
|
24
|
+
<%= pb_rails("popover", props: { classname: "pb_filter_sort_menu",
|
25
|
+
close_on_click: "outside",
|
26
|
+
trigger_element_id: "pb-th#{object.id}",
|
27
|
+
tooltip_id: "sort-filter-btn-tooltip#{object.id}",
|
28
|
+
position: object.placement ,
|
29
|
+
padding: 'none'}) do %>
|
30
|
+
<%= pb_rails("nav", props: {classname: "pb_table_header_dropdown"}) do %>
|
31
|
+
<% object.sort_items.each do |sort_item| %>
|
32
|
+
<% item = active_or_first_item(sort_items_for(sort_item)) %>
|
33
|
+
<%= pb_rails("nav/item", props: {
|
34
|
+
text: item[:item],
|
35
|
+
link: next_link(sort_item: sort_item),
|
36
|
+
highlighted_border: false,
|
37
|
+
padding: "xs",
|
38
|
+
icon_right: sort_icon(item[:direction], item[:active]),
|
39
|
+
active: item[:active],
|
40
|
+
classname: "header_nav_item"
|
41
|
+
}) %>
|
44
42
|
<% end %>
|
45
43
|
<% end %>
|
46
44
|
<% end %>
|
47
45
|
<% end %>
|
48
46
|
<% end %>
|
49
|
-
<%
|
50
|
-
<%= content_tag(:div,
|
51
|
-
aria: object.aria,
|
52
|
-
class: object.classname,
|
53
|
-
data: object.data,
|
54
|
-
id: object.id) do %>
|
55
|
-
<%= content.presence || object.text %>
|
56
|
-
<% end %>
|
57
|
-
<% end %>
|
47
|
+
<% end %>
|
@@ -23,16 +23,9 @@ module Playbook
|
|
23
23
|
default: ""
|
24
24
|
prop :sort_dropdown, type: Playbook::Props::Boolean,
|
25
25
|
default: false
|
26
|
-
prop :tag, type: Playbook::Props::Enum,
|
27
|
-
values: %w[table div],
|
28
|
-
default: "table"
|
29
26
|
|
30
27
|
def classname
|
31
|
-
generate_classname("pb_table_header_kit", align_class)
|
32
|
-
end
|
33
|
-
|
34
|
-
def tag_class
|
35
|
-
" pb_table_th"
|
28
|
+
generate_classname("pb_table_header_kit", align_class)
|
36
29
|
end
|
37
30
|
|
38
31
|
def align_class
|
@@ -1,17 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<% end %>
|
9
|
-
<% else %>
|
10
|
-
<%= content_tag(:div,
|
11
|
-
aria: object.aria,
|
12
|
-
class: object.classname,
|
13
|
-
data: object.data,
|
14
|
-
id: object.id) do %>
|
15
|
-
<%= content.presence %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
1
|
+
<%= content_tag(:tr,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
6
|
+
<%= content.presence %>
|
7
|
+
<% end %>
|
@@ -5,21 +5,14 @@ module Playbook
|
|
5
5
|
class TableRow < Playbook::KitBase
|
6
6
|
prop :side_highlight_color, type: Playbook::Props::String,
|
7
7
|
default: "none"
|
8
|
-
prop :tag, type: Playbook::Props::Enum,
|
9
|
-
values: %w[table div],
|
10
|
-
default: "table"
|
11
8
|
|
12
9
|
def classname
|
13
|
-
generate_classname("pb_table_row_kit", side_highlight_class)
|
10
|
+
generate_classname("pb_table_row_kit", side_highlight_class)
|
14
11
|
end
|
15
12
|
|
16
13
|
def side_highlight_class
|
17
14
|
side_highlight_color.present? ? "side_highlight_#{side_highlight_color}" : nil
|
18
15
|
end
|
19
|
-
|
20
|
-
def tag_class
|
21
|
-
" pb_table_tr"
|
22
|
-
end
|
23
16
|
end
|
24
17
|
end
|
25
18
|
end
|
@@ -27,7 +27,7 @@ type TextInputProps = {
|
|
27
27
|
required?: boolean,
|
28
28
|
type: string,
|
29
29
|
value: string | number,
|
30
|
-
children:
|
30
|
+
children: Node,
|
31
31
|
addOn?: {
|
32
32
|
icon?: string,
|
33
33
|
alignment?: "right" | "left",
|
@@ -85,12 +85,8 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
85
85
|
icon={icon}
|
86
86
|
/>
|
87
87
|
)
|
88
|
-
|
89
|
-
const childInput = children ? children.type === "input" : undefined
|
90
|
-
|
91
88
|
const textInput = (
|
92
|
-
|
93
|
-
(<input
|
89
|
+
<input
|
94
90
|
{...domSafeProps(props)}
|
95
91
|
className="text_input"
|
96
92
|
disabled={disabled}
|
@@ -103,7 +99,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
103
99
|
required={required}
|
104
100
|
type={type}
|
105
101
|
value={value}
|
106
|
-
/>
|
102
|
+
/>
|
107
103
|
)
|
108
104
|
|
109
105
|
const addOnInput = (
|
@@ -135,7 +131,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
135
131
|
)
|
136
132
|
|
137
133
|
const render = (() => {
|
138
|
-
if
|
134
|
+
if(children) return children
|
139
135
|
if (shouldShowAddOn) return addOnInput
|
140
136
|
|
141
137
|
return textInput
|
@@ -148,7 +144,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
148
144
|
{...htmlProps}
|
149
145
|
className={css}
|
150
146
|
>
|
151
|
-
{label &&
|
147
|
+
{label &&
|
152
148
|
<Caption
|
153
149
|
className="pb_text_input_kit_label"
|
154
150
|
text={label}
|
@@ -58,16 +58,6 @@ const TextInputAddOn = (props) => {
|
|
58
58
|
{...props}
|
59
59
|
/>
|
60
60
|
</div>
|
61
|
-
<div>
|
62
|
-
<TextInput
|
63
|
-
addOn={{ icon: 'frog', alignment: 'right', border: true }}
|
64
|
-
label="Right-Aligned Add On With Child Input"
|
65
|
-
onChange={handleUpdateFourthInput}
|
66
|
-
{...props}
|
67
|
-
>
|
68
|
-
<input />
|
69
|
-
</TextInput>
|
70
|
-
</div>
|
71
61
|
<div>
|
72
62
|
<TextInput
|
73
63
|
addOn={{ icon: 'percent', alignment: 'left', border: false }}
|
@@ -86,16 +76,6 @@ const TextInputAddOn = (props) => {
|
|
86
76
|
{...props}
|
87
77
|
/>
|
88
78
|
</div>
|
89
|
-
<div>
|
90
|
-
<TextInput
|
91
|
-
addOn={{ icon: 'frog', alignment: 'left', border: true }}
|
92
|
-
label="Left-Aligned Add On With Child Input"
|
93
|
-
onChange={handleUpdateFourthInput}
|
94
|
-
{...props}
|
95
|
-
>
|
96
|
-
<input />
|
97
|
-
</TextInput>
|
98
|
-
</div>
|
99
79
|
</>
|
100
80
|
)
|
101
81
|
}
|
@@ -7,5 +7,4 @@
|
|
7
7
|
| **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
|
8
8
|
| **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
|
9
9
|
| **territory** | `String` | Adds the User's territory | | |
|
10
|
-
| **title** | `String` | Adds a title | | |
|
11
|
-
| **status** | `PBAvatar.PresenceStatus?` | An idicator for the current status of the user | `.none` | `.online` `.away` `.offline` |
|
10
|
+
| **title** | `String` | Adds a title | | |
|