playbook_ui_docs 14.13.0.pre.rc.10 → 14.14.0.pre.alpha.PBNTR890typeahead6390

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +75 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +3 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +55 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  17. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
  18. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
  19. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
  20. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  21. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.html.erb +22 -0
  22. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display.jsx +34 -0
  23. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_rails.md +1 -0
  24. data/app/pb_kits/playbook/pb_currency/docs/_currency_null_display_react.md +1 -0
  25. data/app/pb_kits/playbook/pb_currency/docs/example.yml +2 -0
  26. data/app/pb_kits/playbook/pb_currency/docs/index.js +2 -1
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +99 -0
  28. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +1 -0
  29. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +61 -0
  30. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -0
  31. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
  32. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
  33. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +4 -5
  34. data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
  35. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb +8 -0
  36. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb +33 -0
  37. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +0 -0
  38. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +20 -1
  39. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb +24 -0
  40. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb +21 -0
  41. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md +1 -0
  42. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb +49 -0
  43. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +5 -0
  44. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
  45. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +2 -1
  46. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
  47. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
  48. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
  49. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
  50. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
  51. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
  53. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.jsx +17 -0
  54. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
  55. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.jsx +61 -0
  56. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +5 -3
  57. data/app/pb_kits/playbook/pb_icon_button/docs/index.js +2 -0
  58. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.html.erb +11 -0
  59. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
  60. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.md +1 -0
  61. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
  62. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +2 -0
  63. data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
  64. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
  65. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
  66. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
  67. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
  68. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
  69. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
  70. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
  71. data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
  72. data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
  73. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
  74. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
  75. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
  76. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
  77. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
  78. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
  79. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
  80. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
  81. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
  82. data/app/pb_kits/playbook/pb_table/docs/example.yml +5 -0
  83. data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
  84. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +15 -1
  85. data/app/pb_kits/playbook/pb_title/docs/_title_default.html.erb +1 -2
  86. data/app/pb_kits/playbook/pb_title/docs/_title_default.jsx +1 -1
  87. data/app/pb_kits/playbook/pb_title/docs/_title_display_size.html.erb +7 -0
  88. data/app/pb_kits/playbook/pb_title/docs/_title_display_size.jsx +54 -0
  89. data/app/pb_kits/playbook/pb_title/docs/_title_display_size.md +1 -0
  90. data/app/pb_kits/playbook/pb_title/docs/example.yml +2 -0
  91. data/app/pb_kits/playbook/pb_title/docs/index.js +1 -0
  92. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.html.erb +39 -0
  93. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.md +3 -0
  94. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.html.erb +26 -0
  95. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +2 -0
  96. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_dynamic_options.html.erb +45 -0
  97. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_dynamic_options.md +5 -0
  98. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_dynamic_options_pure_rails.html.erb +33 -0
  99. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_dynamic_options_pure_rails.md +3 -0
  100. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  101. data/dist/playbook-doc.js +1 -1
  102. metadata +64 -14
  103. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
  104. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
  105. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
  106. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
  107. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
  108. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
  109. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
  110. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
  111. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
  112. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
  113. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
  114. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click.md → _table_with_collapsible_with_custom_click_react.md} +0 -0
