playbook_ui 7.0.1.pre.alpha15 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/data/menu.yml +3 -4
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +1 -0
- data/app/pb_kits/playbook/pb_body/body.rb +1 -1
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +3 -3
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +90 -82
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb +2 -4
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb +7 -17
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +9 -32
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb +7 -18
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +9 -37
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.html.erb +11 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical.jsx +29 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.html.erb +11 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_vertical_secondary.jsx +34 -0
- data/app/pb_kits/playbook/pb_button_toolbar/docs/example.yml +7 -3
- data/app/pb_kits/playbook/pb_button_toolbar/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_caption/_caption.html.erb +5 -7
- data/app/pb_kits/playbook/pb_caption/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_caption/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.html.erb +2 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +3 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +32 -34
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dark.jsx +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +2 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +2 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.html.erb +9 -9
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +8 -8
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.md +1 -3
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.html.erb +14 -8
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +39 -122
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +2 -33
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb +9 -44
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb +1 -14
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +1 -45
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.html.erb +2 -3
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +15 -29
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +0 -10
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.html.erb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -7
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form.html.erb +3 -3
- data/app/pb_kits/playbook/pb_form/docs/_form_simple_form_validate.html.erb +3 -3
- data/app/pb_kits/playbook/pb_form/form_builder/date_picker_field.rb +0 -1
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -0
- data/app/pb_kits/playbook/pb_popover/_popover.scss +4 -6
- data/app/pb_kits/playbook/pb_popover/index.js +1 -3
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +0 -3
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +33 -168
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +1 -3
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +8 -10
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +16 -14
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +3 -6
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.html.erb +1 -17
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tracker.jsx +1 -17
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +3 -10
- data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +1 -11
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -12
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -6
- data/app/pb_kits/playbook/pb_time/_time.html.erb +20 -17
- data/app/pb_kits/playbook/pb_time/_time.jsx +27 -40
- data/app/pb_kits/playbook/pb_time/_time.scss +24 -4
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +1 -4
- data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +1 -13
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +1 -4
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +1 -3
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +2 -7
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +5 -5
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_toggle/toggle.rb +1 -4
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.html.erb +20 -24
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -19
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +1 -8
- data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +13 -21
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context_dark.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +3 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -24
- data/app/pb_kits/playbook/react_rails_kits.js +0 -1
- data/app/pb_kits/playbook/vendor.js +0 -3
- data/lib/playbook/version.rb +1 -1
- metadata +15 -35
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +0 -57
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +0 -27
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.html.erb +0 -11
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +0 -28
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb +0 -21
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +0 -38
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +0 -18
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +0 -68
- data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.html.erb +0 -61
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +0 -89
- data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +0 -68
- data/app/pb_kits/playbook/pb_table/docs/_table_one_action.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb +0 -43
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +0 -80
- data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +0 -63
- data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md +0 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_options.html.erb +0 -10
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +0 -25
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +0 -8
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +0 -30
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +0 -11
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.html.erb +0 -25
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.md +0 -1
- data/lib/tasks/changelog.rake +0 -14
@@ -1,68 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Table } from '../..'
|
3
|
-
import { Button } from '../../'
|
4
|
-
|
5
|
-
const TableOneAction = () => {
|
6
|
-
return (
|
7
|
-
<Table size="sm">
|
8
|
-
<thead>
|
9
|
-
<tr>
|
10
|
-
<th>{'Column 1'}</th>
|
11
|
-
<th>{'Column 2'}</th>
|
12
|
-
<th>{'Column 3'}</th>
|
13
|
-
<th>{'Column 4'}</th>
|
14
|
-
<th>{''}</th>
|
15
|
-
</tr>
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<tr>
|
19
|
-
<td>{'Value 1'}</td>
|
20
|
-
<td>{'Value 2'}</td>
|
21
|
-
<td>{'Value 3'}</td>
|
22
|
-
<td>{'Value 4'}</td>
|
23
|
-
<td>
|
24
|
-
{' '}
|
25
|
-
<Button
|
26
|
-
onClick={() => alert('button clicked!')}
|
27
|
-
text="Action"
|
28
|
-
variant="secondary"
|
29
|
-
/>
|
30
|
-
{' '}
|
31
|
-
</td>
|
32
|
-
</tr>
|
33
|
-
<tr>
|
34
|
-
<td>{'Value 1'}</td>
|
35
|
-
<td>{'Value 2'}</td>
|
36
|
-
<td>{'Value 3'}</td>
|
37
|
-
<td>{'Value 4'}</td>
|
38
|
-
<td>
|
39
|
-
{' '}
|
40
|
-
<Button
|
41
|
-
onClick={() => alert('button clicked!')}
|
42
|
-
text="Action"
|
43
|
-
variant="secondary"
|
44
|
-
/>
|
45
|
-
{' '}
|
46
|
-
</td>
|
47
|
-
</tr>
|
48
|
-
<tr>
|
49
|
-
<td>{'Value 1'}</td>
|
50
|
-
<td>{'Value 2'}</td>
|
51
|
-
<td>{'Value 3'}</td>
|
52
|
-
<td>{'Value 4'}</td>
|
53
|
-
<td>
|
54
|
-
{' '}
|
55
|
-
<Button
|
56
|
-
onClick={() => alert('button clicked!')}
|
57
|
-
text="Action"
|
58
|
-
variant="secondary"
|
59
|
-
/>
|
60
|
-
{' '}
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
</tbody>
|
64
|
-
</Table>
|
65
|
-
)
|
66
|
-
}
|
67
|
-
|
68
|
-
export default TableOneAction
|
@@ -1,43 +0,0 @@
|
|
1
|
-
<%= pb_rails("table", props: { size: "sm" }) do %>
|
2
|
-
<thead>
|
3
|
-
<tr>
|
4
|
-
<th>Column 1</th>
|
5
|
-
<th>Column 2</th>
|
6
|
-
<th>Column 3</th>
|
7
|
-
<th>Column 4</th>
|
8
|
-
<th></th>
|
9
|
-
</tr>
|
10
|
-
</thead>
|
11
|
-
<tbody>
|
12
|
-
<tr>
|
13
|
-
<td>Value 1</td>
|
14
|
-
<td>Value 2</td>
|
15
|
-
<td>Value 3</td>
|
16
|
-
<td>Value 4</td>
|
17
|
-
<td>
|
18
|
-
<%= pb_rails("button", props: { text: "Tetriary Action", variant: "link", padding_left: "none" }) %>
|
19
|
-
<%= pb_rails("button", props: { text: "Secondary Action", variant: "secondary" }) %>
|
20
|
-
</td>
|
21
|
-
</tr>
|
22
|
-
<tr>
|
23
|
-
<td>Value 1</td>
|
24
|
-
<td>Value 2</td>
|
25
|
-
<td>Value 3</td>
|
26
|
-
<td>Value 4</td>
|
27
|
-
<td>
|
28
|
-
<%= pb_rails("button", props: { text: "Tetriary Action", variant: "link", padding_left: "none" }) %>
|
29
|
-
<%= pb_rails("button", props: { text: "Secondary Action", variant: "secondary" }) %>
|
30
|
-
</td>
|
31
|
-
</tr>
|
32
|
-
<tr>
|
33
|
-
<td>Value 1</td>
|
34
|
-
<td>Value 2</td>
|
35
|
-
<td>Value 3</td>
|
36
|
-
<td>Value 4</td>
|
37
|
-
<td>
|
38
|
-
<%= pb_rails("button", props: { text: "Tetriary Action", variant: "link", padding_left: "none" }) %>
|
39
|
-
<%= pb_rails("button", props: { text: "Secondary Action", variant: "secondary" }) %>
|
40
|
-
</td>
|
41
|
-
</tr>
|
42
|
-
</tbody>
|
43
|
-
<% end %>
|
@@ -1,80 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Table } from '../..'
|
3
|
-
import { Button } from '../../'
|
4
|
-
|
5
|
-
const TableOneAction = () => {
|
6
|
-
return (
|
7
|
-
<Table size="sm">
|
8
|
-
<thead>
|
9
|
-
<tr>
|
10
|
-
<th>{'Column 1'}</th>
|
11
|
-
<th>{'Column 2'}</th>
|
12
|
-
<th>{'Column 3'}</th>
|
13
|
-
<th>{'Column 4'}</th>
|
14
|
-
<th>{''}</th>
|
15
|
-
</tr>
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<tr>
|
19
|
-
<td>{'Value 1'}</td>
|
20
|
-
<td>{'Value 2'}</td>
|
21
|
-
<td>{'Value 3'}</td>
|
22
|
-
<td>{'Value 4'}</td>
|
23
|
-
<td>
|
24
|
-
<Button
|
25
|
-
onClick={() => alert('button clicked!')}
|
26
|
-
paddingLeft="none"
|
27
|
-
text="Tetriary Action"
|
28
|
-
variant="link"
|
29
|
-
/>
|
30
|
-
<Button
|
31
|
-
onClick={() => alert('button clicked!')}
|
32
|
-
text="Secondary Action"
|
33
|
-
variant="secondary"
|
34
|
-
/>
|
35
|
-
</td>
|
36
|
-
</tr>
|
37
|
-
<tr>
|
38
|
-
<td>{'Value 1'}</td>
|
39
|
-
<td>{'Value 2'}</td>
|
40
|
-
<td>{'Value 3'}</td>
|
41
|
-
<td>{'Value 4'}</td>
|
42
|
-
<td>
|
43
|
-
<Button
|
44
|
-
onClick={() => alert('button clicked!')}
|
45
|
-
paddingLeft="none"
|
46
|
-
text="Tetriary Action"
|
47
|
-
variant="link"
|
48
|
-
/>
|
49
|
-
<Button
|
50
|
-
onClick={() => alert('button clicked!')}
|
51
|
-
text="Secondary Action"
|
52
|
-
variant="secondary"
|
53
|
-
/>
|
54
|
-
</td>
|
55
|
-
</tr>
|
56
|
-
<tr>
|
57
|
-
<td>{'Value 1'}</td>
|
58
|
-
<td>{'Value 2'}</td>
|
59
|
-
<td>{'Value 3'}</td>
|
60
|
-
<td>{'Value 4'}</td>
|
61
|
-
<td>
|
62
|
-
<Button
|
63
|
-
onClick={() => alert('button clicked!')}
|
64
|
-
paddingLeft="none"
|
65
|
-
text="Tetriary Action"
|
66
|
-
variant="link"
|
67
|
-
/>
|
68
|
-
<Button
|
69
|
-
onClick={() => alert('button clicked!')}
|
70
|
-
text="Secondary Action"
|
71
|
-
variant="secondary"
|
72
|
-
/>
|
73
|
-
</td>
|
74
|
-
</tr>
|
75
|
-
</tbody>
|
76
|
-
</Table>
|
77
|
-
)
|
78
|
-
}
|
79
|
-
|
80
|
-
export default TableOneAction
|
@@ -1 +0,0 @@
|
|
1
|
-
If there are two actions on each of the row, one should ideally one should use the `secondary` variant and the other use the `link` variant. The button using the `secondary` variant should be placed at the end.
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<%= pb_rails("table", props: { size: "sm" }) do %>
|
2
|
-
<thead>
|
3
|
-
<tr>
|
4
|
-
<th>Column 1</th>
|
5
|
-
<th>Column 2</th>
|
6
|
-
<th>Column 3</th>
|
7
|
-
<th>Column 4</th>
|
8
|
-
<th></th>
|
9
|
-
</tr>
|
10
|
-
</thead>
|
11
|
-
<tbody>
|
12
|
-
<tr>
|
13
|
-
<td>Value 1</td>
|
14
|
-
<td>Value 2</td>
|
15
|
-
<td>Value 3</td>
|
16
|
-
<td>Value 4</td>
|
17
|
-
<td> <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "ellipsis-h" }) %> </td>
|
18
|
-
</tr>
|
19
|
-
<tr>
|
20
|
-
<td>Value 1</td>
|
21
|
-
<td>Value 2</td>
|
22
|
-
<td>Value 3</td>
|
23
|
-
<td>Value 4</td>
|
24
|
-
<td> <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "ellipsis-h" }) %> </td>
|
25
|
-
</tr>
|
26
|
-
<tr>
|
27
|
-
<td>Value 1</td>
|
28
|
-
<td>Value 2</td>
|
29
|
-
<td>Value 3</td>
|
30
|
-
<td>Value 4</td>
|
31
|
-
<td> <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "ellipsis-h" }) %> </td>
|
32
|
-
</tr>
|
33
|
-
</tbody>
|
34
|
-
<% end %>
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Table } from '../..'
|
3
|
-
import { CircleIconButton } from '../../'
|
4
|
-
|
5
|
-
const TableTwoPlusActions = () => {
|
6
|
-
return (
|
7
|
-
<Table size="sm">
|
8
|
-
<thead>
|
9
|
-
<tr>
|
10
|
-
<th>{'Column 1'}</th>
|
11
|
-
<th>{'Column 2'}</th>
|
12
|
-
<th>{'Column 3'}</th>
|
13
|
-
<th>{'Column 4'}</th>
|
14
|
-
<th>{''}</th>
|
15
|
-
</tr>
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<tr>
|
19
|
-
<td>{'Value 1'}</td>
|
20
|
-
<td>{'Value 2'}</td>
|
21
|
-
<td>{'Value 3'}</td>
|
22
|
-
<td>{'Value 4'}</td>
|
23
|
-
<td>
|
24
|
-
{' '}
|
25
|
-
<CircleIconButton
|
26
|
-
icon="ellipsis-h"
|
27
|
-
variant="secondary"
|
28
|
-
/>
|
29
|
-
</td>
|
30
|
-
</tr>
|
31
|
-
<tr>
|
32
|
-
<td>{'Value 1'}</td>
|
33
|
-
<td>{'Value 2'}</td>
|
34
|
-
<td>{'Value 3'}</td>
|
35
|
-
<td>{'Value 4'}</td>
|
36
|
-
<td>
|
37
|
-
{' '}
|
38
|
-
<CircleIconButton
|
39
|
-
icon="ellipsis-h"
|
40
|
-
variant="secondary"
|
41
|
-
/>
|
42
|
-
</td>
|
43
|
-
|
44
|
-
</tr>
|
45
|
-
<tr>
|
46
|
-
<td>{'Value 1'}</td>
|
47
|
-
<td>{'Value 2'}</td>
|
48
|
-
<td>{'Value 3'}</td>
|
49
|
-
<td>{'Value 4'}</td>
|
50
|
-
<td>
|
51
|
-
{' '}
|
52
|
-
<CircleIconButton
|
53
|
-
icon="ellipsis-h"
|
54
|
-
variant="secondary"
|
55
|
-
/>
|
56
|
-
</td>
|
57
|
-
</tr>
|
58
|
-
</tbody>
|
59
|
-
</Table>
|
60
|
-
)
|
61
|
-
}
|
62
|
-
|
63
|
-
export default TableTwoPlusActions
|
@@ -1 +0,0 @@
|
|
1
|
-
If there are more than two actions on each row, then they should be contained in secondary circle icon button with the `ellipsis-h` icon (horizontal ellipsis) at the end of the row
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'Windows', value: '#FFA500' },
|
4
|
-
{ label: 'Siding', value: '#FF0000' },
|
5
|
-
{ label: 'Doors', value: '#00FF00' },
|
6
|
-
{ label: 'Roofs', value: '#0000FF' },
|
7
|
-
]
|
8
|
-
%>
|
9
|
-
|
10
|
-
<%= pb_rails("typeahead", props: { options: options, label: "Colors", name: :foo, pills: true }) %>
|
11
|
-
|
12
|
-
<!-- This section is an example of the available JavaScript event hooks -->
|
13
|
-
<%= javascript_tag defer: "defer" do %>
|
14
|
-
document.addEventListener("pb-typeahead-kit-result-option-select", function(event) {
|
15
|
-
console.log('Option selected')
|
16
|
-
console.dir(event.detail)
|
17
|
-
})
|
18
|
-
document.addEventListener("pb-typeahead-kit-result-option-remove", function(event) {
|
19
|
-
console.log('Option removed')
|
20
|
-
console.dir(event.detail)
|
21
|
-
})
|
22
|
-
document.addEventListener("pb-typeahead-kit-result-clear", function() {
|
23
|
-
console.log('All options cleared')
|
24
|
-
})
|
25
|
-
<% end %>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
Typeahead kit is data-driven. The minimum default fields are `label` and `value`.
|
2
|
-
|
3
|
-
`{ label: "Foo", value: "bar" }`
|
4
|
-
|
5
|
-
#### Rails: Subscribing to JS Events
|
6
|
-
`pb-typeahead-kit-result-option-select` event to perform custom work when an option is clicked.
|
7
|
-
`pb-typeahead-kit-result-option-remove` event to perform custom work when a pill is clicked.
|
8
|
-
`pb-typeahead-kit-result-option-clear` event to perform custom work when all pills are removed upon clicking the X.
|
@@ -1,30 +0,0 @@
|
|
1
|
-
<%= pb_rails("typeahead", props: { async: true, load_options: 'asyncPillsPromiseOptions', label: "Github Users", name: :foo, pills: true, placeholder: "type the name of a Github user" }) %>
|
2
|
-
|
3
|
-
<!-- This section is an example of how to provide load_options prop for using dynamic options -->
|
4
|
-
<%= javascript_tag defer: "defer" do %>
|
5
|
-
// Simple filter function, providing a list of results in the expected data format
|
6
|
-
|
7
|
-
const filterResults = function(results) {
|
8
|
-
return results.items.map(function(result) {
|
9
|
-
return {
|
10
|
-
label: result.login,
|
11
|
-
value: result.id,
|
12
|
-
}
|
13
|
-
})
|
14
|
-
}
|
15
|
-
|
16
|
-
/* Note: Make sure you assign this to window or a namespace within window
|
17
|
-
or it will not be accessible to the kit! */
|
18
|
-
|
19
|
-
window.asyncPillsPromiseOptions = function(inputValue) {
|
20
|
-
return new Promise(function(resolve) {
|
21
|
-
if (inputValue) {
|
22
|
-
fetch(`https://api.github.com/search/users?q=${inputValue}`)
|
23
|
-
.then(function(response) { return response.json() })
|
24
|
-
.then(function(results) { resolve(filterResults(results))})
|
25
|
-
} else {
|
26
|
-
resolve([])
|
27
|
-
}
|
28
|
-
})
|
29
|
-
}
|
30
|
-
<% end %>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#### Rails: Providing the `load_options` Promise
|
2
|
-
|
3
|
-
**Additional required props: ** `async: true`, `pills: true`
|
4
|
-
|
5
|
-
The prop `load_options`, when used in conjunction with `async: true` and `pills: true`, points to a JavaScript function located within the global window namespace. This function should return a `Promise` which resolves with the list of formatted options as described in prior examples above. This function is identical to the function provided to the React version of this kit. See the code example for more details.
|
6
|
-
|
7
|
-
#### React: `loadOptions`
|
8
|
-
|
9
|
-
**Additional required props: ** `async: true`
|
10
|
-
|
11
|
-
[As outlined in the react-select Async docs](https://react-select.com/async), `loadOptions` expects to return a Promise that resolves resolves with the list of formatted options as described in prior examples above. See the code example for more details.
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<%= pb_rails("typeahead", props: { async: true, load_options: 'asyncPillsPromiseOptionsUsers', label: "Github Users", name: :foo, pills: true, placeholder: "type the name of a Github user" }) %>
|
2
|
-
|
3
|
-
<%= javascript_tag defer: "defer" do %>
|
4
|
-
const filterUserResults = function(results) {
|
5
|
-
return results.items.map(function(result) {
|
6
|
-
return {
|
7
|
-
imageUrl: result.avatar_url,
|
8
|
-
label: result.login,
|
9
|
-
value: result.id,
|
10
|
-
}
|
11
|
-
})
|
12
|
-
}
|
13
|
-
|
14
|
-
window.asyncPillsPromiseOptionsUsers = function(inputValue) {
|
15
|
-
return new Promise(function(resolve) {
|
16
|
-
if (inputValue) {
|
17
|
-
fetch(`https://api.github.com/search/users?q=${inputValue}`)
|
18
|
-
.then(function(response) { return response.json() })
|
19
|
-
.then(function(results) { resolve(filterUserResults(results))})
|
20
|
-
} else {
|
21
|
-
resolve([])
|
22
|
-
}
|
23
|
-
})
|
24
|
-
}
|
25
|
-
<% end %>
|
@@ -1 +0,0 @@
|
|
1
|
-
If the data field `imageUrl` is present, FormPill will receive that field as a prop and display the image.
|
data/lib/tasks/changelog.rake
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'github_changelog_generator/task'
|
2
|
-
|
3
|
-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
4
|
-
config.user = 'powerhome'
|
5
|
-
config.project = 'playbook'
|
6
|
-
config.since_tag = Playbook::VERSION
|
7
|
-
config.header = ''
|
8
|
-
config.issues = false
|
9
|
-
config.base = 'CHANGELOG.md'
|
10
|
-
config.enhancement_prefix = '**Kit Enhancements:**'
|
11
|
-
config.bug_prefix = '**Fixed Bugs:**'
|
12
|
-
config.max_issues = 75
|
13
|
-
config.configure_sections = {"New Kits":{"prefix":"**New Kits:**","labels":["new kit"]},"Improvements": {"prefix":"**Improvements:**","labels":["improvement"]},"Breaking": {"prefix":"**Breaking Changes:**","labels":["breaking"]}}
|
14
|
-
end
|