playbook_ui 13.22.0 → 13.23.0.pre.alpha.PLAY1284investigation2657
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/CustomCell.tsx +8 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.md +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json +278 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -6
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +28 -7
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +36 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +3 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_body/_body.scss +3 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +0 -7
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +0 -7
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +7 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +7 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -0
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +34 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +17 -1
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +18 -2
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +14 -0
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.html.erb +5 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.jsx +6 -0
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +0 -2
- data/app/pb_kits/playbook/pb_list/list.rb +0 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.md +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/{_multi_level_select_selected_ids.jsx → _multi_level_select_selected_ids_react.jsx} +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md +5 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status.scss +1 -10
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status_mixins.scss +7 -13
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.html.erb +6 -9
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx +18 -7
- data/app/pb_kits/playbook/pb_online_status/online_status.rb +1 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +2 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +2 -2
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +39 -6
- data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +17 -12
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.html.erb +11 -0
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.jsx +21 -0
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_toggle/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_toggle/toggle.rb +2 -1
- data/app/pb_kits/playbook/pb_toggle/toggle.test.js +7 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +27 -19
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/components/index.tsx +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +51 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/utilities/_positioning.scss +23 -10
- data/app/pb_kits/playbook/utilities/globalProps.ts +26 -8
- data/dist/menu.yml +4 -0
- data/dist/playbook-rails.js +7 -7
- data/lib/playbook/bottom.rb +6 -3
- data/lib/playbook/kit_base.rb +21 -1
- data/lib/playbook/left.rb +6 -3
- data/lib/playbook/pb_doc_helper.rb +1 -1
- data/lib/playbook/position_props_css.rb +17 -0
- data/lib/playbook/props/percentage.rb +2 -2
- data/lib/playbook/right.rb +6 -3
- data/lib/playbook/top.rb +6 -3
- data/lib/playbook/version.rb +2 -2
- metadata +22 -41
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +0 -278
@@ -10,13 +10,6 @@
|
|
10
10
|
picker_id: "date-picker-default-date2"
|
11
11
|
}) %>
|
12
12
|
|
13
|
-
<%= pb_rails("date_picker", props: {
|
14
|
-
default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
|
15
|
-
label: "Default Date Range",
|
16
|
-
mode: "range",
|
17
|
-
picker_id: "date-picker-default-date3"
|
18
|
-
}) %>
|
19
|
-
|
20
13
|
<%= pb_rails("date_picker", props: {
|
21
14
|
label: "Default Behavior",
|
22
15
|
picker_id: "date-picker-default-date4"
|
@@ -16,13 +16,6 @@ const DatePickerDefaultDate = (props) => (
|
|
16
16
|
pickerId="date-picker-default-date2"
|
17
17
|
{...props}
|
18
18
|
/>
|
19
|
-
<DatePicker
|
20
|
-
defaultDate={[new Date(), new Date().fp_incr(7)]}
|
21
|
-
label="Default Date Range"
|
22
|
-
mode="range"
|
23
|
-
pickerId="date-picker-default-date3"
|
24
|
-
{...props}
|
25
|
-
/>
|
26
19
|
<DatePicker
|
27
20
|
label="Default Behavior"
|
28
21
|
pickerId="date-picker-default-date4"
|
@@ -2,4 +2,11 @@
|
|
2
2
|
default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
|
3
3
|
mode: "range",
|
4
4
|
picker_id: "date-picker-range"
|
5
|
+
}) %>
|
6
|
+
|
7
|
+
<%= pb_rails("date_picker", props: {
|
8
|
+
default_date: [DateTime.current.utc.iso8601, (DateTime.current + 7.day).utc.iso8601],
|
9
|
+
label: "Default Date Range",
|
10
|
+
mode: "range",
|
11
|
+
picker_id: "date-picker-default-date3"
|
5
12
|
}) %>
|
@@ -10,6 +10,13 @@ const DatePickerRange = (props) => (
|
|
10
10
|
pickerId="date-picker-range"
|
11
11
|
{...props}
|
12
12
|
/>
|
13
|
+
<DatePicker
|
14
|
+
defaultDate={[new Date(), new Date().fp_incr(7)]}
|
15
|
+
label="Default Date Range"
|
16
|
+
mode="range"
|
17
|
+
pickerId="date-picker-default-date3"
|
18
|
+
{...props}
|
19
|
+
/>
|
13
20
|
</div>
|
14
21
|
)
|
15
22
|
|
@@ -7,7 +7,7 @@ examples:
|
|
7
7
|
- date_picker_allow_input: Allow Input
|
8
8
|
- date_picker_input: Input Field
|
9
9
|
- date_picker_label: Label
|
10
|
-
- date_picker_range: Range
|
10
|
+
# - date_picker_range: Range
|
11
11
|
- date_picker_quick_pick_rails: Range (Quick Pick)
|
12
12
|
- date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
|
13
13
|
- date_picker_quick_pick_custom: Custom Quick Pick Dates
|
@@ -37,7 +37,7 @@ examples:
|
|
37
37
|
- date_picker_label: Label
|
38
38
|
- date_picker_on_change: onChange
|
39
39
|
- date_picker_on_close: onClose
|
40
|
-
- date_picker_range: Range
|
40
|
+
# - date_picker_range: Range
|
41
41
|
- date_picker_quick_pick_react: Range (Quick Pick)
|
42
42
|
- date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
|
43
43
|
- date_picker_quick_pick_custom: Custom Quick Pick Dates
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<%= pb_rails("button", props: { type: "submit", id: object.confirm_button_id }) do %>
|
10
10
|
<%= object.confirm_button %>
|
11
11
|
<% end %>
|
12
|
-
<%= pb_rails("button", props: { data: {"close-dialog": "#{object.id}" }, id: object.cancel_button_id, variant: "link"}) do %>
|
12
|
+
<%= pb_rails("button", props: { type: "button", data: {"close-dialog": "#{object.id}" }, id: object.cancel_button_id, variant: "link"}) do %>
|
13
13
|
<%= object.cancel_button %>
|
14
14
|
<% end %>
|
15
15
|
<% end %>
|
@@ -6,8 +6,8 @@
|
|
6
6
|
**combined_html_options) do %>
|
7
7
|
<%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
|
8
8
|
<%= content.presence || object.title %>
|
9
|
-
|
10
|
-
<button class="dialog-button-class" data-close-dialog= <%= object.id %> >
|
9
|
+
|
10
|
+
<button class="dialog-button-class" type="button" data-close-dialog= <%= object.id %> >
|
11
11
|
<%= pb_rails("icon", props:{icon: "times"}) %>
|
12
12
|
</button>
|
13
13
|
<% end %>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%= pb_rails("button", props: { text: "Open Complex Dialog", data:{"open-dialog": "dialog-complex"} }) %>
|
2
2
|
|
3
3
|
<%= pb_rails("dialog", props: { id:"dialog-complex", size: "lg", full_height: true }) do %>
|
4
|
+
<form>
|
4
5
|
<%= pb_rails("dialog/dialog_header", props: { id: "dialog-complex" } ) do %>
|
5
6
|
<%= pb_rails("body", props: { text: "What do you need us to take care of?" }) %>
|
6
7
|
<% end %>
|
@@ -12,4 +13,5 @@
|
|
12
13
|
|
13
14
|
<% end %>
|
14
15
|
<%= pb_rails("dialog/dialog_footer", props: {cancel_button: "Back", confirm_button: "Send my Issue", confirm_button_id:"confirm-complex", id: "dialog-complex"}) %>
|
16
|
+
</form>
|
15
17
|
<% end %>
|
@@ -57,6 +57,36 @@
|
|
57
57
|
margin-bottom: 16px;
|
58
58
|
}
|
59
59
|
|
60
|
+
& > [class^=pb_phone_number_input]:not(:last-child) {
|
61
|
+
.text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .text_input {
|
62
|
+
border-bottom-right-radius: 0;
|
63
|
+
border-top-right-radius: 0;
|
64
|
+
border-right-width: 0;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
& > [class^=pb_phone_number_input]:not(:first-child) {
|
69
|
+
.text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .text_input {
|
70
|
+
border-bottom-left-radius: 0;
|
71
|
+
border-top-left-radius: 0;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
& > div:not(:first-child) > [class^=pb_phone_number_input] {
|
76
|
+
.text_input {
|
77
|
+
border-bottom-left-radius: 0;
|
78
|
+
border-top-left-radius: 0;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
& > div:not(:last-child) > [class^=pb_phone_number_input] {
|
83
|
+
.text_input {
|
84
|
+
border-bottom-right-radius: 0;
|
85
|
+
border-top-right-radius: 0;
|
86
|
+
border-right: none;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
60
90
|
&[class*=rails] > [class^=pb_date_picker_kit] {
|
61
91
|
margin-bottom: 0px;
|
62
92
|
}
|
@@ -82,6 +112,10 @@
|
|
82
112
|
border-bottom-right-radius: 0;
|
83
113
|
border-top-right-radius: 0;
|
84
114
|
border-right-width: 0;
|
115
|
+
&:focus {
|
116
|
+
outline: $primary solid 1px;
|
117
|
+
outline-offset: -1px;
|
118
|
+
}
|
85
119
|
}
|
86
120
|
}
|
87
121
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<div>
|
2
|
+
|
2
3
|
<%= pb_rails("form_group") do %>
|
3
|
-
<%= pb_rails("text_input", props: {
|
4
|
+
<%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
|
4
5
|
<%= pb_rails("select", props: {
|
5
6
|
blank_selection: "Genre",
|
6
7
|
options: [
|
@@ -16,4 +17,19 @@
|
|
16
17
|
]
|
17
18
|
}) %>
|
18
19
|
<% end %>
|
20
|
+
<br>
|
21
|
+
<br>
|
22
|
+
<%= pb_rails("form_group") do %>
|
23
|
+
<%= pb_rails("select", props: {
|
24
|
+
blank_selection: "Phone",
|
25
|
+
options: [
|
26
|
+
{ value: "Cell" },
|
27
|
+
{ value: "Work" },
|
28
|
+
{ value: "Home" },
|
29
|
+
]
|
30
|
+
}) %>
|
31
|
+
<%= pb_rails("phone_number_input", props: {
|
32
|
+
id: "phone"
|
33
|
+
}) %>
|
34
|
+
<% end %>
|
19
35
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
|
3
3
|
import FormGroup from '../_form_group'
|
4
|
-
|
4
|
+
import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
|
5
5
|
import Select from '../../pb_select/_select'
|
6
6
|
import TextInput from '../../pb_text_input/_text_input'
|
7
7
|
|
@@ -18,11 +18,16 @@ const FormGroupSelect = (props) => {
|
|
18
18
|
{ value: 'Other' },
|
19
19
|
]
|
20
20
|
|
21
|
+
const phoneOptions = [
|
22
|
+
{ value: 'Cell' },
|
23
|
+
{ value: 'Work' },
|
24
|
+
{ value: 'Home' },
|
25
|
+
]
|
26
|
+
|
21
27
|
return (
|
22
28
|
<div>
|
23
29
|
<FormGroup>
|
24
30
|
<TextInput
|
25
|
-
label="Artist"
|
26
31
|
placeholder="Enter Artist Name"
|
27
32
|
{...props}
|
28
33
|
/>
|
@@ -32,6 +37,17 @@ const FormGroupSelect = (props) => {
|
|
32
37
|
{...props}
|
33
38
|
/>
|
34
39
|
</FormGroup>
|
40
|
+
<br />
|
41
|
+
<br />
|
42
|
+
<FormGroup>
|
43
|
+
<Select
|
44
|
+
blankSelection="Phone"
|
45
|
+
options={phoneOptions}
|
46
|
+
/>
|
47
|
+
<PhoneNumberInput
|
48
|
+
id='default'
|
49
|
+
/>
|
50
|
+
</FormGroup>
|
35
51
|
</div>
|
36
52
|
)
|
37
53
|
}
|
@@ -5,6 +5,7 @@
|
|
5
5
|
@import "../pb_icon/icon";
|
6
6
|
|
7
7
|
$pb_icon_circle_sizes: (
|
8
|
+
"xxs": 16px,
|
8
9
|
"xs": 28px,
|
9
10
|
"sm": 38px,
|
10
11
|
"md": 60px,
|
@@ -13,6 +14,16 @@ $pb_icon_circle_sizes: (
|
|
13
14
|
"xl": 100px,
|
14
15
|
);
|
15
16
|
|
17
|
+
@mixin svg_size($name, $match, $adjust) {
|
18
|
+
@if $name == $match {
|
19
|
+
$svg_xy: $adjust;
|
20
|
+
& > svg {
|
21
|
+
width: #{$svg_xy};
|
22
|
+
height: #{$svg_xy};
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
16
27
|
[class^=pb_icon_circle_kit] {
|
17
28
|
display: flex;
|
18
29
|
justify-content: center;
|
@@ -51,6 +62,8 @@ $pb_icon_circle_sizes: (
|
|
51
62
|
flex-shrink: 0;
|
52
63
|
flex-grow: 0;
|
53
64
|
flex-basis: $size;
|
65
|
+
|
66
|
+
@include svg_size($name, "xxs", $size - 6px);
|
54
67
|
}
|
55
68
|
}
|
56
69
|
|
@@ -64,3 +77,4 @@ $pb_icon_circle_sizes: (
|
|
64
77
|
}
|
65
78
|
}
|
66
79
|
}
|
80
|
+
|
@@ -15,7 +15,7 @@ type IconCircleProps = {
|
|
15
15
|
icon: string,
|
16
16
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
17
17
|
id?: string,
|
18
|
-
size?: "base" | "xs" | "sm" | "md" | "lg" | "xl",
|
18
|
+
size?: "base" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
|
19
19
|
variant?: | "default"
|
20
20
|
| "royal"
|
21
21
|
| "blue"
|
@@ -7,7 +7,7 @@ module Playbook
|
|
7
7
|
prop :emoji, type: Playbook::Props::String,
|
8
8
|
default: ""
|
9
9
|
prop :size, type: Playbook::Props::Enum,
|
10
|
-
values: %w[xs sm md base lg xl],
|
10
|
+
values: %w[xxs xs sm md base lg xl],
|
11
11
|
default: "md"
|
12
12
|
prop :variant, type: Playbook::Props::Enum,
|
13
13
|
values: %w[default royal blue orange purple teal red yellow green orange],
|
@@ -41,7 +41,6 @@ module Playbook
|
|
41
41
|
dark ? "dark" : nil
|
42
42
|
end
|
43
43
|
|
44
|
-
# rubocop:disable Style/CaseLikeIf
|
45
44
|
def layout_class
|
46
45
|
if layout == "right"
|
47
46
|
"layout_right"
|
@@ -51,7 +50,6 @@ module Playbook
|
|
51
50
|
""
|
52
51
|
end
|
53
52
|
end
|
54
|
-
# rubocop:enable Style/CaseLikeIf
|
55
53
|
|
56
54
|
def size_class
|
57
55
|
size ? "large" : nil
|
@@ -1,5 +1,5 @@
|
|
1
|
-
`selected_ids`
|
1
|
+
`selected_ids` is an optional prop that accepts an array of ids that, if present, will mark the corresponding nodes on the treeData as checked on page load.
|
2
2
|
|
3
3
|
Items that include `checked:true` on the treeData itself will also be selected on page load, even without being passed to `selectedIds`.
|
4
4
|
|
5
|
-
When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
|
5
|
+
When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
|
@@ -68,7 +68,7 @@ const treeData = [
|
|
68
68
|
},
|
69
69
|
];
|
70
70
|
|
71
|
-
const
|
71
|
+
const MultiLevelSelectSelectedIdsReact = (props) => {
|
72
72
|
return (
|
73
73
|
<div>
|
74
74
|
<MultiLevelSelect
|
@@ -85,4 +85,4 @@ const MultiLevelSelectSelectedIds = (props) => {
|
|
85
85
|
);
|
86
86
|
};
|
87
87
|
|
88
|
-
export default
|
88
|
+
export default MultiLevelSelectSelectedIdsReact;
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
`selected_ids` is an optional prop that accepts an array of ids and controls the selected state of the tree nodes that match the values passed. When used within react-hook-form, this prop can be used to manage the selected state of any ids passed to it.
|
2
|
+
|
3
|
+
Items that include `checked:true` on the treeData itself will also be selected on page load, even without being passed to `selectedIds`.
|
4
|
+
|
5
|
+
When an item is marked as checked on page load by any means, the dropdown will expand to show the checked items for easier accessibility.
|
@@ -12,4 +12,4 @@ examples:
|
|
12
12
|
- multi_level_select_single: Single Select
|
13
13
|
- multi_level_select_single_children_only: Single Select w/ Hidden Radios
|
14
14
|
- multi_level_select_return_all_selected: Return All Selected
|
15
|
-
-
|
15
|
+
- multi_level_select_selected_ids_react: Selected Ids
|
@@ -2,4 +2,4 @@ export { default as MultiLevelSelectDefault } from './_multi_level_select_defaul
|
|
2
2
|
export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
|
3
3
|
export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_select_single_children_only.jsx'
|
4
4
|
export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
|
5
|
-
export { default as
|
5
|
+
export { default as MultiLevelSelectSelectedIdsReact } from "./_multi_level_select_selected_ids_react.jsx"
|
@@ -5,16 +5,7 @@
|
|
5
5
|
|
6
6
|
@each $status_name, $status_value in $pb_online_status_statuses {
|
7
7
|
&[class*=_#{$status_name}] {
|
8
|
-
|
8
|
+
@include pb_online_status($status_value);
|
9
9
|
}
|
10
10
|
}
|
11
|
-
&[class*=_online] {
|
12
|
-
@include pb_online_status_online;
|
13
|
-
}
|
14
|
-
&[class*=_away] {
|
15
|
-
@include pb_online_status_away;
|
16
|
-
}
|
17
|
-
&[class*=_offline] {
|
18
|
-
@include pb_online_status_offline;
|
19
|
-
}
|
20
11
|
}
|
@@ -10,7 +10,7 @@ type OnlineStatusProps = {
|
|
10
10
|
data?: {[key: string]: string | number},
|
11
11
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
12
|
id?: string,
|
13
|
-
status?: "
|
13
|
+
status?: "away" | "error" | "info" | "neutral" | "offline" |"online" | "primary"| "success" | "warning",
|
14
14
|
} & GlobalProps
|
15
15
|
|
16
16
|
const OnlineStatus = (props: OnlineStatusProps) => {
|
@@ -7,6 +7,12 @@ $pb_online_status_statuses: (
|
|
7
7
|
online: $success,
|
8
8
|
away: $warning,
|
9
9
|
offline: $neutral,
|
10
|
+
success: $success,
|
11
|
+
warning: $warning,
|
12
|
+
error: $error,
|
13
|
+
info: $info,
|
14
|
+
neutral: $neutral,
|
15
|
+
primary: $primary,
|
10
16
|
);
|
11
17
|
|
12
18
|
@mixin pb_online_status($background: $neutral) {
|
@@ -23,16 +29,4 @@ $pb_online_status_statuses: (
|
|
23
29
|
border-style: solid;
|
24
30
|
border-radius: 50%;
|
25
31
|
background: $background;
|
26
|
-
}
|
27
|
-
|
28
|
-
@mixin pb_online_status_away {
|
29
|
-
@include pb_online_status($warning);
|
30
|
-
}
|
31
|
-
|
32
|
-
@mixin pb_online_status_online {
|
33
|
-
@include pb_online_status($success);
|
34
|
-
}
|
35
|
-
|
36
|
-
@mixin pb_online_status_offline {
|
37
|
-
@include pb_online_status($neutral);
|
38
|
-
}
|
32
|
+
}
|
@@ -1,9 +1,6 @@
|
|
1
|
-
<%= pb_rails("online_status", props: { status: "offline" }) %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<%= pb_rails("online_status", props: { status: "
|
6
|
-
|
7
|
-
<br>
|
8
|
-
|
9
|
-
<%= pb_rails("online_status", props: { status: "away" }) %>
|
1
|
+
<%= pb_rails("online_status", props: { status: "offline", margin_y: "xs" }) %>
|
2
|
+
<%= pb_rails("online_status", props: { status: "online", margin_y: "xs" }) %>
|
3
|
+
<%= pb_rails("online_status", props: { status: "away", margin_y: "xs" }) %>
|
4
|
+
<%= pb_rails("online_status", props: { status: "error", margin_y: "xs" }) %>
|
5
|
+
<%= pb_rails("online_status", props: { status: "info", margin_y: "xs" }) %>
|
6
|
+
<%= pb_rails("online_status", props: { status: "primary", margin_y: "xs" }) %>
|
@@ -5,24 +5,35 @@ import OnlineStatus from '../_online_status'
|
|
5
5
|
const OnlineStatusDefault = (props) => (
|
6
6
|
<>
|
7
7
|
<OnlineStatus
|
8
|
+
marginY="xs"
|
8
9
|
status="offline"
|
9
10
|
{...props}
|
10
11
|
/>
|
11
|
-
|
12
|
-
<br />
|
13
|
-
|
14
12
|
<OnlineStatus
|
13
|
+
marginY="xs"
|
15
14
|
status="online"
|
16
15
|
{...props}
|
17
16
|
/>
|
18
|
-
|
19
|
-
<br />
|
20
|
-
|
21
17
|
<OnlineStatus
|
18
|
+
marginY="xs"
|
22
19
|
status="away"
|
23
20
|
{...props}
|
24
21
|
/>
|
25
|
-
|
22
|
+
<OnlineStatus
|
23
|
+
marginY="xs"
|
24
|
+
status="error"
|
25
|
+
{...props}
|
26
|
+
/>
|
27
|
+
<OnlineStatus
|
28
|
+
marginY="xs"
|
29
|
+
status="info"
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
<OnlineStatus
|
33
|
+
marginY="xs"
|
34
|
+
status="primary"
|
35
|
+
{...props}
|
36
|
+
/>
|
26
37
|
</>
|
27
38
|
)
|
28
39
|
|
@@ -4,7 +4,7 @@ module Playbook
|
|
4
4
|
module PbOnlineStatus
|
5
5
|
class OnlineStatus < Playbook::KitBase
|
6
6
|
prop :status, type: Playbook::Props::Enum,
|
7
|
-
values: %w[online offline away],
|
7
|
+
values: %w[online offline away success warning error info neutral primary],
|
8
8
|
default: "offline"
|
9
9
|
|
10
10
|
def classname
|
@@ -1 +1,2 @@
|
|
1
|
-
<%= pb_rails("pagination", props: { model: @users, view: self}) %>
|
1
|
+
<%= pb_rails("pagination", props: { model: @users, view: self}) %>
|
2
|
+
|
data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<form id="example-form-validation" action="" method="get">
|
2
|
-
<%= pb_rails("phone_number_input", props: { error: "Missing phone number
|
2
|
+
<%= pb_rails("phone_number_input", props: { error: "Missing phone number", id: "validation", initial_country: "af", value: "", required: true }) %>
|
3
3
|
<%= pb_rails("button", props: {html_type: "submit", text: "Save Phone Number"}) %>
|
4
4
|
</form>
|
5
5
|
|
@@ -9,4 +9,4 @@
|
|
9
9
|
if (e.target.querySelectorAll('[error]:not([error=""])').length > 0) e.preventDefault();
|
10
10
|
})
|
11
11
|
})
|
12
|
-
<% end %>
|
12
|
+
<% end %>
|
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
$color_checkbox_success: $data_1;
|
4
4
|
$color_checkbox_default: $border_light;
|
5
|
+
$color_disabled: darken($border_light, 20%);
|
5
6
|
$transition: .2s ease-in-out;
|
6
7
|
|
7
8
|
[class^=pb_toggle_kit] {
|
8
9
|
position: relative;
|
9
10
|
$width: 44px;
|
10
|
-
$height: $width/2;
|
11
|
+
$height: $width / 2;
|
11
12
|
$border_success: 3px solid $color_checkbox_success;
|
12
13
|
$border_default: 3px solid $color_checkbox_default;
|
13
14
|
|
14
|
-
|
15
15
|
.pb_toggle_wrapper {
|
16
16
|
.pb_toggle_control {
|
17
17
|
cursor: pointer;
|
@@ -23,10 +23,11 @@ $transition: .2s ease-in-out;
|
|
23
23
|
border: $border_default;
|
24
24
|
position: relative;
|
25
25
|
box-sizing: content-box;
|
26
|
+
|
26
27
|
&:after {
|
27
28
|
transition: $transition;
|
28
29
|
content: "";
|
29
|
-
width: $width/2 - 4px;
|
30
|
+
width: $width / 2 - 4px;
|
30
31
|
height: $height - 4px;
|
31
32
|
background-color: $color_checkbox_default;
|
32
33
|
border-radius: 50%;
|
@@ -34,23 +35,55 @@ $transition: .2s ease-in-out;
|
|
34
35
|
top: 2px;
|
35
36
|
left: 2px;
|
36
37
|
}
|
38
|
+
|
37
39
|
&:hover {
|
38
40
|
border: $border_success;
|
39
|
-
|
41
|
+
|
42
|
+
&:after {
|
40
43
|
background-color: $color_checkbox_success;
|
41
44
|
}
|
42
45
|
}
|
43
46
|
}
|
47
|
+
|
44
48
|
input {
|
45
49
|
display: none;
|
50
|
+
|
51
|
+
&:disabled + .pb_toggle_control {
|
52
|
+
cursor: not-allowed;
|
53
|
+
opacity: 0.5;
|
54
|
+
border: 3px solid $border_light;
|
55
|
+
background-color: $border_light;
|
56
|
+
|
57
|
+
&:after {
|
58
|
+
background-color: darken($neutral, 15%);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
input:checked {
|
64
|
+
display: none;
|
65
|
+
|
46
66
|
&:checked + .pb_toggle_control {
|
47
67
|
border: $border_success;
|
48
68
|
background-color: $color_checkbox_success;
|
49
|
-
|
50
|
-
|
69
|
+
|
70
|
+
&:after {
|
71
|
+
left: $width / 2 + 2px;
|
51
72
|
background-color: $white;
|
52
73
|
}
|
53
74
|
}
|
75
|
+
|
76
|
+
&:disabled + .pb_toggle_control {
|
77
|
+
cursor: not-allowed;
|
78
|
+
opacity: 0.5;
|
79
|
+
border: 3px solid $text_lt_light;
|
80
|
+
background-color: $text_lt_light;
|
81
|
+
|
82
|
+
&:after {
|
83
|
+
background-color: $neutral;
|
84
|
+
}
|
85
|
+
}
|
54
86
|
}
|
55
87
|
}
|
56
88
|
}
|
89
|
+
|