@@ -0,0 +1,61 @@
1
+ <% initial_items = [
2
+ {
3
+ id: "1",
4
+ title: "Task 1",
5
+ assignee_name: "Terry Miles",
6
+ assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
7
+ },
8
+ {
9
+ id: "2",
10
+ title: "Task 2",
11
+ assignee_name: "Sophia Miles",
12
+ assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
13
+ },
14
+ {
15
+ id: "3",
16
+ title: "Task 3",
17
+ assignee_name: "Alice Jones",
18
+ assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
19
+ },
20
+ {
21
+ id: "4",
22
+ title: "Task 4",
23
+ assignee_name: "Mike James",
24
+ assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
25
+ },
26
+ {
27
+ id: "5",
28
+ title: "Task 5",
29
+ assignee_name: "James Guy",
30
+ assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
31
+ }
32
+ ] %>
33
+
34
+
35
+
36
+ <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
37
+ <%= pb_rails("table", props: { size: "sm", responsive:"none" }) do %>
38
+ <%= pb_rails("table/table_head") do %>
39
+ <%= pb_rails("table/table_row") do %>
40
+ <%= pb_rails("table/table_header", props: { text: "id"}) %>
41
+ <%= pb_rails("table/table_header", props: { text: "name"}) %>
42
+ <%= pb_rails("table/table_header", props: { text: "task number"}) %>
43
+ <% end %>
44
+ <% end %>
45
+
46
+ <%= pb_rails("table/table_body", props: {draggable_container: true}) do %>
47
+ <% initial_items.each do |item| %>
48
+ <%= pb_rails("table/table_row", props:{drag_id: item[:id], draggable_item: true}) do %>
49
+ <%= pb_rails("table/table_cell", props: { text: item[:id]}) %>
50
+ <%= pb_rails("table/table_cell") do %>
51
+ <%= pb_rails("flex", props:{align:"center"}) do %>
52
+ <%= pb_rails("avatar", props: {size: "xs", image_url: item[:assignee_img]}) %>
53
+ <%= pb_rails("body", props: {text: item[:assignee_name], padding_left:"sm"}) %>
54
+ <% end %>
55
+ <% end %>
56
+ <%= pb_rails("table/table_cell", props: { text: item[:title]}) %>
57
+ <% end %>
58
+ <% end %>
59
+ <% end %>
60
+ <% end %>
61
+ <% end %>
@@ -0,0 +1,4 @@
1
+ The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this:
2
+
3
+ - use the `draggable_container` prop on the table/table_body to designate it as the Draggable Container
4
+ - use the `draggable_item` prop on the table/table_row to designate it as the Draggable Item. Make sure to also pass id to the `drag_id` prop here.
@@ -0,0 +1,90 @@
1
+ import React, { useState } from "react";
2
+ import { Flex, Table, Body, Avatar, DraggableProvider } from "playbook-ui";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ task: "Task 1",
9
+ assignee_name: "Terry Miles",
10
+ assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
11
+ },
12
+ {
13
+ id: "2",
14
+ task: "Task 2",
15
+ assignee_name: "Sophia Miles",
16
+ assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
17
+ },
18
+ {
19
+ id: "3",
20
+ task: "Task 3",
21
+ assignee_name: "Alice Jones",
22
+ assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
23
+ },
24
+ {
25
+ id: "4",
26
+ task: "Task 4",
27
+ assignee_name: "Mike James",
28
+ assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
29
+ },
30
+ {
31
+ id: "5",
32
+ task: "Task 5",
33
+ assignee_name: "James Guy",
34
+ assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
35
+ }
36
+ ];
37
+
38
+ const DraggableWithTableReact = (props) => {
39
+ const [initialState, setInitialState] = useState(data);
40
+
41
+ return (
42
+ <>
43
+ <DraggableProvider initialItems={data}
44
+ onReorder={(items) => setInitialState(items)}
45
+ >
46
+ <Table
47
+ responsive="none"
48
+ size="sm"
49
+ {...props}
50
+ >
51
+ <Table.Head>
52
+ <Table.Row>
53
+ <Table.Header>{"id"}</Table.Header>
54
+ <Table.Header>{"name"}</Table.Header>
55
+ <Table.Header>{"task number"}</Table.Header>
56
+ </Table.Row>
57
+ </Table.Head>
58
+ <Table.Body draggableContainer>
59
+ {initialState.map(({ id, task, assignee_name, assignee_img }) => (
60
+ <Table.Row
61
+ dragId={id}
62
+ draggableItem
63
+ key={id}
64
+ >
65
+ <Table.Cell>{id}</Table.Cell>
66
+ <Table.Cell>
67
+ <Flex align="center">
68
+ <Avatar
69
+ imageUrl={assignee_img}
70
+ size="xs"
71
+ />
72
+ <Body
73
+ paddingLeft="xxs"
74
+ text={assignee_name}
75
+ {...props}
76
+ />
77
+ </Flex>
78
+ </Table.Cell>
79
+ <Table.Cell>{task}</Table.Cell>
80
+ </Table.Row>
81
+ ))}
82
+ </Table.Body>
83
+ </Table>
84
+ </DraggableProvider>
85
+ </>
86
+
87
+ );
88
+ };
89
+
90
+ export default DraggableWithTableReact;
@@ -0,0 +1,5 @@
1
+ The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this:
2
+
3
+ - Wrap the Table with the `DraggableProvider` and manage state as shown.
4
+ - use the `draggableContainer` prop on the Table.Body to designate it as the Draggable Container
5
+ - use the `draggableItem` prop on the Table.Row to designate it as the Draggable Item. Make sure to also pass id to the `dragId` prop here.
@@ -1,18 +1,17 @@
1
1
  examples:
