playbook_ui_docs 14.16.0.pre.rc.6 → 14.17.0.pre.rc.1

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
  8. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
  9. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +184 -0
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +97 -0
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
  14. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
  15. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
  16. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
  17. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
  18. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
  19. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
  20. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
  21. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
  22. data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
  23. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
  24. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
  25. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
  26. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
  27. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +4 -0
  28. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +3 -1
  29. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
  30. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
  31. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
  34. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  35. data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
  36. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
  37. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
  38. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  39. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  40. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
  41. data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
  42. data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
  43. data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
  44. data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
  45. data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
  46. data/dist/playbook-doc.js +1 -1
  47. metadata +27 -4
  48. /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
  49. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a795d3982e6eae719045694860de4dd220660630efdfe679b6031c9b015eb48d
4
- data.tar.gz: 82decbf768ad0b218da1fef05226094f05a061434146aa2610de5a59148d9cb6
3
+ metadata.gz: edf61a4d1a577d2a3c56cc53a01551e17279ab70276ec775422380f4c6d3a80f
4
+ data.tar.gz: 1a4a0395752a1f8b93a49268ba74b334a4c1d9cf904f1e99125eac0964cb77f1
5
5
  SHA512:
6
- metadata.gz: babb53fef431c4d5c087801ed13a62541029ee133764c880c042039a67228d3194c9a4037c3701ef9976878b91d5631fe4cf2d55def6d97884735305182de0f5
7
- data.tar.gz: 5e0ff49720845f9b9be58b9e5b5970d78d0daf9fd4ed67f37b3134ed746bedd5ecac1b53aca0a23cc3a894ab2afeb831c2b49f46b7ce62fd7cf68a1f14831b2d
6
+ metadata.gz: 51ab2651479039cc9833f246c3f0b22b092e2b0d3e9792994a7da6b01e31e807e4a884b3323319ce052f12816b40ddc9a70073f39ed56eca60d0d507213d8c27
7
+ data.tar.gz: 65f600b03d1f304227332f49a5bb3d9c80a5e28d8ef4ee59dcfb92f80e55ffdb0ec113952eca27818174b9f00609b01236402d60963d34cf6a461159255d2073
@@ -40,7 +40,6 @@ const AdvancedTablePagination = (props) => {
40
40
  <AdvancedTable
41
41
  columnDefinitions={columnDefinitions}
42
42
  pagination
43
- responsive="none"
44
43
  tableData={PAGINATION_MOCK_DATA}
45
44
  {...props}
46
45
  />
@@ -0,0 +1,39 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ]
32
+
33
+ subrow_headers = ["Quarter", "Month", "Day"]
34
+ %>
35
+
36
+ <%= pb_rails("advanced_table", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, selectable_rows: true }) do %>
37
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions, selectable_rows: true }) %>
38
+ <%= pb_rails("advanced_table/table_body", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all", selectable_rows: true }) %>
39
+ <% end %>
@@ -0,0 +1,33 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <%= pb_rails("advanced_table", props: { id: "selectable_rows_no_subrows", table_data: @table_data_no_subrows, column_definitions: column_definitions, selectable_rows: true, enable_toggle_expansion: "none", }) %>
@@ -0,0 +1 @@
1
+ `selectable_rows` can also be used with tables without nested row data. Set `enable_toggle_expansion: none` to adjust the Advanced Table styling to fit a table without subrows.
@@ -0,0 +1,6 @@
1
+ `selectable_rows` is a boolean prop that if present will add checkboxes to all rows that will allow for selecting rows.
2
+
3
+ When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.
4
+
5
+ __ALERT TO DEVS__: UPDATE THIS PARAGRAPH IN THE FOLLOW UP STORY WHEN CHECKBOX FUNCTIONALITY IS SET PLEASE
6
+ The `onRowSelectionChange` prop returns an array of ids of all Rows that have been selected. Open the console on this example and check and uncheck checkboxes to see this is action! __NOTE__: Each object within the `tableData`Array must contain a unique id in order to attach an id to all Rows for this to function.
@@ -11,6 +11,8 @@ examples:
11
11
  - advanced_table_custom_cell_rails: Custom Components for Cells
12
12
  - advanced_table_column_headers: Multi-Header Columns
13
13
  - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
14
+ # - advanced_table_selectable_rows: Selectable Rows
15
+ # - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
14
16
 
15
17
 
16
18
  react:
@@ -4,14 +4,3 @@
4
4
  inline: true,
5
5
  picker_id: "date-picker-inline"
6
6
  }) %>
7
-
8
- <%= javascript_tag do %>
9
- window.addEventListener("DOMContentLoaded", (event) => {
10
- const fpInline = document.querySelector("#date-picker-inline")._flatpickr
11
- <!-- Display the angle-down icon when a date has been selected -->
12
- const showAngleDownHandler = () => {
13
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
14
- }
15
- fpInline.config.onChange.push(showAngleDownHandler)
16
- })
17
- <% end %>
@@ -3,19 +3,12 @@ import React from 'react'
3
3
  import DatePicker from '../_date_picker'
