playbook_ui_docs 14.3.2.pre.alpha.revert3614PBNTR455ganttchartPOC3783 → 14.4.0.pre.alpha.PBNTR490multilevelselect3832

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +117 -0
  3. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +227 -0
  4. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +1 -0
  5. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
  6. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
  7. data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +53 -0
  8. data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +7 -0
  9. data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +1 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +72 -0
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +91 -0
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +1 -0
  13. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +1 -0
  14. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  15. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  16. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.html.erb +73 -0
  17. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_bubble.jsx +86 -0
  18. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +2 -0
  19. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.html.erb +48 -0
  21. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.md +1 -0
  22. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
  23. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +31 -0
  24. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +26 -0
  25. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +1 -0
  26. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +1 -0
  27. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  28. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  29. data/dist/playbook-doc.js +1 -1
  30. metadata +20 -2
@@ -0,0 +1,73 @@
1
+ <%= pb_rails("multiple_users_stacked", props: {
2
+ variant: "bubble",
3
+ users: [
4
+ {
5
+ name: "Patrick Welch",
6
+ image_url: "https://randomuser.me/api/portraits/men/9.jpg",
7
+ }
8
+ ]
9
+ }) %>
10
+
11
+ <br/><br/>
12
+
13
+ <%= pb_rails("multiple_users_stacked", props: {
14
+ variant: "bubble",
15
+ users: [
16
+ {
17
+ name: "Patrick Welch",
18
+ image_url: "https://randomuser.me/api/portraits/men/9.jpg",
19
+ },
20
+ {
21
+ name: "Lucille Sanchez",
22
+ image_url: "https://randomuser.me/api/portraits/women/6.jpg",
23
+ }
24
+ ]
25
+ }) %>
26
+
27
+ <br/><br/>
28
+
29
+ <%= pb_rails("multiple_users_stacked", props: {
30
+ variant: "bubble",
31
+ users: [
32
+ {
33
+ name: "Patrick Welch",
34
+ image_url: "https://randomuser.me/api/portraits/men/9.jpg",
35
+ },
36
+ {
37
+ name: "Lucille Sanchez",
38
+ image_url: "https://randomuser.me/api/portraits/women/6.jpg",
39
+ },
40
+ {
41
+ name: "Beverly Reyes",
42
+ image_url: "https://randomuser.me/api/portraits/women/74.jpg",
43
+ },
44
+ ]
45
+ }) %>
46
+
47
+ <br/><br/>
48
+
49
+ <%= pb_rails("multiple_users_stacked", props: {
50
+ variant: "bubble",
51
+ users: [
52
+ {
53
+ name: "Patrick Welch",
54
+ image_url: "https://randomuser.me/api/portraits/men/9.jpg",
55
+ },
56
+ {
57
+ name: "Lucille Sanchez",
58
+ image_url: "https://randomuser.me/api/portraits/women/6.jpg",
59
+ },
60
+ {
61
+ name: "Beverly Reyes",
62
+ image_url: "https://randomuser.me/api/portraits/women/74.jpg",
63
+ },
64
+ {
65
+ name: "Keith Craig",
66
+ image_url: "https://randomuser.me/api/portraits/men/40.jpg",
67
+ },
68
+ {
69
+ name: "Alicia Cooper",
70
+ image_url: "https://randomuser.me/api/portraits/women/46.jpg",
71
+ }
72
+ ]
73
+ }) %>
@@ -0,0 +1,86 @@
1
+ import React from 'react'
2
+
3
+ import MultipleUsersStacked from '../_multiple_users_stacked'
4
+
5
+ const MultipleUsersStackedBubble = (props) => {
6
+ return (
7
+ <div>
8
+ <MultipleUsersStacked
9
+ users={[
10
+ {
11
+ name: 'Patrick Welch',
12
+ imageUrl: 'https://randomuser.me/api/portraits/men/9.jpg',
13
+ },
14
+ ]}
15
+ variant="bubble"
16
+ {...props}
17
+ />
18
+ <br />
19
+ <br />
20
+ <MultipleUsersStacked
21
+ users={[
22
+ {
23
+ name: 'Patrick Welch',
24
+ imageUrl: 'https://randomuser.me/api/portraits/men/9.jpg',
25
+ },
26
+ {
27
+ name: 'Lucille Sanchez',
28
+ imageUrl: 'https://randomuser.me/api/portraits/women/6.jpg',
29
+ },
30
+ ]}
31
+ variant="bubble"
32
+ {...props}
33
+ />
34
+ <br />
35
+ <br />
36
+ <MultipleUsersStacked
37
+ users={[
38
+ {
39
+ name: 'Patrick Welch',
40
+ imageUrl: 'https://randomuser.me/api/portraits/men/9.jpg',
41
+ },
42
+ {
43
+ name: 'Lucille Sanchez',
44
+ imageUrl: 'https://randomuser.me/api/portraits/women/6.jpg',
45
+ },
46
+ {
47
+ name: 'Beverly Reyes',
48
+ imageUrl: 'https://randomuser.me/api/portraits/women/74.jpg',
49
+ },
50
+ ]}
51
+ variant="bubble"
52
+ {...props}
53
+ />
54
+ <br />
55
+ <br />
56
+ <MultipleUsersStacked
57
+ users={[
58
+ {
59
+ name: 'Patrick Welch',
60
+ imageUrl: 'https://randomuser.me/api/portraits/men/9.jpg',
61
+ },
62
+ {
63
+ name: 'Lucille Sanchez',
64
+ imageUrl: 'https://randomuser.me/api/portraits/women/6.jpg',
65
+ },
66
+ {
67
+ name: 'Beverly Reyes',
68
+ imageUrl: 'https://randomuser.me/api/portraits/women/74.jpg',
69
+ },
70
+ {
71
+ name: 'Keith Craig',
72
+ imageUrl: 'https://randomuser.me/api/portraits/men/40.jpg',
73
+ },
74
+ {
75
+ name: 'Alicia Cooper',
76
+ imageUrl: 'https://randomuser.me/api/portraits/women/46.jpg',
77
+ },
78
+ ]}
79
+ variant="bubble"
80
+ {...props}
81
+ />
82
+ </div>
83
+ )
84
+ }
85
+
86
+ export default MultipleUsersStackedBubble
@@ -2,10 +2,12 @@ examples:
2
2
 
