playbook_ui_docs 14.16.0.pre.rc.6 → 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7256

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 (98) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  11. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
  12. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
  13. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  14. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  15. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
  16. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
  17. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +181 -0
  18. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
  19. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +99 -0
  20. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
  21. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
  23. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
  25. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +9 -6
  26. data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
  27. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
  28. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  33. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
  34. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
  35. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  36. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +20 -5
  37. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
  38. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
  39. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
  40. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
  41. data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +394 -0
  43. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  44. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  45. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  46. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
  47. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
  48. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
  49. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
  50. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +4 -0
  51. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +3 -1
  52. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  53. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  54. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  55. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  56. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  57. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  58. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  59. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +3 -0
  60. data/app/pb_kits/playbook/pb_overlay/docs/index.js +3 -0
  61. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
  63. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  64. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
  65. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  66. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
  67. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  68. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
  69. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  70. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
  71. data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
  72. data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
  73. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
  74. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
  75. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  76. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  77. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  78. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
  79. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
  80. data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
  81. data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
  82. data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
  83. data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
  84. data/dist/playbook-doc.js +1 -1
  85. metadata +58 -16
  86. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.md → _advanced_table_selectable_rows_no_subrows_react.md} +0 -0
  87. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
  88. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
  89. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
  90. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
  91. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
  92. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
  93. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
  94. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
  95. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
  96. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
  97. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
  98. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -0,0 +1,110 @@
