playbook_ui 13.28.0.pre.alpha.PBNTR297gradientoverlay3029 → 13.28.0.pre.alpha.PLAY888Cardkithighlightoverflowtooltiperror2937
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/_playbook.scss +3 -3
- data/app/pb_kits/playbook/index.js +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +4 -14
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +2 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +1 -4
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -16
- data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom_rails.html.erb → _bar_graph_custom.html.erb} +3 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +1 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_card/_card.scss +1 -1
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -2
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +2 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +3 -9
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +1 -22
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +8 -14
- data/app/pb_kits/playbook/pb_collapsible/collapsible.test.js +0 -24
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -7
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -9
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -10
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -4
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +1 -6
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +2 -8
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -22
- data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +32 -30
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +2 -0
- data/app/pb_kits/playbook/pb_table/_table.tsx +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +32 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/{_table_outer_padding.html.erb → _table_alignment_row.html.erb} +7 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
- 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 +50 -51
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
- 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 +38 -37
- data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -1
- data/app/pb_kits/playbook/pb_table/table.rb +1 -14
- data/app/pb_kits/playbook/pb_table/table.test.js +1 -5
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +9 -12
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +1 -6
- data/app/pb_kits/playbook/playbook-doc.js +0 -4
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -12
- data/dist/menu.yml +2 -7
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/classnames.rb +0 -1
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/kit_base.rb +0 -2
- data/lib/playbook/version.rb +1 -1
- metadata +7 -51
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +0 -40
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +0 -34
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +0 -31
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +0 -53
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +0 -10
- data/app/pb_kits/playbook/pb_draggable/_draggable.tsx +0 -53
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +0 -92
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +0 -159
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +0 -121
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +0 -65
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +0 -54
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +0 -57
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +0 -12
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +0 -93
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +0 -40
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +0 -7
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +0 -36
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +0 -5
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +0 -66
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +0 -54
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +0 -53
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +0 -76
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_outer_padding.scss +0 -21
- data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +0 -61
- data/app/pb_kits/playbook/tokens/_vertical_align.scss +0 -18
- data/app/pb_kits/playbook/utilities/_vertical_align.scss +0 -16
- data/lib/playbook/forms/builder/dropdown_field.rb +0 -14
- data/lib/playbook/vertical_align.rb +0 -37
- /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column_rails.html.erb → _table_alignment_column.html.erb} +0 -0
@@ -8,7 +8,6 @@ import Highcharts from "highcharts";
|
|
8
8
|
import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
|
9
9
|
import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
|
10
10
|
import mapColors from "../pb_dashboard/pbChartsColorsHelper";
|
11
|
-
import { merge } from 'lodash'
|
12
11
|
|
13
12
|
type LineGraphProps = {
|
14
13
|
align?: "left" | "right" | "center";
|
@@ -22,7 +21,6 @@ type LineGraphProps = {
|
|
22
21
|
name: string;
|
23
22
|
data: number[];
|
24
23
|
}[];
|
25
|
-
customOptions?: Partial<Highcharts.Options>;
|
26
24
|
gradient?: boolean;
|
27
25
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
28
26
|
id: string;
|
@@ -47,7 +45,6 @@ const LineGraph = ({
|
|
47
45
|
data = {},
|
48
46
|
align = "center",
|
49
47
|
className = "pb_bar_graph",
|
50
|
-
customOptions = {},
|
51
48
|
dark = false,
|
52
49
|
gradient = false,
|
53
50
|
type = "line",
|
@@ -133,19 +130,16 @@ const LineGraph = ({
|
|
133
130
|
staticOptions.plotOptions.series.events = { legendItemClick: () => false };
|
134
131
|
}
|
135
132
|
|
136
|
-
const filteredProps: any = {...props};
|
137
|
-
delete filteredProps.verticalAlign;
|
138
|
-
|
139
133
|
const [options, setOptions] = useState({});
|
140
134
|
|
141
135
|
useEffect(() => {
|
142
|
-
setOptions(
|
136
|
+
setOptions({ ...staticOptions });
|
143
137
|
}, [chartData]);
|
144
138
|
|
145
139
|
return (
|
146
140
|
<HighchartsReact
|
147
141
|
containerProps={{
|
148
|
-
className: classnames(globalProps(
|
142
|
+
className: classnames(globalProps(props), className),
|
149
143
|
id: id,
|
150
144
|
...ariaProps,
|
151
145
|
...dataProps,
|
@@ -9,7 +9,6 @@ module Playbook
|
|
9
9
|
prop :axis_title
|
10
10
|
prop :chart_data, type: Playbook::Props::Array,
|
11
11
|
default: []
|
12
|
-
prop :custom_options, default: {}
|
13
12
|
prop :gradient, type: Playbook::Props::Boolean,
|
14
13
|
default: false
|
15
14
|
prop :point_start, type: Playbook::Props::Numeric
|
@@ -39,7 +38,7 @@ module Playbook
|
|
39
38
|
gradient ? "area" : "line"
|
40
39
|
end
|
41
40
|
|
42
|
-
def
|
41
|
+
def chart_options
|
43
42
|
{
|
44
43
|
align: align,
|
45
44
|
id: id,
|
@@ -65,26 +64,6 @@ module Playbook
|
|
65
64
|
}
|
66
65
|
end
|
67
66
|
|
68
|
-
def chart_options
|
69
|
-
standard_options.deep_merge(custom_options)
|
70
|
-
end
|
71
|
-
|
72
|
-
def vertical_align_props
|
73
|
-
if vertical_align
|
74
|
-
if object.vertical_align
|
75
|
-
original_result = super
|
76
|
-
class_to_remove = "vertical_align_#{object.vertical_align}"
|
77
|
-
|
78
|
-
modified_result = original_result.gsub(class_to_remove, "").strip
|
79
|
-
modified_result.empty? ? nil : modified_result
|
80
|
-
else
|
81
|
-
super
|
82
|
-
end
|
83
|
-
else
|
84
|
-
super
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
67
|
def classname
|
89
68
|
generate_classname("pb_line_graph")
|
90
69
|
end
|
@@ -1 +1 @@
|
|
1
|
-
A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color
|
1
|
+
A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color here: https://playbook.powerapp.cloud/utilities
|
@@ -131,41 +131,43 @@ const SelectableCard = (props: SelectableCardProps) => {
|
|
131
131
|
className={globalProps(labelProps)}
|
132
132
|
htmlFor={inputIdPresent}
|
133
133
|
>
|
134
|
-
|
135
|
-
|
136
|
-
<Flex
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
134
|
+
<div className="buffer">
|
135
|
+
{variant === 'displayInput' ?
|
136
|
+
<Flex vertical="center">
|
137
|
+
<Flex
|
138
|
+
orientation="column"
|
139
|
+
padding="sm"
|
140
|
+
paddingRight="xs"
|
141
|
+
vertical="center"
|
142
|
+
>
|
143
|
+
<Input
|
144
|
+
dark={dark}
|
145
|
+
>
|
146
|
+
<input
|
147
|
+
checked={checked}
|
148
|
+
disabled={disabled}
|
149
|
+
onClick={handleClick}
|
150
|
+
readOnly
|
151
|
+
type={inputType}
|
152
|
+
/>
|
153
|
+
</Input>
|
154
|
+
</Flex>
|
155
|
+
<div className="separator" />
|
156
|
+
<div className="psuedo_separator"/>
|
157
|
+
<Card
|
158
|
+
borderNone
|
143
159
|
dark={dark}
|
160
|
+
padding="sm"
|
161
|
+
status={error ? 'negative' : null}
|
144
162
|
>
|
145
|
-
|
146
|
-
|
147
|
-
disabled={disabled}
|
148
|
-
onClick={handleClick}
|
149
|
-
readOnly
|
150
|
-
type={inputType}
|
151
|
-
/>
|
152
|
-
</Input>
|
163
|
+
{text ||props.children}
|
164
|
+
</Card>
|
153
165
|
</Flex>
|
154
|
-
|
155
|
-
<div className="psuedo_separator"/>
|
156
|
-
<Card
|
157
|
-
borderNone
|
158
|
-
dark={dark}
|
159
|
-
padding="sm"
|
160
|
-
status={error ? 'negative' : null}
|
161
|
-
>
|
162
|
-
{text ||props.children}
|
163
|
-
</Card>
|
164
|
-
</Flex>
|
165
|
-
:
|
166
|
+
:
|
166
167
|
text || props.children
|
167
|
-
|
168
|
+
}
|
168
169
|
{displayIcon()}
|
170
|
+
</div>
|
169
171
|
</label>
|
170
172
|
</div>
|
171
173
|
)
|
@@ -11,6 +11,7 @@
|
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<label class="<%= object.label_class %>" for="<%= object.input_id_present %>">
|
14
|
+
<div class="buffer">
|
14
15
|
<% if object.variant == "display_input" %>
|
15
16
|
<%= pb_rails("flex", props: { vertical: "center" }) do %>
|
16
17
|
<%= pb_rails("flex", props: {
|
@@ -45,6 +46,7 @@
|
|
45
46
|
</div>
|
46
47
|
<% end %>
|
47
48
|
<% end %>
|
49
|
+
</div>
|
48
50
|
</label>
|
49
51
|
|
50
52
|
<% if object.variant == "display_input" %>
|
@@ -23,7 +23,6 @@ type TableProps = {
|
|
23
23
|
disableHover?: boolean,
|
24
24
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
|
25
25
|
id?: string,
|
26
|
-
outerPadding?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
|
27
26
|
responsive?: "collapse" | "scroll" | "none",
|
28
27
|
singleLine?: boolean,
|
29
28
|
size?: "sm" | "md" | "lg",
|
@@ -46,7 +45,6 @@ const Table = (props: TableProps) => {
|
|
46
45
|
disableHover = false,
|
47
46
|
htmlOptions = {},
|
48
47
|
id,
|
49
|
-
outerPadding = '',
|
50
48
|
responsive = 'collapse',
|
51
49
|
singleLine = false,
|
52
50
|
size = 'sm',
|
@@ -61,8 +59,6 @@ const Table = (props: TableProps) => {
|
|
61
59
|
const htmlProps = buildHtmlProps(htmlOptions)
|
62
60
|
const tableCollapseCss = responsive !== 'none' ? `table-collapse-${collapse}` : ''
|
63
61
|
const verticalBorderCss = verticalBorder ? 'vertical-border' : ''
|
64
|
-
const spaceCssName = outerPadding !== 'none' ? 'space_' : ''
|
65
|
-
const outerPaddingCss = outerPadding ? `outer_padding_${spaceCssName}${outerPadding}` : ''
|
66
62
|
const isTableTag = tag === 'table'
|
67
63
|
|
68
64
|
const classNames = classnames(
|
@@ -77,7 +73,6 @@ const Table = (props: TableProps) => {
|
|
77
73
|
'no-hover': disableHover,
|
78
74
|
'sticky-header': sticky,
|
79
75
|
'striped': striped,
|
80
|
-
[outerPaddingCss]: outerPadding !== '',
|
81
76
|
},
|
82
77
|
globalProps(props),
|
83
78
|
tableCollapseCss,
|
@@ -7,40 +7,39 @@ const TableAlignmentColumn = (props) => {
|
|
7
7
|
<Table
|
8
8
|
{...props}
|
9
9
|
>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>{'Column 1'}</th>
|
13
|
+
<th>{'Column 2'}</th>
|
14
|
+
<th>{'Column 3'}</th>
|
15
|
+
<th align="center">{'Rating'}</th>
|
16
|
+
<th align="right">{'Money'}</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<tr>
|
21
|
+
<td>{'Value 1'}</td>
|
22
|
+
<td>{'Value 2'}</td>
|
23
|
+
<td>{'Value 3'}</td>
|
24
|
+
<td align="center">{'3'}</td>
|
25
|
+
<td align="right">{'$57.32'}</td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td>{'Value 1'}</td>
|
29
|
+
<td>{'Value 2'}</td>
|
30
|
+
<td>{'Value 3'}</td>
|
31
|
+
<td align="center">{'2'}</td>
|
32
|
+
<td align="right">{'$5,657.08'}</td>
|
33
|
+
</tr>
|
34
|
+
<tr>
|
35
|
+
<td>{'Value 1'}</td>
|
36
|
+
<td>{'Value 2'}</td>
|
37
|
+
<td>{'Value 3'}</td>
|
38
|
+
<td align="center">{'4'}</td>
|
39
|
+
<td align="right">{'$358.77'}</td>
|
40
|
+
</tr>
|
41
|
+
</tbody>
|
42
42
|
</Table>
|
43
|
-
|
44
43
|
)
|
45
44
|
}
|
46
45
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
You can individually align a piece of table data, but a more practical use would be applied to align a column.
|
2
2
|
In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%= pb_rails("table"
|
1
|
+
<%= pb_rails("table") do %>
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
4
|
<th>Column 1</th>
|
5
5
|
<th>Column 2</th>
|
6
6
|
<th>Column 3</th>
|
7
7
|
<th>Column 4</th>
|
8
|
-
<th
|
8
|
+
<th>Column 5</th>
|
9
9
|
</tr>
|
10
10
|
</thead>
|
11
11
|
<tbody>
|
@@ -14,21 +14,21 @@
|
|
14
14
|
<td>Value 2</td>
|
15
15
|
<td>Value 3</td>
|
16
16
|
<td>Value 4</td>
|
17
|
-
<td
|
17
|
+
<td>Value 5</td>
|
18
18
|
</tr>
|
19
|
-
<tr>
|
19
|
+
<tr align="center">
|
20
20
|
<td>Value 1</td>
|
21
21
|
<td>Value 2</td>
|
22
22
|
<td>Value 3</td>
|
23
23
|
<td>Value 4</td>
|
24
|
-
<td
|
24
|
+
<td>Value 5</td>
|
25
25
|
</tr>
|
26
|
-
<tr>
|
26
|
+
<tr align="right">
|
27
27
|
<td>Value 1</td>
|
28
28
|
<td>Value 2</td>
|
29
29
|
<td>Value 3</td>
|
30
30
|
<td>Value 4</td>
|
31
|
-
<td
|
31
|
+
<td>Value 5</td>
|
32
32
|
</tr>
|
33
33
|
</tbody>
|
34
34
|
<% end %>
|
@@ -7,39 +7,39 @@ const TableAlignmentRow = (props) => {
|
|
7
7
|
<Table
|
8
8
|
{...props}
|
9
9
|
>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>{'Column 1'}</th>
|
13
|
+
<th>{'Column 2'}</th>
|
14
|
+
<th>{'Column 3'}</th>
|
15
|
+
<th>{'Column 4'}</th>
|
16
|
+
<th>{'Column 5'}</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<tr>
|
21
|
+
<td>{'Value 1'}</td>
|
22
|
+
<td>{'Value 2'}</td>
|
23
|
+
<td>{'Value 3'}</td>
|
24
|
+
<td>{'Value 4'}</td>
|
25
|
+
<td>{'Value 5'}</td>
|
26
|
+
</tr>
|
27
|
+
<tr align="center">
|
28
|
+
<td>{'Value 1'}</td>
|
29
|
+
<td>{'Value 2'}</td>
|
30
|
+
<td>{'Value 3'}</td>
|
31
|
+
<td>{'Value 4'}</td>
|
32
|
+
<td>{'Value 5'}</td>
|
33
|
+
</tr>
|
34
|
+
<tr align="right">
|
35
|
+
<td>{'Value 1'}</td>
|
36
|
+
<td>{'Value 2'}</td>
|
37
|
+
<td>{'Value 3'}</td>
|
38
|
+
<td>{'Value 4'}</td>
|
39
|
+
<td>{'Value 5'}</td>
|
40
|
+
</tr>
|
41
|
+
</tbody>
|
42
|
+
</Table>
|
43
43
|
)
|
44
44
|
}
|
45
45
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
This is to be used to shift the whole row.
|
2
2
|
The header/ first row is the default, followed by the second row being centered, and then the last row shifted to the right.
|
@@ -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 %>
|
@@ -9,16 +9,16 @@ const TableAlignmentShiftData = (props) => {
|
|
9
9
|
marginBottom="md"
|
10
10
|
{...props}
|
11
11
|
>
|
12
|
-
<
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
</
|
17
|
-
</
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
<
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<th> </th>
|
15
|
+
<th>{'Price'}</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<tr>
|
20
|
+
<td shift="down">{'Total'}</td>
|
21
|
+
<td>
|
22
22
|
{'$12'}
|
23
23
|
<br />
|
24
24
|
{'$46'}
|
@@ -28,51 +28,50 @@ const TableAlignmentShiftData = (props) => {
|
|
28
28
|
{'-------'}
|
29
29
|
<br />
|
30
30
|
{'$83'}
|
31
|
-
</
|
32
|
-
</
|
33
|
-
</
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
</tbody>
|
34
34
|
</Table>
|
35
|
-
|
36
35
|
<Table
|
37
36
|
{...props}
|
38
37
|
>
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
</
|
58
|
-
<
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
38
|
+
<thead>
|
39
|
+
<tr>
|
40
|
+
<th>{'Espresso Drinks'}</th>
|
41
|
+
<th>{'Ingredients'}</th>
|
42
|
+
</tr>
|
43
|
+
</thead>
|
44
|
+
<tbody>
|
45
|
+
<tr>
|
46
|
+
<td shift="up">{'Cappuccino'}</td>
|
47
|
+
<td>
|
48
|
+
{'Espresso'}
|
49
|
+
<br />
|
50
|
+
{'Steamed Milk'}
|
51
|
+
<br />
|
52
|
+
{'Milk Foam'}
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td shift="up">{'Macchiato'}</td>
|
57
|
+
<td>
|
58
|
+
{'Espresso'}
|
59
|
+
<br />
|
60
|
+
{'Steamed Milk'}
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td shift="up">{'Mocha'}</td>
|
65
|
+
<td>
|
66
|
+
{'Espresso'}
|
67
|
+
<br />
|
68
|
+
{'Hot Chocolate'}
|
69
|
+
<br />
|
70
|
+
{'Steamed Milk'}
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</tbody>
|
74
|
+
</Table>
|
76
75
|
</div>
|
77
76
|
)
|
78
77
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
You can individually shift a piece of table data, or shift an entire column.
|
2
2
|
The first table shifts "Total" down, whereas the second table shifts the "Espresso Drinks" column contents up.
|