3
3
  rails:
4
4
  - multiple_users_stacked_default: Default
5
+ - multiple_users_stacked_bubble: Bubble
5
6
 
6
7
 
7
8
  react:
8
9
  - multiple_users_stacked_default: Default
10
+ - multiple_users_stacked_bubble: Bubble
9
11
 
10
12
  swift:
11
13
  - multiple_users_stacked_default_swift: Default
@@ -1 +1,2 @@
1
1
  export { default as MultipleUsersStackedDefault } from './_multiple_users_stacked_default.jsx'
2
+ export { default as MultipleUsersStackedBubble } from './_multiple_users_stacked_bubble.jsx'
@@ -0,0 +1,48 @@
1
+ <%
2
+ options = [
3
+ { label: "Orange", value: "Orange" },
4
+ { label: "Red", value: "Red" },
5
+ { label: "Green", value: "Green" },
6
+ { label: "Blue", value: "Blue" },
7
+ ]
8
+ %>
9
+
10
+ <%= pb_rails("radio", props: {
11
+ custom_children: true,
12
+ label: "Select",
13
+ name: "Group1",
14
+ value: "Select",
15
+ }) do %>
16
+ <%= pb_rails("select", props: {
17
+ min_width: "xs",
18
+ options: options,
19
+ }) %>
20
+ <% end %>
21
+
22
+ <%= pb_rails("radio", props: {
23
+ custom_children: true,
24
+ label: "Typeahead",
25
+ name: "Group1",
26
+ value: "Typeahead",
27
+ }) do %>
28
+ <%= pb_rails("typeahead", props: {
29
+ id: "typeahead-radio",
30
+ is_multi: false,
31
+ min_width: "xs",
32
+ options: options,
33
+ placeholder: "Select...",
34
+ })
35
+ %>
36
+ <% end %>
37
+
38
+ <%= pb_rails("radio", props: {
39
+ custom_children: true,
40
+ label: "Typography",
41
+ name: "Group1",
42
+ value: "Typography",
43
+ }) do %>
44
+ <%= pb_rails("title", props: {
45
+ text: "Custom Typography",
46
+ })
47
+ %>
48
+ <% end %>
@@ -0,0 +1 @@
1
+ Use the `custom_children` prop to enable the use of kits instead of text labels.
@@ -7,6 +7,7 @@ examples:
7
7
  - radio_options: With Options