4
4
 
5
5
  const DatePickerInline = (props) => {
6
- const showAngleDownHandler = (dateSelected) => {
7
- if (dateSelected) {
8
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
9
- }
10
- }
11
-
12
6
  return (
13
7
  <div>
14
8
  <DatePicker
15
9
  className="inline-date-picker"
16
10
  hideIcon
17
11
  inLine
18
- onChange={showAngleDownHandler}
19
12
  pickerId="date-picker-inline"
20
13
  {...props}
21
14
  />
@@ -0,0 +1,184 @@
1
+ import React, { useState } from "react";
2
+ import Body from '../../pb_body/_body'
3
+ import Flex from '../../pb_flex/_flex'
4
+ import FlexItem from '../../pb_flex/_flex_item'
5
+ import Card from '../../pb_card/_card'
6
+ import Caption from '../../pb_caption/_caption'
7
+ import Draggable from '../../pb_draggable/_draggable'
8
+ import { DraggableProvider } from '../../pb_draggable/context'
9
+
10
+ // Initial items to be dragged
11
+ const dataShadow = [
12
+ {
13
+ id: "51",
14
+ text: "Task 1",
15
+ },
16
+ {
17
+ id: "52",
18
+ text: "Task 2",
19
+ },
20
+ {
21
+ id: "53",
22
+ text: "Task 3",
23
+ },
24
+ ];
25
+
26
+ const dataOutline = [
27
+ {
28
+ id: "61",
29
+ text: "Task 1",
30
+ },
31
+ {
32
+ id: "62",
33
+ text: "Task 2",
34
+ },
35
+ {
36
+ id: "63",
37
+ text: "Task 3",
38
+ },
39
+ ];
40
+
41
+ const dataLine = [
42
+ {
43
+ id: "71",
44
+ text: "Task 1",
45
+ },
46
+ {
47
+ id: "72",
48
+ text: "Task 2",
49
+ },
50
+ {
51
+ id: "73",
52
+ text: "Task 3",
53
+ },
54
+ ];
55
+
56
+ const DraggableDropZones = (props) => {
57
+ const [initialShadowState, setInitialShadowState] = useState(dataShadow);
58
+ const [initialOutlineState, setInitialOutlineState] = useState(dataOutline);
59
+ const [initialLineState, setInitialLineState] = useState(dataLine);
60
+
61
+ return (
62
+ <>
63
+ <Flex justify="between"
64
+ {...props}
65
+ >
66
+ <FlexItem marginRight="xl">
67
+ <DraggableProvider
68
+ dropZone={{type: "shadow"}}
69
+ initialItems={dataShadow}
70
+ onReorder={(items) => setInitialShadowState(items)}
71
+ >
72
+ <Caption
73
+ marginBottom="xs"
74
+ textAlign="center"
75
+ >
76
+ {"Shadow"}
77
+ </Caption>
78
+ <Draggable.Container
79
+ htmlOptions={{style:{ width: "200px"}}}
80
+ {...props}
81
+ >
82
+ {initialShadowState.map(({ id, text }) => (
83
+ <Card dragId={id}
84
+ draggableItem
85
+ key={id}
86
+ marginBottom="xs"
87
+ padding="xs"
88
+ {...props}
89
+ >
90
+ <Flex alignItems="stretch"
91
+ flexDirection="column"
92
+ >
93
+ <Body
94
+ text={text}
95
+ {...props}
96
+ />
97
+ </Flex>
98
+ </Card>
99
+ ))}
100
+ </Draggable.Container>
101
+ </DraggableProvider>
102
+ </FlexItem>
103
+ <FlexItem marginRight="xl">
104
+ <DraggableProvider
105
+ dropZone={{type: "outline"}}
106
+ initialItems={dataOutline}
107
+ onReorder={(items) => setInitialOutlineState(items)}
108
+ >
109
+ <Caption
110
+ marginBottom="xs"
111
+ textAlign="center"
112
+ >
113
+ {"Outline"}
114
+ </Caption>
115
+ <Draggable.Container
116
+ htmlOptions={{style:{ width: "200px"}}}
117
+ {...props}
118
+ >
119
+ {initialOutlineState.map(({ id, text }) => (
120
+ <Card
121
+ dragId={id}
122
+ draggableItem
123
+ key={id}
124
+ marginBottom="xs"
125
+ padding="xs"
126
+ {...props}
127
+ >
128
+ <Flex
129
+ alignItems="stretch"
130
+ flexDirection="column"
131
+ >
132
+ <Body
133
+ text={text}
134
+ {...props}
135
+ />
136
+ </Flex>
137
+ </Card>
138
+ ))}
139
+ </Draggable.Container>
140
+ </DraggableProvider>
141
+ </FlexItem>
142
+ <FlexItem>
143
+ <DraggableProvider
144
+ dropZone={{type: "line"}}
145
+ initialItems={dataLine}
146
+ onReorder={(items) => setInitialLineState(items)}
147
+ >
148
+ <Caption
149
+ marginBottom="xs"
150
+ textAlign="center"
151
+ >
152
+ {"Line"}
153
+ </Caption>
154
+ <Draggable.Container
155
+ htmlOptions={{style:{ width: "200px"}}}
156
+ {...props}
157
+ >
158
+ {initialLineState.map(({ id, text }) => (
159
+ <Card dragId={id}
160
+ draggableItem
161
+ key={id}
162
+ marginBottom="xs"
163
+ padding="xs"
164
+ {...props}
165
+ >
166
+ <Flex alignItems="stretch"
167
+ flexDirection="column"
168
+ >
169
+ <Body
170
+ text={text}
171
+ {...props}
172
+ />
173
+ </Flex>
174
+ </Card>
175
+ ))}
176
+ </Draggable.Container>
177
+ </DraggableProvider>
178
+ </FlexItem>
179
+ </Flex>
180
+ </>
181
+ );
182
+ };
183
+
184
+ export default DraggableDropZones;
@@ -0,0 +1,5 @@
1
+ The Draggable kit allows you to choose the style of drop zones that appear when dragging an item.
2
+
3
+ By default, the Draggable kit utilizes the "ghost" style for drop zones, but you can also choose between "shadow", "outline", and "line".
4
+
5
+ Additionally, when using the "line" style, be sure to set the proper `direction` attribute within the `dropZone` prop depending on the orentation of your draggable view. By default, this attribute is set to "vertical", but can also be used with a "horizontal" direction. The `direction` attribute only applies to the "line" style and will not affect other drop zone styles.
@@ -0,0 +1,97 @@
1
+ import React, { useState } from "react";
2
+
3
+ import Flex from '../../pb_flex/_flex'
4
+ import Image from '../../pb_image/_image'
5
+ import Caption from '../../pb_caption/_caption'
6
+ import Draggable from '../../pb_draggable/_draggable'
7
+ import { DraggableProvider } from '../../pb_draggable/context'
8
+
9
+ // Initial items to be dragged
10
+ const dataPrimary = [
11
+ {
12
+ id: "81",
13
+ url: "https://unsplash.it/500/400/?image=633",
14
+ },
15
+ {
16
+ id: "82",
17
+ url: "https://unsplash.it/500/400/?image=634",
18
+ },
19
+ {
20
+ id: "83",
21
+ url: "https://unsplash.it/500/400/?image=637",
22
+ },
23
+ ];
24
+ const dataPurple = [
25
+ {
26
+ id: "91",
27
+ url: "https://unsplash.it/500/400/?image=633",
28
+ },
29
+ {
30
+ id: "92",
31
+ url: "https://unsplash.it/500/400/?image=634",
32
+ },
33
+ {
34
+ id: "93",
35
+ url: "https://unsplash.it/500/400/?image=637",
36
+ },
37
+ ];
38
+
39
+ const DraggableDropZonesColors = (props) => {
40
+ const [initialPrimaryState, setInitialPrimaryState] = useState(dataPrimary);
41
+ const [initialPurpleState, setInitialPurpleState] = useState(dataPurple);
42
+
43
+ return (
44
+ <>
45
+ <Caption marginBottom="xs">
46
+ Primary
47
+ </Caption>
48
+ <DraggableProvider
49
+ dropZone={{type: "shadow", color: "primary"}}
50
+ initialItems={dataPrimary}
51
+ onReorder={(items) => setInitialPrimaryState(items)}
52
+ >
53
+ <Draggable.Container {...props}>
54
+ <Flex>
55
+ {initialPrimaryState.map(({ id, url }) => (
56
+ <Draggable.Item dragId={id}
57
+ key={id}
58
+ marginRight="sm"
59
+ >
60
+ <Image alt={id}
61
+ size="md"
62
+ url={url}
63
+ />
64
+ </Draggable.Item>
65
+ ))}
66
+ </Flex>
67
+ </Draggable.Container>
68
+ </DraggableProvider>
69
+ <Caption marginBottom="xs">
70
+ Purple
71
+ </Caption>
72
+ <DraggableProvider
73
+ dropZone={{type: "outline", color: "purple"}}
74
+ initialItems={dataPurple}
75
+ onReorder={(items) => setInitialPurpleState(items)}
76
+ >
77
+ <Draggable.Container {...props}>
78
+ <Flex>
79
+ {initialPurpleState.map(({ id, url }) => (
80
+ <Draggable.Item dragId={id}
81
+ key={id}
82
+ marginRight="sm"
83
+ >
84
+ <Image alt={id}
85
+ size="md"
86
+ url={url}
87
+ />
88
+ </Draggable.Item>
89
+ ))}
90
+ </Flex>
91
+ </Draggable.Container>
92
+ </DraggableProvider>
93
+ </>
94
+ );
95
+ };
96
+
97
+ export default DraggableDropZonesColors;
@@ -0,0 +1 @@
1
+ By default, the Draggable kit sets the default color of drop zones to "neutral" (or "primary" if using the "line" style.)
@@ -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
 
@@ -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,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 %>