playbook_ui 13.27.0.pre.alpha.PLAY1349checkboxzindexsticky2936 → 13.27.0.pre.alpha.PLAY11782916
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 +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -1
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_badge/badge.html.erb +6 -1
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +6 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +10 -21
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +75 -3
- data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_collapsible/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_collapsible/index.js +6 -16
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_currency/currency.html.erb +6 -1
- data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date/date.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_time/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +4 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +3 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +6 -11
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +2 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +8 -13
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +2 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +8 -13
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +8 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +5 -1
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +12 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -6
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +6 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/pb_pagination/_pagination.scss +1 -1
- data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +6 -1
- data/app/pb_kits/playbook/pb_person/person.html.erb +6 -1
- data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_pill/pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +6 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +0 -8
- data/app/pb_kits/playbook/pb_select/_select.tsx +13 -1
- data/app/pb_kits/playbook/pb_source/source.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +5 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -19
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +5 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +6 -1
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/kit_base.rb +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -32
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +0 -92
- data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.html.erb +0 -15
- data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb +0 -37
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +0 -72
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md +0 -3
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +0 -19
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md +0 -3
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx +0 -73
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.md +0 -3
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.html.erb +0 -20
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.md +0 -3
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md +0 -61
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md +0 -11
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md +0 -32
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md +0 -17
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md +0 -19
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md +0 -10
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md +0 -17
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md +0 -39
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md +0 -39
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md +0 -15
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md +0 -78
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md +0 -23
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md +0 -7
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md +0 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md +0 -22
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md +0 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md +0 -62
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +0 -8
- data/lib/playbook/forms/builder/phone_number_field.rb +0 -12
@@ -30,19 +30,14 @@
|
|
30
30
|
<%= pb_rails("dropdown/dropdown_container") do %>
|
31
31
|
<% options.each do |option| %>
|
32
32
|
<%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
<% end %>
|
42
|
-
<% end %>
|
43
|
-
<%= pb_rails("flex/flex_item") do %>
|
44
|
-
<%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
|
45
|
-
<% end %>
|
33
|
+
<%= pb_rails("flex/flex_item") do %>
|
34
|
+
<%= pb_rails("flex") do %>
|
35
|
+
<%= pb_rails("icon", props: {icon: option[:icon]}) %>
|
36
|
+
<%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<%= pb_rails("flex/flex_item") do %>
|
40
|
+
<%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
|
46
41
|
<% end %>
|
47
42
|
<% end %>
|
48
43
|
<% end %>
|
@@ -1 +1 @@
|
|
1
|
-
By default, dropdown option
|
1
|
+
By default, dropdown option padding is set to `xs`, but this padding can be overridden using our global prop spacing token. In this example we are increasing the option padding to `sm`.
|
@@ -51,10 +51,7 @@ const [selectedOption, setSelectedOption] = useState();
|
|
51
51
|
<Dropdown.Option key={option.id}
|
52
52
|
option={option}
|
53
53
|
>
|
54
|
-
|
55
|
-
align="center"
|
56
|
-
justify="between"
|
57
|
-
>
|
54
|
+
<>
|
58
55
|
<FlexItem>
|
59
56
|
<Flex>
|
60
57
|
<Icon icon={option.icon}
|
@@ -68,7 +65,7 @@ const [selectedOption, setSelectedOption] = useState();
|
|
68
65
|
text={option.areaCode}
|
69
66
|
/>
|
70
67
|
</FlexItem>
|
71
|
-
|
68
|
+
</>
|
72
69
|
</Dropdown.Option>
|
73
70
|
))}
|
74
71
|
</Dropdown.Container>
|
@@ -32,20 +32,15 @@
|
|
32
32
|
<%= pb_rails("dropdown/dropdown_container", props:{max_width:"xs"}) do %>
|
33
33
|
<% options.each do |option| %>
|
34
34
|
<%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
|
35
|
-
<%= pb_rails("flex", props: {
|
36
|
-
align: "center",
|
37
|
-
justify: "between",
|
38
|
-
}) do %>
|
39
35
|
<%= pb_rails("flex/flex_item") do %>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
<% end %>
|
36
|
+
<%= pb_rails("flex") do %>
|
37
|
+
<%= pb_rails("icon", props: {icon: option[:icon]}) %>
|
38
|
+
<%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<%= pb_rails("flex/flex_item") do %>
|
42
|
+
<%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
|
43
|
+
<% end %>
|
49
44
|
<% end %>
|
50
45
|
<% end %>
|
51
46
|
<% end %>
|
@@ -203,5 +203,5 @@ test('selected option on click', () => {
|
|
203
203
|
const kit = screen.getByTestId(testId)
|
204
204
|
const option = kit.querySelector('.pb_dropdown_option_list')
|
205
205
|
option.click()
|
206
|
-
expect(option).toHaveClass('pb_dropdown_option_selected')
|
206
|
+
expect(option).toHaveClass('pb_dropdown_option_selected p_xs')
|
207
207
|
})
|
@@ -10,12 +10,18 @@
|
|
10
10
|
padding:"none",
|
11
11
|
cursor: "pointer"
|
12
12
|
}) do %>
|
13
|
-
|
13
|
+
<%= pb_rails("flex", props: {
|
14
|
+
align: "center",
|
15
|
+
classname:"dropdown_option_wrapper",
|
16
|
+
justify: "between",
|
17
|
+
padding_x:"sm",
|
18
|
+
padding_y:"xxs",
|
19
|
+
}) do %>
|
14
20
|
<% if content.present? %>
|
15
21
|
<%= content.presence %>
|
16
22
|
<% else %>
|
17
23
|
<%= pb_rails("body", props: {text: object.option[:label]}) %>
|
18
24
|
<% end %>
|
19
|
-
|
25
|
+
<% end %>
|
20
26
|
<% end %>
|
21
27
|
<% end %>
|
@@ -10,8 +10,12 @@ module Playbook
|
|
10
10
|
Hash(prop(:data)).merge("dropdown_option_label": option)
|
11
11
|
end
|
12
12
|
|
13
|
+
def padding_helper
|
14
|
+
" p_xs"
|
15
|
+
end
|
16
|
+
|
13
17
|
def classname
|
14
|
-
generate_classname("pb_dropdown_option", "list")
|
18
|
+
generate_classname("pb_dropdown_option", "list") + padding_helper
|
15
19
|
end
|
16
20
|
end
|
17
21
|
end
|
@@ -10,6 +10,7 @@ import { globalProps, GlobalProps } from "../../utilities/globalProps";
|
|
10
10
|
|
11
11
|
import DropdownContext from "../context";
|
12
12
|
|
13
|
+
import Flex from "../../pb_flex/_flex";
|
13
14
|
import Body from "../../pb_body/_body";
|
14
15
|
import ListItem from "../../pb_list/_list_item";
|
15
16
|
import { GenericObject } from "../../types";
|
@@ -38,6 +39,7 @@ const DropdownOption = (props: DropdownOptionProps) => {
|
|
38
39
|
id,
|
39
40
|
key,
|
40
41
|
option,
|
42
|
+
padding = "xs",
|
41
43
|
} = props;
|
42
44
|
|
43
45
|
const {
|
@@ -75,7 +77,7 @@ const DropdownOption = (props: DropdownOptionProps) => {
|
|
75
77
|
selectedClass,
|
76
78
|
focusedClass,
|
77
79
|
),
|
78
|
-
globalProps(props),
|
80
|
+
globalProps(props, {padding}),
|
79
81
|
className
|
80
82
|
);
|
81
83
|
|
@@ -96,12 +98,20 @@ const DropdownOption = (props: DropdownOptionProps) => {
|
|
96
98
|
key={option.label}
|
97
99
|
padding="none"
|
98
100
|
>
|
101
|
+
<Flex
|
102
|
+
align="center"
|
103
|
+
className="dropdown_option_wrapper"
|
104
|
+
justify="between"
|
105
|
+
paddingX="sm"
|
106
|
+
paddingY="xxs"
|
107
|
+
>
|
99
108
|
{children ?
|
100
|
-
|
109
|
+
children :
|
101
110
|
<Body dark={dark}
|
102
111
|
text={option.label}
|
103
112
|
/>
|
104
113
|
}
|
114
|
+
</Flex>
|
105
115
|
</ListItem>
|
106
116
|
</div>
|
107
117
|
);
|
@@ -14,12 +14,3 @@ examples:
|
|
14
14
|
- fixed_confirmation_toast_positions: Click to Show Positions
|
15
15
|
- fixed_confirmation_toast_auto_close: Click to Show Auto Close
|
16
16
|
- fixed_confirmation_toast_children: Children
|
17
|
-
|
18
|
-
swift:
|
19
|
-
- fixed_confirmation_toast_default_swift: Default
|
20
|
-
- fixed_confirmation_toast_multi_line_swift: Multi Line
|
21
|
-
#- fixed_confirmation_toast_close_swift: Click to Close
|
22
|
-
#- fixed_confirmation_toast_positions_swift: Click to Show Positions
|
23
|
-
- fixed_confirmation_toast_children_swift: Children
|
24
|
-
#- fixed_confirmation_toast_dismiss_with_timer_swift: Timer
|
25
|
-
- fixed_confirmation_toast_props_swift: ""
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("icon", props: { icon: object.icon_value, classname: "pb_icon", fixed_width: true }) %>
|
3
8
|
|
4
9
|
<% if content %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
17
17
|
<%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
|
18
18
|
<%= form.text_field :example_text_field, props: { label: true } %>
|
19
|
-
<%= form.
|
19
|
+
<%= form.telephone_field :example_phone_field, props: { label: true } %>
|
20
20
|
<%= form.email_field :example_email_field, props: { label: true } %>
|
21
21
|
<%= form.number_field :example_number_field, props: { label: true } %>
|
22
22
|
<%= form.search_field :example_search_field, props: { label: true } %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
<%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
|
17
17
|
<%= form.text_field :example_text_field, props: { label: true, required: true } %>
|
18
|
-
<%= form.
|
18
|
+
<%= form.telephone_field :example_phone_field, props: { label: true, required: true, validation: { pattern: "[0-9]{3}-[0-9]{3}-[0-9]{4}", message: "Please enter a valid phone number (example: 888-888-8888)." } } %>
|
19
19
|
<%= form.email_field :example_email_field, props: { label: true, required: true } %>
|
20
20
|
<%= form.number_field :example_number_field, props: { label: true, required: true } %>
|
21
21
|
<%= form.search_field :example_project_number, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
|
@@ -1,3 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("icon", props: { dark: object.dark, icon: object.icon, fixed_width: true }) %>
|
3
8
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
3
8
|
<%= pb_rails("icon", props: { icon: object.icon, fixed_width: true }) %>
|
4
9
|
<%= object.text %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("caption", props: { text: object.label, classname: "pb_label_pill_label"}) %>
|
3
8
|
<%= pb_rails("pill", props: { text: object.pill_value, variant: object.variant, classname: "pb_label_pill_pill" }) %>
|
4
9
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("caption", props: { text: object.label, dark: object.dark }) %>
|
3
8
|
<% if object.variant == "details" %>
|
4
9
|
<%= pb_rails("flex", props: {inline: true, vertical: "center"}) do %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
|
3
7
|
<%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
|
4
8
|
<%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> <%= object.text %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
aria: object.aria,
|
6
|
+
**combined_html_options) do %>
|
7
|
+
<%= content %>
|
8
8
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<% object.users.take(object.display_count).each do |user| %>
|
3
8
|
<%= pb_rails("avatar", props: user.merge({size: object.size, classname: "pb_multiple_users_item", dark: object.dark}) ) %>
|
4
9
|
<% end %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("avatar", props: object.users[0].merge({size: "xs", classname: "pb_multiple_users_stacked_item", dark: object.dark}) ) %>
|
3
8
|
|
4
9
|
<% unless object.only_one %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("body", props: {
|
3
8
|
tag: "span",
|
4
9
|
classname: "pb_person_first" }) { object.first_name } %>
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
id: object.id,
|
4
|
+
data: object.data,
|
5
|
+
class: object.classname,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("person", props: {
|
3
8
|
first_name: object.first_name,
|
4
9
|
last_name: object.last_name,
|
@@ -1,3 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= pb_rails("title", props: { text: object.display_text, tag: "div", size: 4, classname: "pb_pill_text" }) %>
|
3
8
|
<% end %>
|
@@ -102,9 +102,6 @@
|
|
102
102
|
pointer-events: none;
|
103
103
|
}
|
104
104
|
&.inline {
|
105
|
-
svg {
|
106
|
-
right: 6px;
|
107
|
-
}
|
108
105
|
@mixin active_arrow_style {
|
109
106
|
svg {
|
110
107
|
color: $primary !important;
|
@@ -133,7 +130,6 @@
|
|
133
130
|
box-shadow: none;
|
134
131
|
border-color: transparent;
|
135
132
|
padding: 4px 8px;
|
136
|
-
padding-right: $space_lg;
|
137
133
|
border-radius: 4px;
|
138
134
|
option {
|
139
135
|
background-color: $white;
|
@@ -217,9 +213,6 @@
|
|
217
213
|
}
|
218
214
|
}
|
219
215
|
&.inline {
|
220
|
-
svg {
|
221
|
-
right: 6px;
|
222
|
-
}
|
223
216
|
&:not(:hover) {
|
224
217
|
svg {
|
225
218
|
display: none;
|
@@ -240,7 +233,6 @@
|
|
240
233
|
border-color: transparent;
|
241
234
|
background: transparent;
|
242
235
|
padding: 4px 8px;
|
243
|
-
padding-right: $space_lg;
|
244
236
|
border-radius: 4px;
|
245
237
|
option {
|
246
238
|
background-color: $white;
|
@@ -7,7 +7,7 @@ import type { InputCallback } from '../types'
|
|
7
7
|
|
8
8
|
import Body from '../pb_body/_body'
|
9
9
|
import Caption from '../pb_caption/_caption'
|
10
|
-
import Icon from '../pb_icon/_icon'
|
10
|
+
import Icon, { IconProps } from '../pb_icon/_icon'
|
11
11
|
|
12
12
|
type SelectOption = {
|
13
13
|
value: string,
|
@@ -25,6 +25,7 @@ type SelectProps = {
|
|
25
25
|
disabled?: boolean,
|
26
26
|
error?: string,
|
27
27
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
28
|
+
iconProps?: IconProps,
|
28
29
|
id?: string,
|
29
30
|
includeBlank?: string,
|
30
31
|
inline?: boolean,
|
@@ -36,6 +37,7 @@ type SelectProps = {
|
|
36
37
|
onChange: InputCallback<HTMLSelectElement>,
|
37
38
|
options: SelectOption[],
|
38
39
|
required?: boolean,
|
40
|
+
selectProps?: GlobalProps & { [key: string]: any },
|
39
41
|
showArrow?: boolean,
|
40
42
|
value?: string,
|
41
43
|
} & GlobalProps
|
@@ -59,6 +61,7 @@ const Select = ({
|
|
59
61
|
data = {},
|
60
62
|
disabled = false,
|
61
63
|
error,
|
64
|
+
iconProps,
|
62
65
|
label,
|
63
66
|
htmlOptions = {},
|
64
67
|
inline = false,
|
@@ -67,6 +70,7 @@ const Select = ({
|
|
67
70
|
onChange = () => undefined,
|
68
71
|
options = [],
|
69
72
|
required = false,
|
73
|
+
selectProps = {},
|
70
74
|
showArrow = false,
|
71
75
|
value,
|
72
76
|
...props
|
@@ -90,6 +94,12 @@ const Select = ({
|
|
90
94
|
compactClass
|
91
95
|
);
|
92
96
|
|
97
|
+
const selectClasses = classnames(
|
98
|
+
buildCss('pb_html_select'),
|
99
|
+
globalProps(selectProps),
|
100
|
+
selectProps.className
|
101
|
+
)
|
102
|
+
|
93
103
|
const selectWrapperClass = classnames(buildCss('pb_select_kit_wrapper'), { error }, className)
|
94
104
|
const selectBody =(() =>{
|
95
105
|
if (children) return children
|
@@ -97,6 +107,7 @@ const Select = ({
|
|
97
107
|
<select
|
98
108
|
{...htmlOptions}
|
99
109
|
{...domSafeProps(props)}
|
110
|
+
className={selectClasses}
|
100
111
|
disabled={disabled}
|
101
112
|
id={name}
|
102
113
|
multiple={multiple}
|
@@ -137,6 +148,7 @@ const Select = ({
|
|
137
148
|
className="pb_select_kit_caret"
|
138
149
|
fixedWidth
|
139
150
|
icon="angle-down"
|
151
|
+
{...iconProps}
|
140
152
|
/>
|
141
153
|
:
|
142
154
|
null
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<%= pb_rails("body", props: { status: object.status }) do %>
|
3
7
|
<%= pb_rails("icon", props: { fixed_width: true, icon: object.returned_icon }) if object.returned_icon %>
|
4
8
|
<%= "#{object.value}%" if object.value %>
|
@@ -76,25 +76,6 @@
|
|
76
76
|
.text_input {
|
77
77
|
border-color: $error_dark;
|
78
78
|
}
|
79
|
-
[class*=pb_body_kit_negative] {
|
80
|
-
color: $error_dark;
|
81
|
-
}
|
82
|
-
}
|
83
|
-
.text_input_wrapper_add_on {
|
84
|
-
.add-on {
|
85
|
-
&-right {
|
86
|
-
.add-on-card {
|
87
|
-
border: 1px solid $error_dark;
|
88
|
-
border-left: 0;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
&-left {
|
92
|
-
.add-on-card {
|
93
|
-
border: 1px solid $error_dark;
|
94
|
-
border-right: 0;
|
95
|
-
}
|
96
|
-
}
|
97
|
-
}
|
98
79
|
}
|
99
80
|
}
|
100
81
|
}
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
<div class="pb_time_range_inline_wrapper">
|
3
7
|
<% if object.icon == true %>
|
4
8
|
<%= pb_rails(object.text_kit, props: { tag: "span", dark: object.dark, color: object.icon_color, text: pb_rails("icon", props: { icon: "clock", dark: object.dark, classname:"pb_time_range_inline_icon", fixed_width: true, size: object.size }) }) %>
|
@@ -1,4 +1,8 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data,
|
4
|
+
class: object.classname,
|
5
|
+
**combined_html_options) do %>
|
2
6
|
|
3
7
|
<%= pb_rails("body", props: { color: "light", dark: object.dark, classname: "pb_time_stacked time-spacing" }) do %>
|
4
8
|
<time>
|