2
-
3
-
4
2
  react:
5
3
  - draggable_default: Default
6
4
  - draggable_with_list: Draggable with List Kit
7
5
  - draggable_with_selectable_list: Draggable with SelectableList Kit
8
6
  - draggable_with_cards: Draggable with Cards
7
+ - draggable_with_table_react: Draggable with Table
9
8
  - draggable_multiple_containers: Dragging Across Multiple Containers
10
-
9
+
11
10
  rails:
12
11
  - draggable_default_rails: Default
13
12
  - draggable_with_list_rails: Draggable with List Kit
14
13
  - draggable_with_selectable_list_rails: Draggable with SelectableList Kit
15
14
  - draggable_with_cards_rails: Draggable with Cards
15
+ - draggable_with_table: Draggable with Table
16
+ - draggable_multiple_containers_rails: Dragging Across Multiple Containers
16
17
 
17
-
18
-
@@ -2,4 +2,5 @@ export { default as DraggableDefault } from './_draggable_default.jsx'
2
2
  export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
3
  export { default as DraggableWithList } from './_draggable_with_list.jsx'
4
4
  export { default as DraggableWithSelectableList } from './_draggable_with_selectable_list.jsx'
5
- export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
5
+ export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
6
+ export { default as DraggableWithTableReact } from './_draggable_with_table_react.jsx'
@@ -0,0 +1,8 @@
1
+ <%= pb_rails("button", props: { text: "Push Drawer", margin_right: "sm", data: {"open-drawer": "drawer-3"} }) %>
2
+
3
+ <%= pb_rails("drawer", props: {
4
+ id:"drawer-3",
5
+ behavior: "push"
6
+ }) do %>
7
+ Test me (Push Behavior)
8
+ <% end %>
@@ -0,0 +1,33 @@
1
+ <%= pb_rails("flex") do %>
2
+ <%= pb_rails("button", props: { text: "Drawer with border right", margin_right: "sm", data: {"open-drawer": "drawer-12"} }) %>
3
+
4
+ <%= pb_rails("drawer", props: {
5
+ id:"drawer-12",
6
+ overlay: false,
7
+ border: "right"
8
+ }) do %>
9
+ Test me (Border Right)
10
+ <% end %>
11
+
12
+
13
+ <%= pb_rails("button", props: { text: "Drawer with border left", margin_right: "sm", data: {"open-drawer": "drawer-13"} }) %>
14
+
15
+ <%= pb_rails("drawer", props: {
16
+ id:"drawer-13",
17
+ overlay: false,
18
+ border: "left"
19
+ }) do %>
20
+ Test me (Border Left)
21
+ <% end %>
22
+
23
+ <%= pb_rails("button", props: { text: "Drawer with border full", data: {"open-drawer": "drawer-14"} }) %>
24
+
25
+ <%= pb_rails("drawer", props: {
26
+ id:"drawer-14",
27
+ overlay: false,
28
+ border: "full"
29
+ }) do %>
30
+ Test me (Border Full)
31
+ <% end %>
32
+ <% end %>
33
+
@@ -1 +1,20 @@
1
- <%= pb_rails("drawer") %>
1
+ <%= pb_rails("flex") do %>
2
+ <%= pb_rails("button", props: { text: "Left Drawer", margin_right: "sm", data: {"open-drawer": "drawer-1"} }) %>
3
+
4
+ <%= pb_rails("drawer", props: {
5
+ id:"drawer-1",
6
+ }) do %>
7
+ Test me (Left Drawer)
8
+ <% end %>
9
+
10
+
11
+ <%= pb_rails("button", props: { text: "Right Drawer", data: {"open-drawer": "drawer-2"} }) %>
12
+
13
+ <%= pb_rails("drawer", props: {
14
+ id:"drawer-2",
15
+ placement: "right"
16
+ }) do %>
17
+ Test me (Right Drawer)
18
+ <% end %>
19
+ <% end %>
20
+
@@ -0,0 +1,24 @@
1
+ <%= pb_rails("button", props: { padding: "xs", margin_right: "sm", data: {"open-drawer": "drawer-4"} }) do %>
2
+ <%= pb_rails("icon", props: { icon: "bars", size: "2x" }) %>
3
+ <% end %>
4
+
5
+ <%= pb_rails("drawer", props: {
6
+ id:"drawer-4",
7
+ within_element: true,
8
+ placement: "bottom",
9
+ breakpoint: "md",
10
+ size: "full"
11
+ }) do %>
12
+ <%= pb_rails("nav", props: { display: {xl: "none", lg: "none", md: "none", sm: "block" } }) do %>
13
+ <%= pb_rails("nav/item", props: { text: "Photos", link: "#" }) %>
14
+ <%= pb_rails("nav/item", props: { text: "Music", link: "#" }) %>
15
+ <%= pb_rails("nav/item", props: { text: "Video", link: "#", active: true }) %>
16
+ <%= pb_rails("nav/item", props: { text: "Files", link: "#" }) %>
17
+ <% end %>
18
+ <%= pb_rails("nav", props: { display: {md: "block", sm: "none", xs: "none" }, orientation: "horizontal" }) do %>
19
+ <%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
20
+ <%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
21
+ <%= pb_rails("nav/item", props: { text: "Service ", link: "#" }) %>
22
+ <%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
23
+ <% end %>
24
+ <% end %>
@@ -0,0 +1,21 @@
1
+ <%= pb_rails("flex") do %>
2
+ <%= pb_rails("button", props: { text: "No Overlay Drawer", margin_right: "sm", data: {"open-drawer": "drawer-10"} }) %>
3
+
4
+ <%= pb_rails("drawer", props: {
5
+ id:"drawer-10",
6
+ overlay: false
7
+ }) do %>
8
+ Test me (No Overlay)
9
+ <% end %>
10
+
11
+
12
+ <%= pb_rails("button", props: { text: "Overlay Drawer", data: {"open-drawer": "drawer-11"} }) %>
13
+
14
+ <%= pb_rails("drawer", props: {
15
+ id:"drawer-11",
16
+ placement: "right"
17
+ }) do %>
18
+ Test me (Has Overlay)
19
+ <% end %>
20
+ <% end %>
21
+
@@ -0,0 +1 @@
1
+ Click the button to close the drawer when there is no overlay.
@@ -0,0 +1,49 @@
1
+ <%= pb_rails("flex") do %>
2
+ <%= pb_rails("button", props: { text: "XS Drawer", margin_right: "sm", data: {"open-drawer": "drawer-5"} }) %>
3
+
4
+ <%= pb_rails("drawer", props: {
5
+ id:"drawer-5",
6
+ size: "xs"
7
+ }) do %>
8
+ XS
9
+ <% end %>
10
+
11
+ <%= pb_rails("button", props: { text: "SM Drawer", margin_right: "sm", data: {"open-drawer": "drawer-6"} }) %>
12
+
13
+ <%= pb_rails("drawer", props: {
14
+ id:"drawer-6",
15
+ size: "sm",
16
+ placement: "right"
17
+ }) do %>
18
+ This is a small drawer
19
+ <% end %>
20
+
21
+ <%= pb_rails("button", props: { text: "MD Drawer", margin_right: "sm", data: {"open-drawer": "drawer-7"} }) %>
22
+
23
+ <%= pb_rails("drawer", props: {
24
+ id:"drawer-7",
25
+ size: "md"
26
+ }) do %>
27
+ This is a medium drawer
28
+ <% end %>
29
+
30
+ <%= pb_rails("button", props: { text: "LG Drawer", margin_right: "sm", data: {"open-drawer": "drawer-8"} }) %>
31
+
32
+ <%= pb_rails("drawer", props: {
33
+ id:"drawer-8",
34
+ size: "lg",
35
+ placement: "right"
36
+ }) do %>
37
+ This is a large drawer
38
+ <% end %>
39
+
40
+ <%= pb_rails("button", props: { text: "XL Drawer", margin_right: "sm", data: {"open-drawer": "drawer-9"} }) %>
41
+
42
+ <%= pb_rails("drawer", props: {
43
+ id:"drawer-9",
44
+ size: "xl"
45
+ }) do %>
46
+ This is an extra large drawer
47
+ <% end %>
48
+ <% end %>
49
+
@@ -2,6 +2,11 @@ examples:
2
2
 
