playbook_ui_docs 13.27.0.pre.alpha.dropdowncustomoptionfix2924 → 13.27.0.pre.alpha.powercentrainplaybookpt22905
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_date_range_inline/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_date_time/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml +0 -4
- 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_fixed_confirmation_toast/docs/example.yml +0 -9
- 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/dist/playbook-doc.js +6 -6
- metadata +2 -22
- 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_date_year_stacked/docs/_date_year_stacked_default_swift.md +0 -20
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_props_swift.md +0 -6
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7b2cef4f839337bd9c1a651dd33946b97f1509202769864a716c9f7c0a64417
|
4
|
+
data.tar.gz: 32957d817904943e6c423d79a75d8c114cebf6c110babe2d69c33184c57cb454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14b5cb08f6881a67989cf56630f946539b337c1a9de78ee5cfd99fe6ad38e7bba16f569b0ed1a792c1d9de1b2ea2c6c568c4af1bd9d1a86446ad9e12ad6d7eab
|
7
|
+
data.tar.gz: 54e7513ae02dbba7f347b234c991f522e141462f3cb6108dad551a3605211079118664290d752ac4340ab5191da8408cfcf9792b8e233e72a5fc4453285a7189
|
@@ -15,10 +15,3 @@ examples:
|
|
15
15
|
- date_stacked_reverse: Day & Month Reverse
|
16
16
|
- date_stacked_sizes: Sizes
|
17
17
|
- date_stacked_bold: Bold
|
18
|
-
|
19
|
-
swift:
|
20
|
-
- date_stacked_default_swift: Default
|
21
|
-
- date_stacked_not_current_year_swift: Not Current Year
|
22
|
-
- date_stacked_reversed_swift: Day & Month Reverse
|
23
|
-
- date_stacked_bold_swift: Bold
|
24
|
-
- date_stacked_props_swift: ""
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
|
-
import { Dropdown, User,
|
2
|
+
import { Dropdown, User, FlexItem, Badge, Avatar } from '../../'
|
3
3
|
|
4
4
|
const DropdownWithCustomDisplay = (props) => {
|
5
5
|
const [selectedOption, setSelectedOption] = useState();
|
@@ -69,10 +69,7 @@ const DropdownWithCustomDisplay = (props) => {
|
|
69
69
|
<Dropdown.Option key={option.id}
|
70
70
|
option={option}
|
71
71
|
>
|
72
|
-
|
73
|
-
align="center"
|
74
|
-
justify="between"
|
75
|
-
>
|
72
|
+
<>
|
76
73
|
<FlexItem>
|
77
74
|
<User
|
78
75
|
align="left"
|
@@ -96,7 +93,7 @@ const DropdownWithCustomDisplay = (props) => {
|
|
96
93
|
}`}
|
97
94
|
/>
|
98
95
|
</FlexItem>
|
99
|
-
|
96
|
+
</>
|
100
97
|
</Dropdown.Option>
|
101
98
|
))}
|
102
99
|
</Dropdown>
|
@@ -48,17 +48,12 @@
|
|
48
48
|
<%= pb_rails("dropdown/dropdown_container") do %>
|
49
49
|
<% options.each do |option| %>
|
50
50
|
<%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
<% end %>
|
58
|
-
<%= pb_rails("flex/flex_item") do %>
|
59
|
-
<%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
|
60
|
-
<% end %>
|
61
|
-
<% end %>
|
51
|
+
<%= pb_rails("flex/flex_item") do %>
|
52
|
+
<%= pb_rails("user", props: {name: option[:label], align:"left", avatar: true, orientation:"horizontal", territory:option[:territory], title: option[:title]}) %>
|
53
|
+
<% end %>
|
54
|
+
<%= pb_rails("flex/flex_item") do %>
|
55
|
+
<%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
|
56
|
+
<% end %>
|
62
57
|
<% end %>
|
63
58
|
<% end %>
|
64
59
|
<% end %>
|
@@ -38,10 +38,7 @@ const DropdownWithCustomOptions = (props) => {
|
|
38
38
|
<Dropdown.Option key={option.id}
|
39
39
|
option={option}
|
40
40
|
>
|
41
|
-
|
42
|
-
align="center"
|
43
|
-
justify="between"
|
44
|
-
>
|
41
|
+
<>
|
45
42
|
<FlexItem>
|
46
43
|
<Flex>
|
47
44
|
<Icon icon={option.icon}
|
@@ -55,7 +52,7 @@ const DropdownWithCustomOptions = (props) => {
|
|
55
52
|
text={option.areaCode}
|
56
53
|
/>
|
57
54
|
</FlexItem>
|
58
|
-
|
55
|
+
</>
|
59
56
|
</Dropdown.Option>
|
60
57
|
))}
|
61
58
|
</Dropdown>
|
@@ -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 %>
|
@@ -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: ""
|
@@ -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)." } } %>
|