playbook_ui 7.6.2 → 7.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/{sample_screenshot.svg → full_page_samples.svg} +0 -0
- data/app/pb_kits/playbook/_playbook.scss +3 -1
- data/app/pb_kits/playbook/data/menu.yml +3 -0
- data/app/pb_kits/playbook/index.js +4 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +27 -0
- data/app/pb_kits/playbook/pb_background/_background.html.erb +1 -1
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.jsx +8 -2
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +9 -2
- data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.jsx +17 -6
- data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.jsx +15 -5
- data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx +2 -1
- data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.jsx +4 -1
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.jsx +9 -4
- data/app/pb_kits/playbook/pb_filter/Filter/index.jsx +0 -1
- data/app/pb_kits/playbook/pb_filter/_filter.scss +44 -23
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +3 -2
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +5 -4
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +6 -4
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +73 -28
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.jsx +3 -7
- data/app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx +4 -3
- data/app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb +1 -2
- data/app/pb_kits/playbook/pb_filter/docs/_sort_only.jsx +3 -3
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +4 -5
- data/app/pb_kits/playbook/pb_form_group/_form_group.html.erb +7 -0
- data/app/pb_kits/playbook/pb_form_group/_form_group.jsx +41 -0
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +123 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_button.html.erb +12 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_button.jsx +39 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.html.erb +6 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_date_picker.jsx +21 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_default.jsx +26 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +19 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +35 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_selectable_card.html.erb +21 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_selectable_card.jsx +42 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_selectable_card_icon.html.erb +19 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_selectable_card_icon.jsx +35 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_typeahead.html.erb +42 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_typeahead.jsx +31 -0
- data/app/pb_kits/playbook/pb_form_group/docs/example.yml +20 -0
- data/app/pb_kits/playbook/pb_form_group/docs/index.js +7 -0
- data/app/pb_kits/playbook/pb_form_group/form_group.rb +15 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.html.erb +24 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.jsx +105 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +64 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +49 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +67 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_default.html.erb +11 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_default.jsx +25 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_sizes.html.erb +20 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_sizes.jsx +35 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_vertical.html.erb +7 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_vertical.jsx +19 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/example.yml +15 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +52 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_status.jsx +2 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +123 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +216 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.html.erb +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx +11 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.jsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx +14 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.html.erb +115 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx +39 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +15 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +5 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/templates.js +75 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +55 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/useFocus.js +20 -0
- data/app/pb_kits/playbook/pb_table/_table.scss +45 -13
- data/app/pb_kits/playbook/pb_table/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +63 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +70 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +61 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -1
- data/app/pb_kits/playbook/pb_table/docs/index.js +4 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.html.erb +3 -6
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +15 -21
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.scss +0 -17
- data/app/pb_kits/playbook/pb_time_stacked/docs/_time_stacked_default.html.erb +4 -1
- data/app/pb_kits/playbook/pb_time_stacked/docs/_time_stacked_default.jsx +12 -1
- data/app/pb_kits/playbook/pb_time_stacked/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_time_stacked/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.rb +7 -11
- data/app/pb_kits/playbook/react_rails_kits.js +1 -0
- data/app/pb_kits/playbook/utilities/globalProps.js +9 -0
- data/app/pb_kits/playbook/utilities/test-utils.js +24 -0
- data/app/pb_kits/playbook/vendor.js +2 -0
- data/lib/playbook/version.rb +1 -1
- metadata +72 -10
- data/app/pb_kits/playbook/pb_time_stacked/docs/_time_stacked_caption.html.erb +0 -2
- data/app/pb_kits/playbook/pb_time_stacked/docs/_time_stacked_caption.jsx +0 -15
@@ -0,0 +1,63 @@
|
|
1
|
+
<%= pb_rails("table") do %>
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th> </th>
|
5
|
+
<th>Price</th>
|
6
|
+
</tr>
|
7
|
+
</thead>
|
8
|
+
<tbody>
|
9
|
+
<tr>
|
10
|
+
<td shift="down">Total</td>
|
11
|
+
<td>
|
12
|
+
$12
|
13
|
+
<br/>
|
14
|
+
$46
|
15
|
+
<br/>
|
16
|
+
$25
|
17
|
+
<br/>
|
18
|
+
-------
|
19
|
+
<br/>
|
20
|
+
$83
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
</tbody>
|
24
|
+
<% end %>
|
25
|
+
<br/>
|
26
|
+
<%= pb_rails("table") do %>
|
27
|
+
<thead>
|
28
|
+
<tr>
|
29
|
+
<th>Espresso Drinks</th>
|
30
|
+
<th>Ingredients</th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<tr>
|
35
|
+
<td shift="up">Cappuccino</td>
|
36
|
+
<td>
|
37
|
+
Espresso
|
38
|
+
<br/>
|
39
|
+
Steamed Milk
|
40
|
+
<br/>
|
41
|
+
Milk Foam
|
42
|
+
</td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<td shift="up">Macchiato</td>
|
46
|
+
<td>
|
47
|
+
Espresso
|
48
|
+
<br/>
|
49
|
+
Steamed Milk
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td shift="up">Mocha</td>
|
54
|
+
<td>
|
55
|
+
Espresso
|
56
|
+
<br/>
|
57
|
+
Hot Chocolate
|
58
|
+
<br/>
|
59
|
+
Steamed Milk
|
60
|
+
</td>
|
61
|
+
</tr>
|
62
|
+
</tbody>
|
63
|
+
<% end %>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Table } from '../../'
|
3
|
+
|
4
|
+
const TableAlignmentShiftData = () => {
|
5
|
+
return (
|
6
|
+
<Table>
|
7
|
+
<thead>
|
8
|
+
<tr>
|
9
|
+
<th> </th>
|
10
|
+
<th>{'Price'}</th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody>
|
14
|
+
<tr>
|
15
|
+
<td shift="down">{'Total'}</td>
|
16
|
+
<td>
|
17
|
+
{'$12'}
|
18
|
+
<br />
|
19
|
+
{'$46'}
|
20
|
+
<br />
|
21
|
+
{'$25'}
|
22
|
+
<br />
|
23
|
+
{'-------'}
|
24
|
+
<br />
|
25
|
+
{'$83'}
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
</tbody>
|
29
|
+
<br />
|
30
|
+
<thead>
|
31
|
+
<tr>
|
32
|
+
<th>{'Espresso Drinks'}</th>
|
33
|
+
<th>{'Ingredients'}</th>
|
34
|
+
</tr>
|
35
|
+
</thead>
|
36
|
+
<tbody>
|
37
|
+
<tr>
|
38
|
+
<td shift="up">{'Cappuccino'}</td>
|
39
|
+
<td>
|
40
|
+
{'Espresso'}
|
41
|
+
<br />
|
42
|
+
{'Steamed Milk'}
|
43
|
+
<br />
|
44
|
+
{'Milk Foam'}
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<tr>
|
48
|
+
<td shift="up">{'Macchiato'}</td>
|
49
|
+
<td>
|
50
|
+
{'Espresso'}
|
51
|
+
<br />
|
52
|
+
{'Steamed Milk'}
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td shift="up">{'Mocha'}</td>
|
57
|
+
<td>
|
58
|
+
{'Espresso'}
|
59
|
+
<br />
|
60
|
+
{'Hot Chocolate'}
|
61
|
+
<br />
|
62
|
+
{'Steamed Milk'}
|
63
|
+
</td>
|
64
|
+
</tr>
|
65
|
+
</tbody>
|
66
|
+
</Table>
|
67
|
+
)
|
68
|
+
}
|
69
|
+
|
70
|
+
export default TableAlignmentShiftData
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<%= pb_rails("table") 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>Column 5</th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<tr>
|
13
|
+
<td>
|
14
|
+
Value 1a
|
15
|
+
<br/>
|
16
|
+
Value 1a
|
17
|
+
<br/>
|
18
|
+
Value 1a
|
19
|
+
</td>
|
20
|
+
<td>Value 2a</td>
|
21
|
+
<td>Value 3a</td>
|
22
|
+
<td>Value 4a</td>
|
23
|
+
<td>Value 5a</td>
|
24
|
+
</tr>
|
25
|
+
<tr shift="up">
|
26
|
+
<td>
|
27
|
+
Value 1b
|
28
|
+
<br/>
|
29
|
+
Value 1b
|
30
|
+
<br/>
|
31
|
+
Value 1b
|
32
|
+
</td>
|
33
|
+
<td>Value 2b</td>
|
34
|
+
<td>Value 3b</td>
|
35
|
+
<td>Value 4b</td>
|
36
|
+
<td>Value 5b</td>
|
37
|
+
</tr>
|
38
|
+
<tr shift="down">
|
39
|
+
<td>
|
40
|
+
Value 1c
|
41
|
+
<br/>
|
42
|
+
Value 1c
|
43
|
+
<br/>
|
44
|
+
Value 1c
|
45
|
+
</td>
|
46
|
+
<td>Value 2c</td>
|
47
|
+
<td>Value 3c</td>
|
48
|
+
<td>Value 4c</td>
|
49
|
+
<td>Value 5c</td>
|
50
|
+
</tr>
|
51
|
+
</tbody>
|
52
|
+
<% end %>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Table } from '../../'
|
3
|
+
|
4
|
+
const TableAlignmentShiftRow = () => {
|
5
|
+
return (
|
6
|
+
<Table>
|
7
|
+
<thead>
|
8
|
+
<tr>
|
9
|
+
<th>{'Column 1'}</th>
|
10
|
+
<th>{'Column 2'}</th>
|
11
|
+
<th>{'Column 3'}</th>
|
12
|
+
<th>{'Column 4'}</th>
|
13
|
+
<th>{'Column 5'}</th>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<tr>
|
18
|
+
<td>
|
19
|
+
{'Value 1a'}
|
20
|
+
<br />
|
21
|
+
{'Value 1a'}
|
22
|
+
<br />
|
23
|
+
{'Value 1a'}
|
24
|
+
</td>
|
25
|
+
<td>{'Value 2a'}</td>
|
26
|
+
<td>{'Value 3a'}</td>
|
27
|
+
<td>{'Value 4a'}</td>
|
28
|
+
<td>{'Value 5a'}</td>
|
29
|
+
</tr>
|
30
|
+
<tr shift="up">
|
31
|
+
<td>
|
32
|
+
{'Value 1b'}
|
33
|
+
<br />
|
34
|
+
{'Value 1b'}
|
35
|
+
<br />
|
36
|
+
{'Value 1b'}
|
37
|
+
</td>
|
38
|
+
<td>{'Value 2b'}</td>
|
39
|
+
<td>{'Value 3b'}</td>
|
40
|
+
<td>{'Value 4b'}</td>
|
41
|
+
<td>{'Value 5b'}</td>
|
42
|
+
</tr>
|
43
|
+
<tr shift="down">
|
44
|
+
<td>
|
45
|
+
{'Value 1c'}
|
46
|
+
<br />
|
47
|
+
{'Value 1c'}
|
48
|
+
<br />
|
49
|
+
{'Value 1c'}
|
50
|
+
</td>
|
51
|
+
<td>{'Value 2c'}</td>
|
52
|
+
<td>{'Value 3c'}</td>
|
53
|
+
<td>{'Value 4c'}</td>
|
54
|
+
<td>{'Value 5c'}</td>
|
55
|
+
</tr>
|
56
|
+
</tbody>
|
57
|
+
</Table>
|
58
|
+
)
|
59
|
+
}
|
60
|
+
|
61
|
+
export default TableAlignmentShiftRow
|
@@ -3,6 +3,10 @@ examples:
|
|
3
3
|
- table_sm: Small
|
4
4
|
- table_md: Medium
|
5
5
|
- table_lg: Large
|
6
|
+
- table_alignment_row: Row Alignment
|
7
|
+
- table_alignment_column: Column Alignment
|
8
|
+
- table_alignment_shift_row: Shift Row
|
9
|
+
- table_alignment_shift_data: Shift Column Data
|
6
10
|
- table_side_highlight: Side Highlight
|
7
11
|
- table_container: Table Container Off
|
8
12
|
- table_disable_hover: Disable Hover
|
@@ -16,11 +20,15 @@ examples:
|
|
16
20
|
- table_action_middle: Table with Actions in the Middle
|
17
21
|
- table_icon_buttons: Table with Icon Buttons
|
18
22
|
|
19
|
-
|
23
|
+
|
20
24
|
react:
|
21
25
|
- table_sm: Small
|
22
26
|
- table_md: Medium
|
23
27
|
- table_lg: Large
|
28
|
+
- table_alignment_row: Row Alignment
|
29
|
+
- table_alignment_column: Column Alignment
|
30
|
+
- table_alignment_shift_row: Shift Row
|
31
|
+
- table_alignment_shift_data: Shift Column Data
|
24
32
|
- table_side_highlight: Side Highlight
|
25
33
|
- table_container: Table Container Off
|
26
34
|
- table_disable_hover: Disable Hover
|
@@ -13,4 +13,7 @@ export { default as TableTwoActions } from './_table_two_actions.jsx'
|
|
13
13
|
export { default as TableTwoPlusActions } from './_table_two_plus_actions.jsx'
|
14
14
|
export { default as TableActionMiddle } from './_table_action_middle.jsx'
|
15
15
|
export { default as TableIconButtons } from './_table_icon_buttons.jsx'
|
16
|
-
|
16
|
+
export { default as TableAlignmentColumn } from './_table_alignment_column.jsx'
|
17
|
+
export { default as TableAlignmentRow } from './_table_alignment_row.jsx'
|
18
|
+
export { default as TableAlignmentShiftRow } from './_table_alignment_shift_row.jsx'
|
19
|
+
export { default as TableAlignmentShiftData } from './_table_alignment_shift_data.jsx'
|
@@ -1,11 +1,8 @@
|
|
1
1
|
<%= content_tag(:div,
|
2
|
+
align: object.align,
|
2
3
|
id: object.id,
|
3
4
|
data: object.data,
|
4
5
|
class: object.classname) do %>
|
5
|
-
|
6
|
-
|
7
|
-
<%= pb_rails(object.tag, props: { text: object.format_time_string, color: "light", classname: object.tag_classnames }) %>
|
8
|
-
<%= pb_rails(object.tag, props: { text: object.format_timezone, color: "light" }) %>
|
9
|
-
</div>
|
10
|
-
|
6
|
+
<%= pb_rails("body", props: { text: object.format_time_string, color: "light" }) %>
|
7
|
+
<%= pb_rails("caption", props: { text: object.format_timezone, color: "light" }) %>
|
11
8
|
<% end %>
|
@@ -6,49 +6,43 @@ import classnames from 'classnames'
|
|
6
6
|
import DateTime from '../pb_kit/dateTime.js'
|
7
7
|
import { buildCss } from '../utilities/props'
|
8
8
|
import { Body, Caption } from '../'
|
9
|
-
import { globalProps } from '../utilities/globalProps.js'
|
10
|
-
|
11
|
-
const Components = {
|
12
|
-
body: Body,
|
13
|
-
caption: Caption,
|
14
|
-
}
|
9
|
+
import { deprecatedProps, globalProps } from '../utilities/globalProps.js'
|
15
10
|
|
16
11
|
type TimeStackedProps = {
|
12
|
+
align?: 'left' | 'center' | 'right',
|
17
13
|
className?: string | array<string>,
|
18
14
|
dark?: boolean,
|
19
15
|
data?: string,
|
20
16
|
date: string,
|
21
17
|
id?: string,
|
22
|
-
|
23
|
-
tag?: "body" | "caption",
|
18
|
+
tag?: 'body' | 'caption',
|
24
19
|
}
|
25
20
|
|
26
21
|
const TimeStacked = (props: TimeStackedProps) => {
|
27
|
-
const { className, dark
|
22
|
+
const { align, className, dark, date } = props
|
23
|
+
deprecatedProps('TimeStacked', ['tag'])
|
28
24
|
const classes = classnames(
|
29
|
-
buildCss('pb_time_stacked_kit',
|
30
|
-
dark,
|
31
|
-
}),
|
25
|
+
buildCss('pb_time_stacked_kit', align),
|
32
26
|
globalProps(props),
|
33
|
-
className
|
27
|
+
className,
|
34
28
|
)
|
35
29
|
|
36
|
-
const tagClasses = classnames(buildCss('pb_time_stacked_kit', tag))
|
37
|
-
|
38
30
|
const dateTimestamp = new DateTime({ value: date })
|
39
31
|
|
40
|
-
const Tag = Components[tag]
|
41
|
-
|
42
32
|
return (
|
43
33
|
<div className={classes}>
|
44
|
-
<div
|
45
|
-
|
46
|
-
|
34
|
+
<div
|
35
|
+
align={align}
|
36
|
+
className="pb_time_stacked_day_month"
|
37
|
+
>
|
38
|
+
<Body
|
47
39
|
color="light"
|
40
|
+
dark={dark}
|
48
41
|
text={dateTimestamp.toTimeWithMeridian()}
|
49
42
|
/>
|
50
|
-
<
|
43
|
+
<Caption
|
51
44
|
color="light"
|
45
|
+
dark={dark}
|
52
46
|
text={dateTimestamp.toTimezone()}
|
53
47
|
/>
|
54
48
|
</div>
|
@@ -1,20 +1,3 @@
|
|
1
1
|
@import "../pb_title/title";
|
2
2
|
@import "../pb_caption/caption";
|
3
3
|
@import "../tokens/colors";
|
4
|
-
|
5
|
-
|
6
|
-
[class^=pb_time_stacked_kit]{
|
7
|
-
&[class*=_dark] {
|
8
|
-
& > * [class^=pb_title_kit] {
|
9
|
-
color: $text_dk_default;
|
10
|
-
}
|
11
|
-
& > * [class^=pb_caption_kit] {
|
12
|
-
color: $text_dk_light;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
[class*=pb_time_stacked_kit_caption] {
|
18
|
-
padding-bottom: 2px;
|
19
|
-
text-transform: lowercase;
|
20
|
-
}
|
@@ -1,10 +1,21 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import TimeStacked from '../_time_stacked.jsx'
|
3
3
|
|
4
|
-
const TimeStackedDefault = () => {
|
4
|
+
const TimeStackedDefault = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<TimeStacked
|
8
|
+
{...props}
|
9
|
+
date={new Date()}
|
10
|
+
/>
|
11
|
+
<TimeStacked
|
12
|
+
{...props}
|
13
|
+
align="center"
|
14
|
+
date={new Date()}
|
15
|
+
/>
|
16
|
+
<TimeStacked
|
17
|
+
{...props}
|
18
|
+
align="right"
|
8
19
|
date={new Date()}
|
9
20
|
/>
|
10
21
|
</div>
|