3
3
  rails:
4
4
  - drawer_default: Default
5
+ - drawer_behavior: Push Behavior
6
+ - drawer_menu: Within Element
7
+ - drawer_sizes: Sizes
8
+ - drawer_overlay: Overlay
9
+ - drawer_borders: Borders
5
10
 
6
11
 
7
12
  react:
@@ -46,6 +46,7 @@
46
46
  %>
47
47
  <%= form.date_picker :example_date_picker_1, props: { label: true } %>
48
48
  <%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true } %>
49
+ <%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true } %>
49
50
 
50
51
  <%= form.actions do |action| %>
51
52
  <%= action.submit %>
@@ -32,11 +32,12 @@
32
32
  <%= form.url_field :example_url_field_validation, props: { label: true, required: true } %>
33
33
  <%= form.text_area :example_text_area_validation, props: { label: true, required: true } %>
34
34
  <%= form.dropdown_field :example_dropdown_validation, props: { label: true, options: example_dropdown_options, required: true } %>
35
- <%= form.select :example_select_validation, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true } %>
35
+ <%= form.select :example_select_validation, [ ["Yes", 1], ["No", 2] ], props: { label: true, blank_selection: "Select One...", required: true, validation_message: "Please, select an option." } %>
36
36
  <%= form.collection_select :example_collection_select_validation, example_collection, :value, :name, props: { label: true, blank_selection: "Select One...", required: true } %>