8
8
  - radio_alignment: Alignment
9
9
  - radio_disabled: Disabled
10
+ - radio_custom_children: Custom Children
10
11
 
11
12
  react:
12
13
  - radio_default: Default
@@ -0,0 +1,31 @@
1
+ <%
2
+ options = [
3
+ { label: 'Windows', value: '#FFA500' },
4
+ { label: 'Siding', value: '#FF0000' },
5
+ { label: 'Doors', value: '#00FF00' },
6
+ { label: 'Roofs', value: '#0000FF' },
7
+ ]
8
+ %>
9
+
10
+ <%= pb_rails("typeahead", props: { id: "typeahead-pills-example1", pill_color: "neutral", default_options: [options.first], options: options, label: "Colors", name: :foo, pills: true }) %>
11
+
12
+ <%= pb_rails("button", props: {id: "clear-pills", text: "Clear All Options", variant: "secondary"}) %>
13
+
14
+ <!-- This section is an example of the available JavaScript event hooks -->
15
+ <%= javascript_tag defer: "defer" do %>
16
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-select", function(event) {
17
+ console.log('Option selected')
18
+ console.dir(event.detail)
19
+ })
20
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-remove", function(event) {
21
+ console.log('Option removed')
22
+ console.dir(event.detail)
23
+ })
24
+ document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-clear", function() {
25
+ console.log('All options cleared')
26
+ })
27
+
28
+ document.querySelector('#clear-pills').addEventListener('click', function() {
29
+ document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:clear'))
30
+ })
31
+ <% end %>
@@ -0,0 +1,26 @@
1
+ import React from 'react'
2
+ import { Typeahead } from 'playbook-ui'
3
+
4
+ const options = [
5
+ { label: 'Windows', value: '#FFA500' },
6
+ { label: 'Siding', value: '#FF0000' },
7
+ { label: 'Doors', value: '#00FF00' },
8
+ { label: 'Roofs', value: '#0000FF' },
9
+ ]
10
+
11
+ const TypeaheadWithPills = (props) => {
12
+ return (
13
+ <>
14
+ <Typeahead
15
+ isMulti
16
+ label="Colors"
17
+ options={options}
18
+ pillColor="neutral"
19
+ placeholder=""
20
+ {...props}
21
+ />
22
+ </>
23
+ )
24
+ }
25
+
26
+ export default TypeaheadWithPills
@@ -0,0 +1 @@
1
+ Change the form pill color by passing the optional `pill_color` prop. Product, Data, and Status colors are available options. Check them out <a href="https://playbook.powerapp.cloud/kits/form_pill#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
@@ -0,0 +1 @@
1
+ Change the form pill color by passing the optional `pillColor` prop. Product, Data, and Status colors are available options. Check them out <a href="https://playbook.powerapp.cloud/kits/form_pill/react#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
@@ -9,6 +9,7 @@ examples:
9
9
  - typeahead_inline: Inline
10
10
  - typeahead_multi_kit: Multi Kit Options
11
11
  - typeahead_error_state: Error State
12
+ - typeahead_with_pills_color: With Pills (Custom Color)
12
13
 
13
14
  react:
14
15
  - typeahead_default: Default
@@ -23,3 +24,4 @@ examples:
23
24
  - typeahead_async_createable: Createable (+ Async Data)
24
25
  - typeahead_error_state: Error State
25
26
  - typeahead_custom_menu_list: Custom MenuList
27
+ - typeahead_with_pills_color: With Pills (Custom Color)
@@ -10,3 +10,4 @@ export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
10
10
  export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
11
11
  export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
12
  export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
13
+ export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'