playbook_ui_docs 16.8.0.pre.alpha.PLAY2935formbuilderrequiredindicatorbug16780 → 16.8.0.pre.alpha.PLAY2945selectformblankselection16424
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 +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +4 -12
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +2 -16
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +2 -16
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +5 -12
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +2 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.overrides.json +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_column_definitions_styling.json +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dialog_submission.jsx +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +0 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_react.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_react.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_react.md +1 -3
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_select_examples.html.erb +31 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +19 -20
- data/app/pb_kits/playbook/pb_form/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.html.erb +1 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.jsx +21 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_fa_kit.md +7 -0
- data/app/pb_kits/playbook/pb_icon/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_icon/docs/index.js +1 -0
- 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/example.yml +0 -2
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb +83 -85
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx +86 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_external_filter_rails.md +1 -1
- metadata +7 -12
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.jsx +0 -57
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.md +0 -66
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_enable_toggle_expansion_rails.html.erb +0 -62
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_enable_toggle_expansion_rails.md +0 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_scroll_limitation.jsx +0 -68
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_scroll_limitation.md +0 -7
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_centered_data.html.erb +0 -90
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_centered_data.jsx +0 -100
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_centered_data.md +0 -1
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_scroll_limitation.jsx
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import AdvancedTable from "../../pb_advanced_table/_advanced_table"
|
|
3
|
-
import Title from "../../pb_title/_title"
|
|
4
|
-
|
|
5
|
-
const COLUMN_COUNT = 10
|
|
6
|
-
const ROW_COUNT = 40
|
|
7
|
-
|
|
8
|
-
const columnDefinitions = [
|
|
9
|
-
{
|
|
10
|
-
accessor: "region",
|
|
11
|
-
label: "Region",
|
|
12
|
-
id: "region",
|
|
13
|
-
columnStyling: { minWidth: 160 },
|
|
14
|
-
},
|
|
15
|
-
...Array.from({ length: COLUMN_COUNT }, (_, index) => ({
|
|
16
|
-
accessor: `metric${index + 1}`,
|
|
17
|
-
label: `Metric ${index + 1}`,
|
|
18
|
-
id: `metric${index + 1}`,
|
|
19
|
-
columnStyling: { minWidth: 180 },
|
|
20
|
-
})),
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
const tableData = Array.from({ length: ROW_COUNT }, (_, row) => ({
|
|
24
|
-
region: `Region ${row + 1}`,
|
|
25
|
-
...Object.fromEntries(
|
|
26
|
-
Array.from({ length: COLUMN_COUNT }, (_, col) => [
|
|
27
|
-
`metric${col + 1}`,
|
|
28
|
-
String((row + 1) * (col + 1)),
|
|
29
|
-
])
|
|
30
|
-
),
|
|
31
|
-
}))
|
|
32
|
-
|
|
33
|
-
const tableProps = { sticky: true }
|
|
34
|
-
|
|
35
|
-
const AdvancedTableStickyScrollLimitation = (props) => (
|
|
36
|
-
<div>
|
|
37
|
-
<Title
|
|
38
|
-
size={4}
|
|
39
|
-
text="Without maxHeight"
|
|
40
|
-
{...props}
|
|
41
|
-
/>
|
|
42
|
-
<AdvancedTable
|
|
43
|
-
columnDefinitions={columnDefinitions}
|
|
44
|
-
responsive="none"
|
|
45
|
-
stickyLeftColumn={["region"]}
|
|
46
|
-
tableData={tableData}
|
|
47
|
-
tableProps={tableProps}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
<Title
|
|
51
|
-
paddingTop="sm"
|
|
52
|
-
size={4}
|
|
53
|
-
text="With maxHeight"
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
<AdvancedTable
|
|
57
|
-
columnDefinitions={columnDefinitions}
|
|
58
|
-
maxHeight="sm"
|
|
59
|
-
responsive="none"
|
|
60
|
-
stickyLeftColumn={["region"]}
|
|
61
|
-
tableData={tableData}
|
|
62
|
-
tableProps={tableProps}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
)
|
|
67
|
-
|
|
68
|
-
export default AdvancedTableStickyScrollLimitation
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_scroll_limitation.md
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
`stickyLeftColumn` adds horizontal overflow to the table wrapper. Without `maxHeight`, the page scrolls vertically while the table scrolls horizontally — two scroll containers.
|
|
2
|
-
|
|
3
|
-
Sticky columns work in that setup, but the sticky header cannot stick to the page. Scroll down on the page, then scroll the first table horizontally to see the conflict.
|
|
4
|
-
|
|
5
|
-
The second table uses `maxHeight` so both axes share one scroll container. The header sticks to the top of the table box instead of the page.
|
|
6
|
-
|
|
7
|
-
For a typical implementation with subrows, see [Sticky Columns with Sticky Header](#sticky-columns-with-sticky-header).
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<% data = [
|
|
2
|
-
{
|
|
3
|
-
name: "EV",
|
|
4
|
-
y: 23.9,
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
name: "Hybrids",
|
|
8
|
-
y: 12.6,
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
name: "Diesel",
|
|
12
|
-
y: 37.0,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: "Petrol",
|
|
16
|
-
y: 26.4,
|
|
17
|
-
},
|
|
18
|
-
] %>
|
|
19
|
-
|
|
20
|
-
<% total = data.sum { |point| point[:y] } %>
|
|
21
|
-
<% subtitle_rows = data.map { |point| "#{point[:name]}: #{point[:y]}%" }.join("<br>") %>
|
|
22
|
-
|
|
23
|
-
<% chart_options = {
|
|
24
|
-
chart: {
|
|
25
|
-
type: "pie",
|
|
26
|
-
},
|
|
27
|
-
accessibility: {
|
|
28
|
-
point: {
|
|
29
|
-
valueSuffix: "%",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
title: {
|
|
33
|
-
text: "2023 Norway car registrations",
|
|
34
|
-
floating: true,
|
|
35
|
-
align: "center",
|
|
36
|
-
verticalAlign: "top",
|
|
37
|
-
y: 8,
|
|
38
|
-
},
|
|
39
|
-
subtitle: {
|
|
40
|
-
text: "Total<br><strong>#{total.round(1)}</strong><br><br>#{subtitle_rows}",
|
|
41
|
-
useHTML: true,
|
|
42
|
-
floating: true,
|
|
43
|
-
align: "center",
|
|
44
|
-
verticalAlign: "middle",
|
|
45
|
-
y: 8,
|
|
46
|
-
style: {
|
|
47
|
-
textAlign: "center",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
tooltip: {
|
|
51
|
-
pointFormat: "{series.name}: <b>{point.percentage:.0f}%</b>",
|
|
52
|
-
},
|
|
53
|
-
legend: {
|
|
54
|
-
enabled: false,
|
|
55
|
-
},
|
|
56
|
-
plotOptions: {
|
|
57
|
-
series: {
|
|
58
|
-
allowPointSelect: true,
|
|
59
|
-
cursor: "pointer",
|
|
60
|
-
borderRadius: 8,
|
|
61
|
-
dataLabels: [
|
|
62
|
-
{
|
|
63
|
-
enabled: true,
|
|
64
|
-
distance: 20,
|
|
65
|
-
format: "{point.name}",
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
enabled: true,
|
|
69
|
-
distance: -15,
|
|
70
|
-
format: "{point.percentage:.0f}%",
|
|
71
|
-
style: {
|
|
72
|
-
fontSize: "0.9em",
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
showInLegend: true,
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
series: [
|
|
80
|
-
{
|
|
81
|
-
name: "Registrations",
|
|
82
|
-
colorByPoint: true,
|
|
83
|
-
center: ["50%", "50%"],
|
|
84
|
-
innerSize: "75%",
|
|
85
|
-
data: data,
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
} %>
|
|
89
|
-
|
|
90
|
-
<%= pb_rails("pb_circle_chart", props: { options: chart_options }) %>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import PbCircleChart from "../_pb_circle_chart";
|
|
3
|
-
|
|
4
|
-
const data = [
|
|
5
|
-
{
|
|
6
|
-
name: "EV",
|
|
7
|
-
y: 23.9,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: "Hybrids",
|
|
11
|
-
y: 12.6,
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: "Diesel",
|
|
15
|
-
y: 37.0,
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "Petrol",
|
|
19
|
-
y: 26.4,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
|
|
23
|
-
const total = data.reduce((sum, point) => sum + point.y, 0);
|
|
24
|
-
const subtitleRows = data.map((point) => `${point.name}: ${point.y}%`).join("<br>");
|
|
25
|
-
|
|
26
|
-
const chartOptions = {
|
|
27
|
-
chart: {
|
|
28
|
-
type: "pie",
|
|
29
|
-
},
|
|
30
|
-
accessibility: {
|
|
31
|
-
point: {
|
|
32
|
-
valueSuffix: "%",
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
title: {
|
|
36
|
-
text: "2023 Norway car registrations",
|
|
37
|
-
floating: true,
|
|
38
|
-
align: "center",
|
|
39
|
-
verticalAlign: "top",
|
|
40
|
-
y: 8,
|
|
41
|
-
},
|
|
42
|
-
subtitle: {
|
|
43
|
-
text: `Total<br><strong>${total.toFixed(1)}</strong><br><br>${subtitleRows}`,
|
|
44
|
-
useHTML: true,
|
|
45
|
-
floating: true,
|
|
46
|
-
align: "center",
|
|
47
|
-
verticalAlign: "middle",
|
|
48
|
-
y: 8,
|
|
49
|
-
style: {
|
|
50
|
-
textAlign: "center",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
tooltip: {
|
|
54
|
-
pointFormat: "{series.name}: <b>{point.percentage:.0f}%</b>",
|
|
55
|
-
},
|
|
56
|
-
legend: {
|
|
57
|
-
enabled: false,
|
|
58
|
-
},
|
|
59
|
-
plotOptions: {
|
|
60
|
-
series: {
|
|
61
|
-
allowPointSelect: true,
|
|
62
|
-
cursor: "pointer",
|
|
63
|
-
borderRadius: 8,
|
|
64
|
-
dataLabels: [
|
|
65
|
-
{
|
|
66
|
-
enabled: true,
|
|
67
|
-
distance: 20,
|
|
68
|
-
format: "{point.name}",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
enabled: true,
|
|
72
|
-
distance: -15,
|
|
73
|
-
format: "{point.percentage:.0f}%",
|
|
74
|
-
style: {
|
|
75
|
-
fontSize: "0.9em",
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
showInLegend: true,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
series: [
|
|
83
|
-
{
|
|
84
|
-
name: "Registrations",
|
|
85
|
-
colorByPoint: true,
|
|
86
|
-
center: ["50%", "50%"],
|
|
87
|
-
innerSize: "75%",
|
|
88
|
-
data,
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const PbCircleChartCenteredData = (props) => (
|
|
94
|
-
<PbCircleChart
|
|
95
|
-
options={chartOptions}
|
|
96
|
-
{...props}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
export default PbCircleChartCenteredData;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
This example shows how to achieve centered data. This data will remain in the center of all screen sizes.
|