playbook_ui_docs 14.16.0.pre.rc.5 → 14.17.0.pre.rc.0
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +184 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +97 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -0
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +3 -0
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +67 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +67 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +10 -4
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +49 -24
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_click.jsx +13 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.html.erb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.html.erb +76 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.jsx +94 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.html.erb +75 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.jsx +93 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.html.erb +75 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.jsx +93 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.html.erb +74 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.jsx +92 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.md +3 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +97 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +71 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +14 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.html.erb +19 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_disabled.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.html.erb +22 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +40 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_rails.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options_react.md +5 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +39 -4
- /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
- /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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5e99001e493bbb79c6b9bfdf598ee07d46a81e961199406eeeabd32a9565a9d
|
4
|
+
data.tar.gz: 5030c56f1a17c88716ce9260a94ca5b7d1bce2250ae2d3e37e5d322e4cd86edf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 996ea586c181e0e36cbdf2df01768695527a859f4f43935b7ad9df35c28eb7a263147dc0962452f03fc29edb297f4b5f13442d31d557096480d9b49a848dd848
|
7
|
+
data.tar.gz: 566dc754029a3b2b90c4aefd4884c5d55b8eb1ed071c3ea22342926866c6743c052b935c11d7e1bfd6664c06d9929992e5aa71d937fd1c1c0efc631c284c52e5
|
@@ -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 %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb
ADDED
@@ -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", }) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md
ADDED
@@ -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:
|
@@ -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" }) %>
|
@@ -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: {
|
2
|
-
<%= pb_rails("icon", props: { icon: "user", fixed_width: true, color: "primary",
|
3
|
-
<%= pb_rails("icon", props: { icon: "recycle", fixed_width: true, color: "data_4",
|
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 %>
|