1
+ import React, { useState } from "react";
2
+ import Flex from '../../pb_flex/_flex'
3
+ import Caption from '../../pb_caption/_caption'
4
+ import Draggable from '../_draggable'
5
+ import { DraggableProvider } from '../context'
6
+ import Image from '../../pb_image/_image'
7
+
8
+
9
+
10
+ const dataLineVertical = [
11
+ {
12
+ id: "211",
13
+ url: "https://unsplash.it/500/400/?image=633",
14
+ },
15
+ {
16
+ id: "212",
17
+ url: "https://unsplash.it/500/400/?image=634",
18
+ },
19
+ {
20
+ id: "213",
21
+ url: "https://unsplash.it/500/400/?image=637",
22
+ },
23
+ ];
24
+
25
+ const dataLineHorizontal = [
26
+ {
27
+ id: "2111",
28
+ url: "https://unsplash.it/500/400/?image=633",
29
+ },
30
+ {
31
+ id: "2122",
32
+ url: "https://unsplash.it/500/400/?image=634",
33
+ },
34
+ {
35
+ id: "2133",
36
+ url: "https://unsplash.it/500/400/?image=637",
37
+ },
38
+ ];
39
+
40
+ const DraggableDropZones = (props) => {
41
+ const [initialLineVerticalState, setInitialLineVerticalState] = useState(dataLineVertical);
42
+ const [initialLineHorizontalState, setInitialLineHorizontalState] = useState(dataLineHorizontal);
43
+
44
+ return (
45
+ <>
46
+ <Caption marginBottom="xs"
47
+ marginTop="xl"
48
+ text="Vertical"
49
+ />
50
+ <DraggableProvider
51
+ dropZone={{ type: "line", color: "purple" }}
52
+ initialItems={dataLineVertical}
53
+ onReorder={(items) => setInitialLineVerticalState(items)}
54
+ >
55
+ <Draggable.Container {...props}>
56
+ <Flex flexDirection="column"
57
+ height="367px"
58
+ >
59
+ {initialLineVerticalState.map(({ id, url }) => (
60
+ <Draggable.Item dragId={id}
61
+ key={id}
62
+ marginBottom="sm"
63
+ >
64
+ <Image alt={id}
65
+ size="md"
66
+ url={url}
67
+ />
68
+ </Draggable.Item>
69
+ ))}
70
+ </Flex>
71
+ </Draggable.Container>
72
+ </DraggableProvider>
73
+ <Caption marginBottom="xs"
74
+ marginTop="xl"
75
+ text="Horizontal"
76
+ />
77
+ <Flex>
78
+ <DraggableProvider
79
+ dropZone={{ type: "line", direction: "horizontal" }}
80
+ initialItems={dataLineHorizontal}
81
+ onReorder={(items) => setInitialLineHorizontalState(items)}
82
+ >
83
+ <Draggable.Container
84
+ htmlOptions={{style:{ width: "285px"}}}
85
+ {...props}
86
+ >
87
+ <Flex alignItems="stretch"
88
+ flexDirection="row"
89
+ height="110px"
90
+ >
91
+ {initialLineHorizontalState.map(({ id, url }) => (
92
+ <Draggable.Item dragId={id}
93
+ key={id}
94
+ marginRight="sm"
95
+ >
96
+ <Image alt={id}
97
+ size="md"
98
+ url={url}
99
+ />
100
+ </Draggable.Item>
101
+ ))}
102
+ </Flex>
103
+ </Draggable.Container>
104
+ </DraggableProvider>
105
+ </Flex>
106
+ </>
107
+ );
108
+ };
109
+
110
+ export default DraggableDropZones;
@@ -0,0 +1,5 @@
1
+ When using the "line" style, make sure to set the appropriate `direction` attribute within the `dropZone` prop based on the orientation of your draggable view. By default, this is set to "vertical," but it can also be adjusted to "horizontal." Note that the direction attribute only applies to the "line" style and does not affect other drop zone styles. The default `color` for "line" is "primary" and "purple" is the only alternative color option.
2
+
3
+ The length of the line is calculated based off of the width (for "vertical") or height (for "horizontal") of the parent container holding the draggable items.
4
+
5
+ Additionally, if the parent container of the `DraggableProvider`/`DraggableContainer` (or a subcontainer within) does not have a set height (for "vertical") or width (for "horizontal"), like the [Draggable Drop Zones doc example](https://playbook.powerapp.cloud/kits/draggable/react#draggable-drop-zones) does, elements on the page may jump up (for "vertical") or to the left (for "horizontal") when an item is actively being dragged. To prevent this, give a parent element a fixed height (for "vertical") or width (for "horizontal") as demonstrated in this doc example.
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
 
3
3
  import Flex from '../../pb_flex/_flex'
4
- import { DraggableProvider } from '../../pb_draggable/context'
4
+ import { DraggableProvider } from '../context'
5
5
  import Avatar from '../../pb_avatar/_avatar'
6
6
  import Body from '../../pb_body/_body'
7
7
  import Table from '../../pb_table/_table'
@@ -2,4 +2,6 @@ The draggable kit can also be used in conjunction with the table kit to create d
2
2
 
3
3
  - Wrap the Table with the `DraggableProvider` and manage state as shown.
4
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.
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.
6
+
7
+ We recommending using the default `dropZone type` with the Table kit.
@@ -4,14 +4,17 @@ examples:
4
4
  - draggable_with_list: Draggable with List Kit
5
5
  - draggable_with_selectable_list: Draggable with SelectableList Kit
6
6
  - draggable_with_cards: Draggable with Cards
7
- - draggable_with_table_react: Draggable with Table
7
+ - draggable_with_table: Draggable with Table
8
8
  - draggable_multiple_containers: Dragging Across Multiple Containers
9
+ - draggable_drop_zones: Draggable Drop Zones
10
+ - draggable_drop_zones_colors: Draggable Drop Zones Colors
11
+ - draggable_drop_zones_line: Draggable Drop Zones Line
9
12
 
10
13
  rails:
11
- - draggable_default_rails: Default
12
- - draggable_with_list_rails: Draggable with List Kit
13
- - draggable_with_selectable_list_rails: Draggable with SelectableList Kit
14
- - draggable_with_cards_rails: Draggable with Cards
14
+ - draggable_default: Default
15
+ - draggable_with_list: Draggable with List Kit
16
+ - draggable_with_selectable_list: Draggable with SelectableList Kit
17
+ - draggable_with_cards: Draggable with Cards
15
18
  - draggable_with_table: Draggable with Table
16
- - draggable_multiple_containers_rails: Dragging Across Multiple Containers
19
+ - draggable_multiple_containers: Dragging Across Multiple Containers
17
20
 
@@ -3,4 +3,7 @@ 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
5
  export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
6
- export { default as DraggableWithTableReact } from './_draggable_with_table_react.jsx'
6
+ export { default as DraggableWithTable } from './_draggable_with_table.jsx'
7
+ export { default as DraggableDropZones } from './_draggable_drop_zones.jsx'
8
+ export { default as DraggableDropZonesColors } from './_draggable_drop_zones_colors.jsx'
9
+ export { default as DraggableDropZonesLine } from './_draggable_drop_zones_line.jsx'
@@ -0,0 +1,3 @@
1
+
2
+ <%= pb_rails("body", props: { text: " The breakpoint prop determines when the Drawer is always visible. Above the specified breakpoint, the Drawer remains open on the page. Below it, only the trigger element is shown, allowing you to toggle the drawer open and closed. To see this in action, click the button below and resize your window.", padding_bottom: "md" }) %>
3
+ <%= pb_rails("button", props: { text: "Open Doc Example in New Tab", new_window: true, link: "/drawer_page", margin_right: "lg" }) %>
@@ -6,6 +6,7 @@ examples:
6
6
  - drawer_menu: Within Element
7
7
  - drawer_sizes: Sizes
8
8
  - drawer_overlay: Overlay
9
+ - drawer_breakpoints: Breakpoints
9
10
  - drawer_borders: Borders
10
11
 
11
12
 
@@ -12,7 +12,7 @@ const DropdownWithAutocomplete = (props) => {
12
12
  label: "Jasper Furniss",
13
13
  value: "Jasper Furniss",
14
14
  territory: "PHL",
15
- title: "Senior UX Engineer",
15
+ title: "Lead UX Engineer",
16
16
  id: "jasper-furniss",
17
17
  status: "Offline"
18
18
  },
@@ -25,18 +25,18 @@ const DropdownWithAutocomplete = (props) => {
25
25
  status: "Away"
26
26
  },
27
27
  {
28
- label: "Jason Cypret",
29
- value: "Jason Cypret",
28
+ label: "Carlos Lima",
29
+ value: "Carlos Lima",
30
30
  territory: "PHL",
31
- title: "VP of User Experience",
32
- id: "jason-cypret",
31
+ title: "Nitro Developer",
32
+ id: "carlos-lima",
33
33
  status: "Online"
34
34
  },
35
35
  {
36
36
  label: "Courtney Long",
37
37
  value: "Courtney Long",
38
38
  territory: "PHL",
39
- title: "UX Design Mentor",
39
+ title: "Lead UX Designer",
40
40
  id: "courtney-long",
41
41
  status: "Online"
42
42
  }
@@ -15,7 +15,7 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -15,7 +15,7 @@ const DropdownWithCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -1,10 +1,10 @@
1
1
  <%
2
- options = [
2
+ options = [
3
3
  {
4
4
  label: "Jasper Furniss",
5
5
  value: "Jasper Furniss",
6
6
  territory: "PHL",
7
- title: "Senior UX Engineer",
7
+ title: "Lead UX Engineer",
8
8
  id: "jasper-furniss",
9
9
  status: "Offline"
10
10
  },
@@ -17,22 +17,22 @@
17
17
  status: "Away"
18
18
  },
19
19
  {
20
- label: "Jason Cypret",
21
- value: "Jason Cypret",
20
+ label: "Carlos Lima",
21
+ value: "Carlos Lima",
22
22
  territory: "PHL",
23
- title: "VP of User Experience",
24
- id: "jason-cypret",
23
+ title: "Nitro Developer",
24
+ id: "carlos-lima",
25
25
  status: "Online"
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
29
  value: "Courtney Long",
30
30
  territory: "PHL",
31
- title: "UX Design Mentor",
31
+ title: "Lead UX Designer",
32
32
  id: "courtney-long",
33
33
  status: "Online"
34
34
  }
35
- ]
35
+ ];
36
36
 