37
37
  <%= form.check_box :example_checkbox, props: { text: "Example Checkbox", label: true, required: true } %>
38
38
  <%= form.date_picker :example_date_picker_2, props: { label: true, required: true } %>
39
39
  <%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
40
+ <%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true, blank_selection: "Select a Time Zone...", required: true } %>
40
41
 
41
42
  <%= form.actions do |action| %>
42
43
  <%= action.submit %>
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("home_address_street", props: {
2
+ address: "70 pRoSpEcT ave",
3
+ address_cont: "Apt M18",
4
+ city: "West Chester",
5
+ home_id: 8250263,
6
+ home_url: "https://powerhrg.com/",
7
+ preserve_case: true,
8
+ state: "pa",
9
+ zipcode: "19382",
10
+ territory: "PHL",
11
+ }) %>
@@ -0,0 +1,22 @@
1
+ import React from 'react'
2
+
3
+ import HomeAddressStreet from '../_home_address_street'
4
+
5
+ const HomeAddressStreetFormatting = (props) => {
6
+ return (
7
+ <HomeAddressStreet
8
+ address="70 pRoSpEcT ave"
9
+ addressCont="Apt M18"
10
+ city="West Chester"
11
+ homeId="8250263"
12
+ homeUrl="https://powerhrg.com/"
13
+ preserveCase
14
+ state="pa"
15
+ territory="PHL"
16
+ zipcode="19382"
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+
22
+ export default HomeAddressStreetFormatting
@@ -0,0 +1 @@
1
+ The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserve_case: true`, the street address will be rendered exactly as entered, without automatic title capitalization.
@@ -0,0 +1 @@
1
+ The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserveCase`, the street address will be rendered exactly as entered, without automatic title capitalization.
@@ -5,12 +5,14 @@ examples:
5
5
  - home_address_street_emphasis: Emphasis
6
6
  - home_address_street_modified: Modified
7
7
  - home_address_street_link: Link
8
+ - home_address_street_formatting: Formatting
8
9
 
9
10
  react:
10
11
  - home_address_street_default: Default
11
12
  - home_address_street_emphasis: Emphasis
12
13
  - home_address_street_modified: Modified
13
14
  - home_address_street_link: Link
15
+ - home_address_street_formatting: Formatting
14
16
 
15
17
  swift:
16
18
  - home_address_street_default_swift: Default
@@ -2,3 +2,4 @@ export { default as HomeAddressStreetDefault } from './_home_address_street_defa
2
2
  export { default as HomeAddressStreetEmphasis } from './_home_address_street_emphasis.jsx'
3
3
  export { default as HomeAddressStreetModified } from './_home_address_street_modified.jsx'
4
4
  export { default as HomeAddressStreetLink } from './_home_address_street_link.jsx'
5
+ export { default as HomeAddressStreetFormatting } from './_home_address_street_formatting.jsx'
@@ -1,3 +1,2 @@
1
1
  <%= pb_rails("icon_button") %>
2
- </br>
3
- <%= pb_rails("icon_button", props: {variant: "link"}) %>
2
+ <%= pb_rails("icon_button", props: {variant: "link", margin_top: "md" }) %>
@@ -0,0 +1,17 @@
1
+ import React from 'react'
2
+ import { IconButton } from 'playbook-ui'
3
+
4
+ const IconButtonDefault = (props) => (
5
+ <div>
6
+ <IconButton
7
+ {...props}
8
+ />
9
+ <IconButton
10
+ {...props}
11
+ marginTop="md"
12
+ variant="link"
13
+ />
14
+ </div>
15
+ )
16
+
17
+ export default IconButtonDefault
@@ -0,0 +1,27 @@
1
+ <%= pb_rails("flex", props: { align: "center"}) do %>
2
+ <%= pb_rails("icon_button", props: {size: "lg"}) %> <span>Large</span>
3
+ <% end %>
4
+
5
+ <%= pb_rails("flex", props: { align: "center" }) do %>
6
+ <%= pb_rails("icon_button", props: {size: "sm"}) %> <span>Small</span>
7
+ <% end %>
8
+
9
+ <%= pb_rails("flex", props: { align: "center" }) do %>
10
+ <%= pb_rails("icon_button", props: {size: "xs"}) %> <span>XSmall</span>
11
+ <% end %>
12
+
13
+ <%= pb_rails("flex", props: { align: "center", margin_top: "md" }) do %>
14
+ <%= pb_rails("icon_button", props: {size: "1x"}) %> <span>1x</span>
15
+ <% end %>
16
+
17
+ <%= pb_rails("flex", props: { align: "center" }) do %>
18
+ <%= pb_rails("icon_button", props: {size: "2x"}) %> <span>2x</span>
19
+ <% end %>
20
+
21
+ <%= pb_rails("flex", props: { align: "center" }) do %>
22
+ <%= pb_rails("icon_button", props: {size: "3x"}) %> <span>3x</span>
23
+ <% end %>
24
+
25
+ <%= pb_rails("flex", props: { align: "center" }) do %>
26
+ <%= pb_rails("icon_button", props: {size: "4x"}) %> <span>4x</span>
27
+ <% end %>
@@ -0,0 +1,61 @@
1
+ import React from 'react'
2
+ import { IconButton, Flex } from 'playbook-ui'
3
+
4
+ const IconButtonSizes = (props) => (
5
+ <div>
6
+ <Flex align="center">
7
+ <IconButton
8
+ {...props}
9
+ size="lg"
10
+ />
11
+ <span>Large</span>
12
+ </Flex>
13
+ <Flex align="center">
14
+ <IconButton
15
+ {...props}
16
+ size="sm"
17
+ />
18
+ <span>Small</span>
19
+ </Flex>
20
+ <Flex align="center">
21
+ <IconButton
22
+ {...props}
23
+ size="xs"
24
+ />
25
+ <span>XSmall</span>
26
+ </Flex>
27
+ <Flex
28
+ align="center"
29
+ marginTop="md"
30
+ >
31
+ <IconButton
32
+ {...props}
33
+ size="1x"
34
+ />
35
+ <span>1x</span>
36
+ </Flex>
37
+ <Flex align="center">
38
+ <IconButton
39
+ {...props}
40
+ size="2x"
41
+ />
42
+ <span>2x</span>
43
+ </Flex>
44
+ <Flex align="center">
45
+ <IconButton
46
+ {...props}
47
+ size="3x"
48
+ />
49
+ <span>3x</span>
50
+ </Flex>
51
+ <Flex align="center">
52
+ <IconButton
53
+ {...props}
54
+ size="4x"
55
+ />
56
+ <span>4x</span>
57
+ </Flex>
58
+ </div>
59
+ )
60
+
61
+ export default IconButtonSizes
@@ -2,6 +2,8 @@ examples:
2
2
 
3
3
  rails:
4
4
  - icon_button_default: Default
5
-
6
-
7
-
5
+ - icon_button_sizes: Sizes
6
+
7
+ react:
8
+ - icon_button_default: Default
9
+ - icon_button_sizes: Sizes
@@ -0,0 +1,2 @@
1
+ export { default as IconButtonDefault } from './_icon_button_default.jsx'
2
+ export { default as IconButtonSizes } from './_icon_button_sizes.jsx'
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("overlay", props: { layout: { "x": "xl" }, color: "card_light", dynamic: true }) do %>
2
+ <%= pb_rails("flex", props: { column_gap: "lg", orientation: "row", overflow_x: "auto" }) do %>
3
+ <% 15.times do %>
4
+ <%= pb_rails("flex/flex_item") do %>
5
+ <%= pb_rails("card") do %>
6
+ Card content
7
+ <% end %>
8
+ <% end %>
9
+ <% end %>
10
+ <% end %>
11
+ <% end %>
@@ -0,0 +1,37 @@
1
+ import React, { forwardRef } from 'react'
2
+ import {
3
+ Overlay,
4
+ Card,
5
+ Flex,
6
+ FlexItem,
7
+ } from 'playbook-ui'
8
+
9
+ const InlineCardsExample = forwardRef(function InlineCardsExample(ref) {
10
+ return (
11
+ <Flex
12
+ columnGap="lg"
13
+ orientation="row"
14
+ ref={ref}
15
+ >
16
+ {Array.from({ length: 15 }, (_, index) => (
17
+ <FlexItem key={index}>
18
+ <Card>{"Card Content"}</Card>
19
+ </FlexItem>
20
+ ))}
21
+ </Flex>
22
+ )
23
+ })
24
+
25
+ const OverlayVerticalDynamicMultiDirectional = () => (
26
+ <>
27
+ <Overlay
28
+ color="card_light"
29
+ dynamic
30
+ layout={{"x": "xl"}}
31
+ >
32
+ <InlineCardsExample />
33
+ </Overlay>
34
+ </>
35
+ )
36
+
37
+ export default OverlayVerticalDynamicMultiDirectional
@@ -0,0 +1 @@
1
+ Pass the `dynamic` prop to make the overlay render while the scrollbar isn't at either end on the scrollbar.