playbook_ui_docs 15.4.0 → 15.5.0.pre.alpha.draggablefix12557
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_column_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_abbreviated.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_rails.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_matching_decimals_react.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.html.erb +10 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.jsx +10 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_negative.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_rails.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol_react.md +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +7 -0
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +7 -0
- data/app/pb_kits/playbook/pb_currency/docs/_description.md +2 -2
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.jsx +43 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_date_range_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.html.erb +12 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/{_date_stacked_not_current_year.jsx → _date_stacked_current_year.jsx} +6 -5
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year.jsx +14 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_rails.md +1 -0
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_show_current_year_react.md +1 -0
- data/app/pb_kits/playbook/pb_date_time/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_date_time/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.jsx +22 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +179 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +21 -0
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +113 -0
- data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +30 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +117 -0
- data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +1 -0
- data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_nav/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -5
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.html.erb +14 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.jsx +29 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_color.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.jsx +31 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_custom_icon.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +4 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +14 -3
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.md +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +1 -7
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.md +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
- metadata +45 -5
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb +0 -5
- data/dist/playbook-doc.js +0 -19
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import Flex from '../../pb_flex/_flex'
|
|
4
|
+
import Draggable from '../../pb_draggable/_draggable'
|
|
5
|
+
import { DraggableProvider } from '../../pb_draggable/context'
|
|
6
|
+
import Badge from '../../pb_badge/_badge'
|
|
7
|
+
import Title from '../../pb_title/_title'
|
|
8
|
+
import Caption from '../../pb_caption/_caption'
|
|
9
|
+
import Card from '../../pb_card/_card'
|
|
10
|
+
import FlexItem from '../../pb_flex/_flex_item'
|
|
11
|
+
import Avatar from '../../pb_avatar/_avatar'
|
|
12
|
+
import Body from '../../pb_body/_body'
|
|
13
|
+
|
|
14
|
+
// Initial groups to drag between
|
|
15
|
+
const containers = ["To Do", "In Progress", "Done"];
|
|
16
|
+
|
|
17
|
+
// Initial items to be dragged
|
|
18
|
+
const data = [
|
|
19
|
+
{
|
|
20
|
+
id: "11",
|
|
21
|
+
container: "To Do",
|
|
22
|
+
title: "Task 1",
|
|
23
|
+
description: "Bug fixes",
|
|
24
|
+
assignee_name: "Terry Miles",
|
|
25
|
+
assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "12",
|
|
29
|
+
container: "To Do",
|
|
30
|
+
title: "Task 2",
|
|
31
|
+
description: "Documentation",
|
|
32
|
+
assignee_name: "Sophia Miles",
|
|
33
|
+
assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "13",
|
|
37
|
+
container: "In Progress",
|
|
38
|
+
title: "Task 3",
|
|
39
|
+
description: "Add a variant",
|
|
40
|
+
assignee_name: "Alice Jones",
|
|
41
|
+
assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "14",
|
|
45
|
+
container: "To Do",
|
|
46
|
+
title: "Task 4",
|
|
47
|
+
description: "Add jest tests",
|
|
48
|
+
assignee_name: "Mike James",
|
|
49
|
+
assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "15",
|
|
53
|
+
container: "Done",
|
|
54
|
+
title: "Task 5",
|
|
55
|
+
description: "Alpha testing",
|
|
56
|
+
assignee_name: "James Guy",
|
|
57
|
+
assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "16",
|
|
61
|
+
container: "In Progress",
|
|
62
|
+
title: "Task 6",
|
|
63
|
+
description: "Release",
|
|
64
|
+
assignee_name: "Sally Jones",
|
|
65
|
+
assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
const DraggableMultipleContainersDropzone = (props) => {
|
|
70
|
+
const [initialState, setInitialState] = useState(data);
|
|
71
|
+
|
|
72
|
+
const badgeProperties = (container) => {
|
|
73
|
+
switch (container) {
|
|
74
|
+
case "To Do":
|
|
75
|
+
return { text: "queue", color: "warning" };
|
|
76
|
+
case "In Progress":
|
|
77
|
+
return { text: "progress", color: "primary" };
|
|
78
|
+
default:
|
|
79
|
+
return { text: "done", color: "success" };
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<DraggableProvider
|
|
85
|
+
dropZone={{type: "outline"}}
|
|
86
|
+
initialItems={data}
|
|
87
|
+
onDragEnd={(draggedItemId, finalContainer, originalContainer, itemAbove, itemBelow) => {
|
|
88
|
+
console.log(`Dragged Item ID: ${draggedItemId}`);
|
|
89
|
+
console.log(`Final Container: ${finalContainer}`);
|
|
90
|
+
console.log(`Original Container: ${originalContainer}`);
|
|
91
|
+
console.log('Item Above:', itemAbove);
|
|
92
|
+
console.log('Item Below:', itemBelow);
|
|
93
|
+
}}
|
|
94
|
+
onDrop={(draggedItemId, droppedContainer, originalContainer, item, itemAbove, itemBelow) => {
|
|
95
|
+
console.log(`Dragged Item ID: ${draggedItemId}`);
|
|
96
|
+
console.log(`Dropped Container: ${droppedContainer}`);
|
|
97
|
+
console.log(`Original Container: ${originalContainer}`);
|
|
98
|
+
console.log('Dropped Item:', item);
|
|
99
|
+
console.log('Item Above:', itemAbove);
|
|
100
|
+
console.log('Item Below:', itemBelow);
|
|
101
|
+
}}
|
|
102
|
+
onReorder={(items) => setInitialState(items)}
|
|
103
|
+
>
|
|
104
|
+
<Flex
|
|
105
|
+
justifyContent="center"
|
|
106
|
+
{...props}
|
|
107
|
+
>
|
|
108
|
+
{containers?.map((container) => (
|
|
109
|
+
<Draggable.Container
|
|
110
|
+
container={container}
|
|
111
|
+
htmlOptions={{style:{ width: "200px", height: "70vh"}}}
|
|
112
|
+
key={container}
|
|
113
|
+
padding="sm"
|
|
114
|
+
>
|
|
115
|
+
<Caption textAlign="center">{container}</Caption>
|
|
116
|
+
<Flex
|
|
117
|
+
alignItems="stretch"
|
|
118
|
+
gap="sm"
|
|
119
|
+
orientation="column"
|
|
120
|
+
>
|
|
121
|
+
{initialState
|
|
122
|
+
.filter((item) => item.container === container)
|
|
123
|
+
.map(
|
|
124
|
+
({
|
|
125
|
+
assignee_img,
|
|
126
|
+
assignee_name,
|
|
127
|
+
description,
|
|
128
|
+
id,
|
|
129
|
+
title,
|
|
130
|
+
}) => (
|
|
131
|
+
<Draggable.Item
|
|
132
|
+
container={container}
|
|
133
|
+
dragId={id}
|
|
134
|
+
key={id}
|
|
135
|
+
>
|
|
136
|
+
<Card
|
|
137
|
+
padding="sm"
|
|
138
|
+
{...props}
|
|
139
|
+
>
|
|
140
|
+
<Flex justify="between">
|
|
141
|
+
<FlexItem>
|
|
142
|
+
<Flex>
|
|
143
|
+
<Avatar
|
|
144
|
+
imageUrl={assignee_img}
|
|
145
|
+
name={assignee_name}
|
|
146
|
+
size="xxs"
|
|
147
|
+
/>
|
|
148
|
+
<Title paddingLeft="xs"
|
|
149
|
+
size={4}
|
|
150
|
+
text={title}
|
|
151
|
+
{...props}
|
|
152
|
+
/>
|
|
153
|
+
</Flex>
|
|
154
|
+
</FlexItem>
|
|
155
|
+
<Badge
|
|
156
|
+
marginLeft="sm"
|
|
157
|
+
rounded
|
|
158
|
+
text={badgeProperties(container).text}
|
|
159
|
+
variant={badgeProperties(container).color}
|
|
160
|
+
{...props}
|
|
161
|
+
/>
|
|
162
|
+
</Flex>
|
|
163
|
+
<Body paddingTop="xs"
|
|
164
|
+
text={description}
|
|
165
|
+
{...props}
|
|
166
|
+
/>
|
|
167
|
+
</Card>
|
|
168
|
+
</Draggable.Item>
|
|
169
|
+
)
|
|
170
|
+
)}
|
|
171
|
+
</Flex>
|
|
172
|
+
</Draggable.Container>
|
|
173
|
+
))}
|
|
174
|
+
</Flex>
|
|
175
|
+
</DraggableProvider>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export default DraggableMultipleContainersDropzone;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
examples:
|
|
2
2
|
react:
|
|
3
3
|
- draggable_default: Default
|
|
4
|
+
- draggable_multiple_containers_dropzone: Dragging Across Multiple Containers with Dropzones
|
|
4
5
|
- draggable_with_list: Draggable with List Kit
|
|
5
6
|
- draggable_with_selectable_list: Draggable with SelectableList Kit
|
|
6
7
|
- draggable_with_cards: Draggable with Cards
|
|
@@ -7,4 +7,5 @@ export { default as DraggableWithTable } from './_draggable_with_table.jsx'
|
|
|
7
7
|
export { default as DraggableDropZones } from './_draggable_drop_zones.jsx'
|
|
8
8
|
export { default as DraggableDropZonesColors } from './_draggable_drop_zones_colors.jsx'
|
|
9
9
|
export { default as DraggableDropZonesLine } from './_draggable_drop_zones_line.jsx'
|
|
10
|
-
export { default as DraggableEventListeners } from './_draggable_event_listeners.jsx'
|
|
10
|
+
export { default as DraggableEventListeners } from './_draggable_event_listeners.jsx'
|
|
11
|
+
export { default as DraggableMultipleContainersDropzone } from './_draggable_multiple_containers_dropzone.jsx'
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
2
|
+
import Card from '../../pb_card/_card'
|
|
3
|
+
import Caption from '../../pb_caption/_caption'
|
|
4
|
+
import FormPill from '../_form_pill'
|
|
5
|
+
import Typeahead from '../../pb_typeahead/_typeahead'
|
|
3
6
|
|
|
4
7
|
const names = [
|
|
5
8
|
{ label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Default Variant" }) %>
|
|
2
|
+
<%= pb_rails("nav", props: { orientation: "horizontal" }) do %>
|
|
3
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
4
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
5
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
6
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Subtle Variant" }) %>
|
|
9
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "subtle" }) do %>
|
|
10
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
11
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
12
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
13
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", margin_top:"lg", text: "Bold Variant" }) %>
|
|
16
|
+
<%= pb_rails("nav", props: { orientation: "horizontal", variant: "bold" }) do %>
|
|
17
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
18
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
19
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
20
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
21
|
+
<% end %>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import Nav from '../_nav'
|
|
4
|
+
import NavItem from '../_item'
|
|
5
|
+
import Caption from '../../pb_caption/_caption'
|
|
6
|
+
|
|
7
|
+
const HorizontalNavDisabled = (props) => {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Caption marginBottom="sm">Default Variant</Caption>
|
|
11
|
+
<Nav
|
|
12
|
+
link="#"
|
|
13
|
+
orientation="horizontal"
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<NavItem
|
|
17
|
+
link="#"
|
|
18
|
+
text="About"
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
<NavItem
|
|
22
|
+
active
|
|
23
|
+
link="#"
|
|
24
|
+
text="Case Studies"
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
<NavItem
|
|
28
|
+
disabled
|
|
29
|
+
link="#"
|
|
30
|
+
text="Service"
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
<NavItem
|
|
34
|
+
link="#"
|
|
35
|
+
text="Contacts"
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
</Nav>
|
|
39
|
+
<Caption
|
|
40
|
+
marginBottom="sm"
|
|
41
|
+
marginTop="lg"
|
|
42
|
+
>
|
|
43
|
+
Subtle Variant
|
|
44
|
+
</Caption>
|
|
45
|
+
<Nav
|
|
46
|
+
link="#"
|
|
47
|
+
orientation="horizontal"
|
|
48
|
+
variant="subtle"
|
|
49
|
+
{...props}
|
|
50
|
+
>
|
|
51
|
+
<NavItem
|
|
52
|
+
link="#"
|
|
53
|
+
text="About"
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
<NavItem
|
|
57
|
+
active
|
|
58
|
+
link="#"
|
|
59
|
+
text="Case Studies"
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
<NavItem
|
|
63
|
+
disabled
|
|
64
|
+
link="#"
|
|
65
|
+
text="Service"
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
<NavItem
|
|
69
|
+
link="#"
|
|
70
|
+
text="Contacts"
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
</Nav>
|
|
74
|
+
<Caption
|
|
75
|
+
marginBottom="sm"
|
|
76
|
+
marginTop="lg"
|
|
77
|
+
>
|
|
78
|
+
Bold Variant
|
|
79
|
+
</Caption>
|
|
80
|
+
<Nav
|
|
81
|
+
link="#"
|
|
82
|
+
orientation="horizontal"
|
|
83
|
+
variant="bold"
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
<NavItem
|
|
87
|
+
link="#"
|
|
88
|
+
text="About"
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
91
|
+
<NavItem
|
|
92
|
+
active
|
|
93
|
+
link="#"
|
|
94
|
+
text="Case Studies"
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
<NavItem
|
|
98
|
+
disabled
|
|
99
|
+
link="#"
|
|
100
|
+
text="Service"
|
|
101
|
+
{...props}
|
|
102
|
+
/>
|
|
103
|
+
<NavItem
|
|
104
|
+
link="#"
|
|
105
|
+
text="Contacts"
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
</Nav>
|
|
109
|
+
</>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default HorizontalNavDisabled
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `disabled` prop on a `navItem`/`nav_item` within a horizontal nav to set it as disabled. This will render the UI as disabled, prevent clicks and not allow for tabIndex to access the item.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<%= pb_rails("flex", props: { justify: "between" }) do %>
|
|
2
|
+
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
3
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Default Variant" }) %>
|
|
4
|
+
<%= pb_rails("nav") do %>
|
|
5
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
6
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
7
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
8
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
9
|
+
<% end %>
|
|
10
|
+
<% end %>
|
|
11
|
+
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
12
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Subtle Variant" }) %>
|
|
13
|
+
<%= pb_rails("nav", props:{variant: "subtle"}) do %>
|
|
14
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
15
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
16
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
17
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% end %>
|
|
20
|
+
<%= pb_rails("flex", props: { orientation:"column", wrap: true }) do %>
|
|
21
|
+
<%= pb_rails("caption", props: { margin_bottom: "sm", text: "Bold Variant" }) %>
|
|
22
|
+
<%= pb_rails("nav", props:{variant: "bold"}) do %>
|
|
23
|
+
<%= pb_rails("nav/item", props: { text: "About", link: "#" }) %>
|
|
24
|
+
<%= pb_rails("nav/item", props: { text: "Case Studies", link: "#", active: true }) %>
|
|
25
|
+
<%= pb_rails("nav/item", props: { text: "Service ", link: "#", disabled: true }) %>
|
|
26
|
+
<%= pb_rails("nav/item", props: { text: "Contacts", link: "#" }) %>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% end %>
|
|
29
|
+
|
|
30
|
+
<% end %>
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import Nav from '../_nav'
|
|
4
|
+
import NavItem from '../_item'
|
|
5
|
+
import Caption from '../../pb_caption/_caption'
|
|
6
|
+
import Flex from '../../pb_flex/_flex'
|
|
7
|
+
|
|
8
|
+
const VerticalNavDisabled = (props) => {
|
|
9
|
+
return (
|
|
10
|
+
<Flex justify="between"
|
|
11
|
+
wrap
|
|
12
|
+
>
|
|
13
|
+
<Flex orientation="column">
|
|
14
|
+
<Caption marginBottom="sm">Default Variant</Caption>
|
|
15
|
+
<Nav
|
|
16
|
+
link="#"
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
<NavItem
|
|
20
|
+
link="#"
|
|
21
|
+
text="About"
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
<NavItem
|
|
25
|
+
active
|
|
26
|
+
link="#"
|
|
27
|
+
text="Case Studies"
|
|
28
|
+
{...props}
|
|
29
|
+
/>
|
|
30
|
+
<NavItem
|
|
31
|
+
disabled
|
|
32
|
+
link="#"
|
|
33
|
+
text="Service"
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
<NavItem
|
|
37
|
+
link="#"
|
|
38
|
+
text="Contacts"
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
</Nav>
|
|
42
|
+
</Flex>
|
|
43
|
+
<Flex orientation="column">
|
|
44
|
+
<Caption
|
|
45
|
+
marginBottom="sm"
|
|
46
|
+
>
|
|
47
|
+
Subtle Variant
|
|
48
|
+
</Caption>
|
|
49
|
+
<Nav
|
|
50
|
+
link="#"
|
|
51
|
+
variant="subtle"
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<NavItem
|
|
55
|
+
link="#"
|
|
56
|
+
text="About"
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
<NavItem
|
|
60
|
+
active
|
|
61
|
+
link="#"
|
|
62
|
+
text="Case Studies"
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
<NavItem
|
|
66
|
+
disabled
|
|
67
|
+
link="#"
|
|
68
|
+
text="Service"
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
<NavItem
|
|
72
|
+
link="#"
|
|
73
|
+
text="Contacts"
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
</Nav>
|
|
77
|
+
</Flex>
|
|
78
|
+
<Flex orientation="column">
|
|
79
|
+
<Caption
|
|
80
|
+
marginBottom="sm"
|
|
81
|
+
>
|
|
82
|
+
Bold Variant
|
|
83
|
+
</Caption>
|
|
84
|
+
<Nav
|
|
85
|
+
link="#"
|
|
86
|
+
variant="bold"
|
|
87
|
+
{...props}
|
|
88
|
+
>
|
|
89
|
+
<NavItem
|
|
90
|
+
link="#"
|
|
91
|
+
text="About"
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
<NavItem
|
|
95
|
+
active
|
|
96
|
+
link="#"
|
|
97
|
+
text="Case Studies"
|
|
98
|
+
{...props}
|
|
99
|
+
/>
|
|
100
|
+
<NavItem
|
|
101
|
+
disabled
|
|
102
|
+
link="#"
|
|
103
|
+
text="Service"
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
<NavItem
|
|
107
|
+
link="#"
|
|
108
|
+
text="Contacts"
|
|
109
|
+
{...props}
|
|
110
|
+
/>
|
|
111
|
+
</Nav>
|
|
112
|
+
</Flex>
|
|
113
|
+
</Flex>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default VerticalNavDisabled
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `disabled` prop on a `navItem`/`nav_item` within a vertical nav to set it as disabled. This will render the UI as disabled, prevent clicks and not allow for tabIndex to access the item.
|
|
@@ -18,6 +18,8 @@ examples:
|
|
|
18
18
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
|
19
19
|
- bold_horizontal_nav: Bold Horizontal Nav
|
|
20
20
|
- horizontal_nav_extendedunderline: Horizontal Nav With Extended Underline
|
|
21
|
+
- horizontal_nav_disabled: Horizontal Nav With Disabled Item
|
|
22
|
+
- vertical_nav_disabled: Vertical Nav With Disabled Item
|
|
21
23
|
- block_nav: Block
|
|
22
24
|
- block_no_title_nav: Without Title
|
|
23
25
|
- new_tab: Open in a New Tab
|
|
@@ -44,6 +46,8 @@ examples:
|
|
|
44
46
|
- subtle_horizontal_nav: Subtle Horizontal Nav
|
|
45
47
|
- bold_horizontal_nav: Bold Horizontal Nav
|
|
46
48
|
- horizontal_nav_extendedunderline: Horizontal Nav With Extended Underline
|
|
49
|
+
- horizontal_nav_disabled: Horizontal Nav With Disabled Item
|
|
50
|
+
- vertical_nav_disabled: Vertical Nav With Disabled Item
|
|
47
51
|
- block_nav: Block
|
|
48
52
|
- block_no_title_nav: Without Title
|
|
49
53
|
- new_tab: Open in a New Tab
|
|
@@ -20,4 +20,6 @@ export { default as NavWithFontControl } from "./_nav_with_font_control.jsx"
|
|
|
20
20
|
export { default as NavWithSpacingControl } from "./_nav_with_spacing_control.jsx"
|
|
21
21
|
export { default as CollapsibleNavItemSpacing } from "./_collapsible_nav_item_spacing.jsx"
|
|
22
22
|
export { default as CollapsibleNavNoIcon } from "./_collapsible_nav_no_icon.jsx"
|
|
23
|
-
export { default as HorizontalNavExtendedunderline } from './_horizontal_nav_extendedunderline.jsx'
|
|
23
|
+
export { default as HorizontalNavExtendedunderline } from './_horizontal_nav_extendedunderline.jsx'
|
|
24
|
+
export { default as HorizontalNavDisabled } from './_horizontal_nav_disabled.jsx'
|
|
25
|
+
export { default as VerticalNavDisabled } from './_vertical_nav_disabled.jsx'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
**In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo.**
|
|
2
|
+
|
|
3
|
+
This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
|
|
2
4
|
|
|
3
5
|
See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
In order to use this kit, 'highcharts' and 'highcharts-react-official' must be installed in your repo.
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
%>
|
|
38
38
|
|
|
39
|
-
<%= pb_rails("title", props: {size: 4, text: "align |
|
|
39
|
+
<%= pb_rails("title", props: {size: 4, text: "align | verticalAlign", padding_top: "sm", padding_bottom: "sm"})%>
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
<%= pb_rails("pb_bar_graph", props: {options: chart_options_right}) %>
|