37
37
  %>
38
38
 
@@ -22,6 +22,72 @@
22
22
 
23
23
  %>
24
24
 
25
+ <% treeData = [{
26
+ label: "Power Home Remodeling",
27
+ value: "Power Home Remodeling",
28
+ id: "100",
29
+ expanded: true,
30
+ children: [
31
+ {
32
+ label: "People",
33
+ value: "People",
34
+ id: "101",
35
+ expanded: true,
36
+ children: [
37
+ {
38
+ label: "Talent Acquisition",
39
+ value: "Talent Acquisition",
40
+ id: "102",
41
+ },
42
+ {
43
+ label: "Business Affairs",
44
+ value: "Business Affairs",
45
+ id: "103",
46
+ children: [
47
+ {
48
+ label: "Initiatives",
49
+ value: "Initiatives",
50
+ id: "104",
51
+ },
52
+ {
53
+ label: "Learning & Development",
54
+ value: "Learning & Development",
55
+ id: "105",
56
+ },
57
+ ],
58
+ },
59
+ {
60
+ label: "People Experience",
61
+ value: "People Experience",
62
+ id: "106",
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ label: "Contact Center",
68
+ value: "Contact Center",
69
+ id: "107",
70
+ children: [
71
+ {
72
+ label: "Appointment Management",
73
+ value: "Appointment Management",
74
+ id: "108",
75
+ },
76
+ {
77
+ label: "Customer Service",
78
+ value: "Customer Service",
79
+ id: "109",
80
+ },
81
+ {
82
+ label: "Energy",
83
+ value: "Energy",
84
+ id: "110",
85
+ },
86
+ ],
87
+ },
88
+ ],
89
+ }] %>
90
+
25
91
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
26
92
  <%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
27
93
  <%= form.text_field :example_text_field, props: { label: true } %>
@@ -47,6 +113,7 @@
47
113
  <%= form.date_picker :example_date_picker_1, props: { label: true } %>
48
114
  <%= form.star_rating_field :example_star_rating, props: { variant: "interactive", label: true } %>
49
115
  <%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: true } %>
116
+ <%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form-default", tree_data: treeData, margin_bottom: "sm", label: "Example Multi Level Select field" } %>
50
117
 
51
118
  <%= form.actions do |action| %>
52
119
  <%= action.submit %>
@@ -21,6 +21,72 @@
21
21
  ]
22
22
  %>
23
23
 
24
+ <% treeData = [{
25
+ label: "Power Home Remodeling",
26
+ value: "Power Home Remodeling",
27
+ id: "100",
28
+ expanded: true,
29
+ children: [
30
+ {
31
+ label: "People",
32
+ value: "People",
33
+ id: "101",
34
+ expanded: true,
35
+ children: [
36
+ {
37
+ label: "Talent Acquisition",
38
+ value: "Talent Acquisition",
39
+ id: "102",
40
+ },
41
+ {
42
+ label: "Business Affairs",
43
+ value: "Business Affairs",
44
+ id: "103",
45
+ children: [
46
+ {
47
+ label: "Initiatives",
48
+ value: "Initiatives",
49
+ id: "104",
50
+ },
51
+ {
52
+ label: "Learning & Development",
53
+ value: "Learning & Development",
54
+ id: "105",
55
+ },
56
+ ],
57
+ },
58
+ {
59
+ label: "People Experience",
60
+ value: "People Experience",
61
+ id: "106",
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ label: "Contact Center",
67
+ value: "Contact Center",
68
+ id: "107",
69
+ children: [
70
+ {
71
+ label: "Appointment Management",
72
+ value: "Appointment Management",
73
+ id: "108",
74
+ },
75
+ {
76
+ label: "Customer Service",
77
+ value: "Customer Service",
78
+ id: "109",
79
+ },
80
+ {
81
+ label: "Energy",
82
+ value: "Energy",
83
+ id: "110",
84
+ },
85
+ ],
86
+ },
87
+ ],
88
+ }] %>
89
+
24
90
  <%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
25
91
  <%= form.typeahead :example_typeahead_validation, props: { data: { typeahead_example2: true, user: {} }, label: true, placeholder: "Search for a user", required: true, validation: { message: "Please select a user." } } %>
26
92
  <%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
@@ -38,6 +104,7 @@
38
104
  <%= form.date_picker :example_date_picker_2, props: { label: true, required: true, validation_message: "Please, select a date.", allow_input: true } %>
39
105
  <%= form.star_rating_field :example_star_rating_validation, props: { variant: "interactive", label: true, required: true } %>
40
106
  <%= 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 } %>
107
+ <%= form.multi_level_select :example_multi_level_select, props: { id: "multi-level-select-form", tree_data: treeData, margin_bottom: "sm", required: true, label: "Example Multi Level Select field" } %>
41
108
 
42
109
  <%= form.actions do |action| %>
43
110
  <%= action.submit %>
@@ -1,5 +1,4 @@
1
- <div>
2
-
1
+ <%= pb_rails("flex", props: {orientation: "column", row_gap:"md"}) do %>
3
2
  <%= pb_rails("form_group") do %>
4
3
  <%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
5
4
  <%= pb_rails("select", props: {
@@ -17,8 +16,6 @@
17
16
  ]
18
17
  }) %>
19
18
  <% end %>
20
- <br>
21
- <br>
22
19
  <%= pb_rails("form_group") do %>
23
20
  <%= pb_rails("select", props: {
24
21
  blank_selection: "Phone",
@@ -32,4 +29,17 @@
32
29
  id: "phone"
33
30
  }) %>
34
31
  <% end %>
35
- </div>
32
+ <%= pb_rails("form_group") do %>
33
+ <%= pb_rails("phone_number_input", props: {
34
+ id: "phone2"
35
+ }) %>
36
+ <%= pb_rails("select", props: {
37
+ blank_selection: "Phone",
38
+ options: [
39
+ { value: "Cell" },
40
+ { value: "Work" },
41
+ { value: "Home" },
42
+ ]
43
+ }) %>
44
+ <% end %>
45
+ <% end %>
@@ -4,6 +4,7 @@ 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
+ import Flex from '../../pb_flex/_flex'
7
8
 
8
9
  const FormGroupSelect = (props) => {
9
10
  const options = [
@@ -25,7 +26,10 @@ const FormGroupSelect = (props) => {
25
26
  ]
26
27
 
27
28
  return (
28
- <div>
29
+ <Flex
30
+ orientation="column"
31
+ rowGap="md"
32
+ >
29
33
  <FormGroup>
30
34
  <TextInput
31
35
  placeholder="Enter Artist Name"
@@ -37,18 +41,29 @@ const FormGroupSelect = (props) => {
37
41
  {...props}
38
42
  />
39
43
  </FormGroup>
40
- <br />
41
- <br />
42
44
  <FormGroup>
43
45
  <Select
44
46
  blankSelection="Phone"
45
47
  options={phoneOptions}
46
- />
48
+ {...props}
49
+ />
47
50
  <PhoneNumberInput
48
51
  id='default'
52
+ {...props}
49
53
  />
50
54
  </FormGroup>
51
- </div>
55
+ <FormGroup>
56
+ <PhoneNumberInput
57
+ id='default-2'
58
+ {...props}
59
+ />
60
+ <Select
61
+ blankSelection="Phone"
62
+ options={phoneOptions}
63
+ {...props}
64
+ />
65
+ </FormGroup>
66
+ </Flex>
52
67
  )
53
68
  }
54
69
 
@@ -1,5 +1,11 @@
1
- <%= pb_rails("flex", props: {orientation: "column"}) do %>
2
- <%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary", padding_bottom: "sm", size: "2x" }) %>
3
- <%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4", padding_bottom: "sm", size: "2x" }) %>
1
+ <%= pb_rails("flex", props: { margin_bottom: "sm" }) do %>
2
+ <%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary", size: "2x" }) %>
3
+ <%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4", size: "2x" }) %>
4
4
  <%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "product_5_background", size: "2x" }) %>
5
- <% end %>
5
+ <% end %>
6
+
7
+ <%= pb_rails("flex", props: {}) do %>
8
+ <%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "light", size: "2x" }) %>
9
+ <%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "lighter", size: "2x" }) %>
10
+ <%= pb_rails("icon", props: { icon: "roofing", fixed_width: true, color: "link", size: "2x" }) %>
11
+ <% end %>