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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e18a62983a7a32baed6bdf7820a428540ccfb00e503620c25b07e66d04502d43
|
|
4
|
+
data.tar.gz: 78d3e72164769d3dba478f2f95f01363c76458c513b46ffcaba8d50b1b44351e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf11e9f06655de8e7cafd9606746620d8fd47e7522c598213c3f7d7d1941714b9e56d2bb2d6e36b56dd1ae6e22f83e67ead67e5d9cb377fed5f20cdad9f82da1
|
|
7
|
+
data.tar.gz: 0a7fdbb41a8b81c98940bac514b1b8a841267fb05271aadf4a2f7547470780cf1499014c56a5d94a19421b2a0ce0d8a9d37e17eb938363aec6c188417feef96c
|
|
@@ -6,10 +6,4 @@ The `columnStyling` prop is an optional item that can be used within `columnDefi
|
|
|
6
6
|
|
|
7
7
|
3) `fontColor`: This will allow you to control the font color for a given column.
|
|
8
8
|
|
|
9
|
-
4) Column width: optional keys on `columnStyling` are `minWidth`, `width`, and `maxWidth` (numbers = pixels; CSS strings allowed). This example sets `width` on Year for a fixed hierarchy column (see the width doc for `minWidth` and bands).
|
|
10
|
-
|
|
11
|
-
Fixed width: pass `width` only (or TanStack `size` only) and Playbook sets min and max to the same value automatically — you do not need all three for an exact width.
|
|
12
|
-
|
|
13
|
-
See [Column Styling: Width](https://playbook.powerapp.cloud/kits/advanced_table/react#column-styling-width) for the full guide (Playbook ↔ TanStack mapping, floor-only vs bands, and when to use one vs three values).
|
|
14
|
-
|
|
15
9
|
`columnStyling` can be used within the columnDefinition of all the columns or some of them, as shown. Each column has its own individual control in this way.
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
|
-
|
|
4
|
-
const tableData = Array.from({ length: 15 }, (_, index) => ({
|
|
5
|
-
year: String(2020 + index),
|
|
6
|
-
newEnrollments: String(20 + index),
|
|
7
|
-
scheduledMeetings: String(10 + index),
|
|
8
|
-
attendanceRate: `${50 + index}%`,
|
|
9
|
-
completedClasses: String(3 + index),
|
|
10
|
-
classCompletionRate: `${30 + index}%`,
|
|
11
|
-
graduatedStudents: String(19 + index),
|
|
12
|
-
}))
|
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
13
4
|
|
|
14
5
|
const AdvancedTableStickyHeader = (props) => {
|
|
15
6
|
const columnDefinitions = [
|
|
16
7
|
{
|
|
17
8
|
accessor: "year",
|
|
18
9
|
label: "Year",
|
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
19
11
|
},
|
|
20
12
|
{
|
|
21
13
|
accessor: "newEnrollments",
|
|
@@ -48,11 +40,11 @@ const AdvancedTableStickyHeader = (props) => {
|
|
|
48
40
|
}
|
|
49
41
|
|
|
50
42
|
return (
|
|
51
|
-
<div
|
|
43
|
+
<div>
|
|
52
44
|
<AdvancedTable
|
|
53
45
|
columnDefinitions={columnDefinitions}
|
|
54
46
|
responsive="none"
|
|
55
|
-
tableData={
|
|
47
|
+
tableData={MOCK_DATA}
|
|
56
48
|
tableProps={tableProps}
|
|
57
49
|
{...props}
|
|
58
50
|
/>
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
The `TableProps` prop can also be used to render a sticky header for the Advanced Table.
|
|
2
2
|
|
|
3
|
-
This doc example uses a scroll container with flat rows so sticky behavior is visible in the docs without expanding subrows. Scroll inside the preview to see the header stick.
|
|
4
|
-
|
|
5
|
-
This example builds flat table data inline for the docs preview. For typical `tableData` setup, see [Default (Required Props)](/kits/advanced_table/default/react#advanced_table_default).
|
|
6
|
-
|
|
7
3
|
This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "Sticky Header for Responsive Table" doc example below.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
accessor: "year",
|
|
4
4
|
label: "Year",
|
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
5
6
|
},
|
|
6
7
|
{
|
|
7
8
|
accessor: "newEnrollments",
|
|
@@ -29,19 +30,4 @@
|
|
|
29
30
|
}
|
|
30
31
|
] %>
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
year: (2020 + index).to_s,
|
|
35
|
-
id: (2020 + index).to_s,
|
|
36
|
-
newEnrollments: (20 + index).to_s,
|
|
37
|
-
scheduledMeetings: (10 + index).to_s,
|
|
38
|
-
attendanceRate: "#{50 + index}%",
|
|
39
|
-
completedClasses: (3 + index).to_s,
|
|
40
|
-
classCompletionRate: "#{30 + index}%",
|
|
41
|
-
graduatedStudents: (19 + index).to_s,
|
|
42
|
-
}
|
|
43
|
-
end %>
|
|
44
|
-
|
|
45
|
-
<div style="max-height: 320px; overflow-y: auto;">
|
|
46
|
-
<%= pb_rails("advanced_table", props: { id: "sticky_header_table", table_data: table_data, column_definitions: column_definitions, responsive: "none", table_props: { sticky: true }}) %>
|
|
47
|
-
</div>
|
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "sticky_header_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { sticky: true }}) %>
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
The `table_props` prop can also be used to render a sticky header for the Advanced Table.
|
|
2
2
|
|
|
3
|
-
This doc example uses a scroll container with flat rows so sticky behavior is visible in the docs without expanding subrows. Scroll inside the preview to see the header stick.
|
|
4
|
-
|
|
5
|
-
This example builds flat table data inline for the docs preview. For typical `table_data` setup, see [Default (Required Props)](/kits/advanced_table/default/rails#advanced_table_beta).
|
|
6
|
-
|
|
7
3
|
This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "[Sticky Header for Responsive Table](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header-for-responsive-table)" doc example below.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
accessor: "year",
|
|
4
4
|
label: "Year",
|
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
5
6
|
},
|
|
6
7
|
{
|
|
7
8
|
accessor: "newEnrollments",
|
|
@@ -29,19 +30,4 @@
|
|
|
29
30
|
}
|
|
30
31
|
] %>
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
year: (2020 + index).to_s,
|
|
35
|
-
id: (2020 + index).to_s,
|
|
36
|
-
newEnrollments: (20 + index).to_s,
|
|
37
|
-
scheduledMeetings: (10 + index).to_s,
|
|
38
|
-
attendanceRate: "#{50 + index}%",
|
|
39
|
-
completedClasses: (3 + index).to_s,
|
|
40
|
-
classCompletionRate: "#{30 + index}%",
|
|
41
|
-
graduatedStudents: (19 + index).to_s,
|
|
42
|
-
}
|
|
43
|
-
end %>
|
|
44
|
-
|
|
45
|
-
<div style="max-height: 320px; overflow-y: auto;">
|
|
46
|
-
<%= pb_rails("advanced_table", props: { id: "table_props_sticky_table", table_data: table_data, column_definitions: column_definitions, table_props: { sticky: true }}) %>
|
|
47
|
-
</div>
|
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_sticky_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
CHANGED
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
|
-
|
|
4
|
-
const tableData = Array.from({ length: 15 }, (_, index) => ({
|
|
5
|
-
year: String(2020 + index),
|
|
6
|
-
newEnrollments: String(20 + index),
|
|
7
|
-
scheduledMeetings: String(10 + index),
|
|
8
|
-
attendanceRate: `${50 + index}%`,
|
|
9
|
-
completedClasses: String(3 + index),
|
|
10
|
-
classCompletionRate: `${30 + index}%`,
|
|
11
|
-
graduatedStudents: String(19 + index),
|
|
12
|
-
}))
|
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
13
4
|
|
|
14
5
|
const AdvancedTableTablePropsStickyHeader = (props) => {
|
|
15
6
|
const columnDefinitions = [
|
|
16
7
|
{
|
|
17
8
|
accessor: "year",
|
|
18
9
|
label: "Year",
|
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
19
11
|
},
|
|
20
12
|
{
|
|
21
13
|
accessor: "newEnrollments",
|
|
@@ -48,10 +40,11 @@ const AdvancedTableTablePropsStickyHeader = (props) => {
|
|
|
48
40
|
}
|
|
49
41
|
|
|
50
42
|
return (
|
|
51
|
-
<div
|
|
43
|
+
<div>
|
|
52
44
|
<AdvancedTable
|
|
53
45
|
columnDefinitions={columnDefinitions}
|
|
54
|
-
|
|
46
|
+
maxHeight="xs"
|
|
47
|
+
tableData={MOCK_DATA}
|
|
55
48
|
tableProps={tableProps}
|
|
56
49
|
{...props}
|
|
57
50
|
/>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
CHANGED
|
@@ -2,10 +2,6 @@ Create a sticky header that works for responsive Advanced Tables by setting `sti
|
|
|
2
2
|
|
|
3
3
|
**NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
|
4
4
|
|
|
5
|
-
Scroll inside the table preview to see the header stick.
|
|
6
|
-
|
|
7
|
-
This example builds flat table data inline for the docs preview. For typical `table_data` setup, see [Default (Required Props)](/kits/advanced_table/default/rails#advanced_table_beta).
|
|
8
|
-
|
|
9
5
|
Expand the table above to see this in action.
|
|
10
6
|
|
|
11
7
|
A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#sticky-header) doc example above.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/global_props/max_height) global prop.
|
|
2
2
|
|
|
3
|
-
**NOTE**: The header is sticky within the table
|
|
3
|
+
**NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Expand the table above to see responsive behavior in action.
|
|
5
|
+
Expand the table above to see this in action.
|
|
8
6
|
|
|
9
7
|
A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header) doc example above.
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
},
|
|
314
314
|
"column_styling_info": {
|
|
315
315
|
"presetName": "Column Styling",
|
|
316
|
-
"message": "This sample uses columnStyling on column definitions.
|
|
316
|
+
"message": "This sample uses columnStyling on column definitions. You can style headers and cells for the whole table or per column.",
|
|
317
317
|
"type": "info"
|
|
318
318
|
}
|
|
319
319
|
},
|
|
@@ -2628,10 +2628,7 @@
|
|
|
2628
2628
|
"quarter",
|
|
2629
2629
|
"month",
|
|
2630
2630
|
"day"
|
|
2631
|
-
]
|
|
2632
|
-
"columnStyling": {
|
|
2633
|
-
"width": 124
|
|
2634
|
-
}
|
|
2631
|
+
]
|
|
2635
2632
|
},
|
|
2636
2633
|
{
|
|
2637
2634
|
"accessor": "newEnrollments",
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
},
|
|
372
372
|
"column_styling_info": {
|
|
373
373
|
"presetName": "Column Styling",
|
|
374
|
-
"message": "This sample uses columnStyling on column definitions.
|
|
374
|
+
"message": "This sample uses columnStyling on column definitions. You can style headers and cells for the whole table or per column.",
|
|
375
375
|
"type": "info"
|
|
376
376
|
}
|
|
377
377
|
}
|
|
@@ -3,7 +3,6 @@ examples:
|
|
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
|
4
4
|
- advanced_table_loading: Loading State
|
|
5
5
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
|
6
|
-
- advanced_table_enable_toggle_expansion_rails: Enable Toggle Expansion
|
|
7
6
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
|
8
7
|
- advanced_table_table_props: Table Props
|
|
9
8
|
- advanced_table_sticky_header_rails: Sticky Header
|
|
@@ -53,7 +52,6 @@ examples:
|
|
|
53
52
|
- advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
|
|
54
53
|
- advanced_table_sticky_columns: Sticky Columns
|
|
55
54
|
- advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
|
|
56
|
-
- advanced_table_sticky_scroll_limitation: Sticky Header and Column Scroll Limitation
|
|
57
55
|
- advanced_table_responsive: Responsive Tables
|
|
58
56
|
- advanced_table_custom_cell: Custom Components for Cells
|
|
59
57
|
- advanced_table_with_custom_header: Custom Header Cell
|
|
@@ -82,7 +80,6 @@ examples:
|
|
|
82
80
|
- advanced_table_row_styling: Row Styling
|
|
83
81
|
- advanced_table_padding_control_per_row: Padding Control using Row Styling
|
|
84
82
|
- advanced_table_column_styling: Column Styling
|
|
85
|
-
- advanced_table_column_styling_width: Column Styling Width
|
|
86
83
|
- advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
|
|
87
84
|
- advanced_table_column_styling_background: Column Styling Background Color
|
|
88
85
|
- advanced_table_column_styling_background_custom: Column Styling Background Color (Custom)
|
|
@@ -27,7 +27,6 @@ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen
|
|
|
27
27
|
export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
|
|
28
28
|
export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
|
|
29
29
|
export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
|
|
30
|
-
export { default as AdvancedTableStickyScrollLimitation } from './_advanced_table_sticky_scroll_limitation.jsx'
|
|
31
30
|
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
|
32
31
|
export { default as AdvancedTableColumnBorderColor} from './_advanced_table_column_border_color.jsx'
|
|
33
32
|
export { default as AdvancedTableColumnVisibility } from './_advanced_table_column_visibility.jsx'
|
|
@@ -38,7 +37,6 @@ export { default as AdvancedTablePinnedRows } from './_advanced_table_pinned_row
|
|
|
38
37
|
export { default as AdvancedTableScrollbarNone} from './_advanced_table_scrollbar_none.jsx'
|
|
39
38
|
export { default as AdvancedTableRowStyling } from './_advanced_table_row_styling.jsx'
|
|
40
39
|
export { default as AdvancedTableColumnStyling } from './_advanced_table_column_styling.jsx'
|
|
41
|
-
export { default as AdvancedTableColumnStylingWidth } from './_advanced_table_column_styling_width.jsx'
|
|
42
40
|
export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
|
|
43
41
|
export { default as AdvancedTableInfiniteScroll} from './_advanced_table_infinite_scroll.jsx'
|
|
44
42
|
export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_custom_header.jsx'
|
|
@@ -36,10 +36,10 @@ const DatePickerDialogSubmission = () => {
|
|
|
36
36
|
<Dialog.Body>
|
|
37
37
|
<DatePicker
|
|
38
38
|
defaultDate={dateFixed || undefined}
|
|
39
|
-
key={
|
|
39
|
+
key={`fixed-${pickerInstance}`}
|
|
40
40
|
label="Date"
|
|
41
41
|
onChange={(dateStr) => setDateFixed(dateStr || "")}
|
|
42
|
-
pickerId={
|
|
42
|
+
pickerId={`datePickerFixed-${pickerInstance}`}
|
|
43
43
|
staticPosition={false}
|
|
44
44
|
/>
|
|
45
45
|
</Dialog.Body>
|
|
@@ -5,5 +5,3 @@ Use the `draggable` kit and manage state as shown.
|
|
|
5
5
|
`draggable/draggable_container` kit creates the container within which the cards can be dragged and dropped.
|
|
6
6
|
|
|
7
7
|
The Card kit is optimized to work with the draggable kit. To enable drag, use the `draggable_item` and `drag_id` props on the Card kit as shown. An additional optional boolean prop (set to true by default) of `drag_handle` is also available to show the drag handle icon.
|
|
8
|
-
|
|
9
|
-
On touch devices, drag from the grip handle (no long press). Swiping the card body scrolls as usual. Keep `drag_handle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
@@ -6,5 +6,4 @@ Use `DraggableProvider` and manage state as shown.
|
|
|
6
6
|
|
|
7
7
|
The Card kit is optimized to work with the draggable kit. To enable drag, use the `draggableItem` and `dragId` props on the Card kit as shown. An additional optional boolean prop (set to true by default) of `dragHandle` is also available to show the drag handle icon.
|
|
8
8
|
|
|
9
|
-
On touch devices, drag from the grip handle (no long press). Swiping the card body scrolls as usual. Keep `dragHandle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
10
9
|
|
|
@@ -3,5 +3,3 @@ For a simplified version of the Draggable API for the List kit, you can do the f
|
|
|
3
3
|
The List kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on List kit with an array of the included items AND `drag_id` prop on ListItems. You will also need to include the `items` prop containing your array of listed items for the Draggable API.
|
|
4
4
|
|
|
5
5
|
An additional optional boolean prop (set to true by default) of `drag_handle` is also available on ListItem kit to show the drag handle icon.
|
|
6
|
-
|
|
7
|
-
On touch devices, drag from the grip handle (no long press). Swiping the rest of the row scrolls as usual. Keep `drag_handle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
@@ -2,6 +2,4 @@ For a simplified version of the Draggable API for the List kit, you can do the f
|
|
|
2
2
|
|
|
3
3
|
Use `DraggableProvider` and manage state as shown.
|
|
4
4
|
|
|
5
|
-
The List kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on List kit AND `dragId` prop on ListItem. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on
|
|
6
|
-
|
|
7
|
-
On touch devices, drag from the grip handle (no long press). Swiping the rest of the row scrolls as usual. Keep `dragHandle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
5
|
+
The List kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on List kit AND `dragId` prop on ListItem. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on List kit to show the drag handle icon.
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
For a simplified version of the Draggable API for the SelectableList kit, you can do the following:
|
|
2
2
|
|
|
3
|
-
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on SelectableList kit AND `drag_id` prop within the SelectableList kit prop. An additional optional boolean prop (set to true by default) of `drag_handle` is also available on SelectableList kit to show the drag handle icon.
|
|
4
|
-
|
|
5
|
-
On touch devices, drag from the grip handle (no long press). Swiping the rest of the row scrolls as usual. Keep `drag_handle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
3
|
+
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on SelectableList kit AND `drag_id` prop within the SelectableList kit prop. An additional optional boolean prop (set to true by default) of `drag_handle` is also available on SelectableList kit to show the drag handle icon.
|
|
@@ -2,6 +2,4 @@ For a simplified version of the Draggable API for the SelectableList kit, you ca
|
|
|
2
2
|
|
|
3
3
|
Use `DraggableProvider` and manage state as shown.
|
|
4
4
|
|
|
5
|
-
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on SelectableList kit AND `dragId` prop on SelectableList.Item. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on SelectableList kit to show the drag handle icon.
|
|
6
|
-
|
|
7
|
-
On touch devices, drag from the grip handle (no long press). Swiping the rest of the row scrolls as usual. Keep `dragHandle` enabled on mobile. Desktop mouse drag is unchanged.
|
|
5
|
+
The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enableDrag` prop on SelectableList kit AND `dragId` prop on SelectableList.Item. An additional optional boolean prop (set to true by default) of `dragHandle` is also available on SelectableList kit to show the drag handle icon.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<%
|
|
2
|
+
example_collection = [
|
|
3
|
+
OpenStruct.new(name: "Alabama", value: 1),
|
|
4
|
+
OpenStruct.new(name: "Alaska", value: 2),
|
|
5
|
+
OpenStruct.new(name: "Arizona", value: 3),
|
|
6
|
+
OpenStruct.new(name: "Arkansas", value: 4),
|
|
7
|
+
OpenStruct.new(name: "California", value: 5),
|
|
8
|
+
OpenStruct.new(name: "Colorado", value: 6),
|
|
9
|
+
OpenStruct.new(name: "Connecticut", value: 7),
|
|
10
|
+
OpenStruct.new(name: "Delaware", value: 8),
|
|
11
|
+
OpenStruct.new(name: "Florida", value: 9),
|
|
12
|
+
OpenStruct.new(name: "Georgia", value: 10),
|
|
13
|
+
]
|
|
14
|
+
%>
|
|
15
|
+
|
|
16
|
+
<%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
|
|
17
|
+
<%= form.select :example_select, [ ["Yes", 1], ["No", 2], ["Maybe", 3] ], props: { label: "Select Default" } %>
|
|
18
|
+
<%= form.select :example_select_2, [ ["Yes", 1], ["No", 2], ["Maybe", 3] ], props: { label: "Select with Blank Selection", blank_selection: "Blank selection..." } %>
|
|
19
|
+
<%= form.select :example_select_3, [ ["Yes", 1], ["No", 2], ["Maybe", 3] ], { include_blank: "Include blank..." }, {}, props: { label: "Select with Include Blank" } %>
|
|
20
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: "Collection Select Default" } %>
|
|
21
|
+
<%= form.collection_select :example_collection_select_2, example_collection, :value, :name, props: { label: "Collection Select with Blank Selection", blank_selection: "Blank selection..." } %>
|
|
22
|
+
<%= form.collection_select :example_collection_select_3, example_collection, :value, :name, { include_blank: "Include blank..." }, {}, props: { label: "Collection Select with Include Blank" } %>
|
|
23
|
+
<%= form.time_zone_select_field :example_time_zone_select, ActiveSupport::TimeZone.us_zones, props: { label: "Time Zone Select Default" } %>
|
|
24
|
+
<%= form.time_zone_select_field :example_time_zone_select_2, ActiveSupport::TimeZone.us_zones, { default: "Eastern Time (US & Canada)" }, props: { label: "Time Zone Select with a Default Selection" } %>
|
|
25
|
+
<%= form.time_zone_select_field :example_time_zone_select_3, ActiveSupport::TimeZone.us_zones, props: { label: "Time Zone Select with Blank Selection", blank_selection: "Blank selection..." } %>
|
|
26
|
+
<%= form.time_zone_select_field :example_time_zone_select_4, ActiveSupport::TimeZone.us_zones, { include_blank: "Include blank..." }, {}, props: { label: "Time Zone Select with Include Blank" } %>
|
|
27
|
+
<%= form.actions do |action| %>
|
|
28
|
+
<%= action.submit %>
|
|
29
|
+
<%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
|
|
30
|
+
<% end %>
|
|
31
|
+
<% end %>
|
|
@@ -131,24 +131,23 @@
|
|
|
131
131
|
%>
|
|
132
132
|
|
|
133
133
|
<%= pb_form_with(scope: :example, url: "", method: :get, validate: true) do |form| %>
|
|
134
|
-
<%= form.typeahead :
|
|
135
|
-
<%= form.text_field :
|
|
136
|
-
<%= form.text_field :
|
|
137
|
-
<%= form.phone_number_field :
|
|
138
|
-
<%= form.email_field :
|
|
139
|
-
<%= form.number_field :
|
|
140
|
-
<%= form.search_field :
|
|
141
|
-
<%= form.password_field :
|
|
142
|
-
<%= form.url_field :
|
|
143
|
-
<%= form.text_area :
|
|
144
|
-
<%= form.text_area :
|
|
145
|
-
|
|
146
|
-
<%= form.
|
|
147
|
-
<%= form.select :example_select_required_indicator, [["Yes", 1], ["No", 2]], props: { label: true, required: true, required_indicator: true } %>
|
|
148
|
-
<%= form.select :example_select_required_indicator_custom, [["Yes", 1], ["No", 2]], props: { label: "Example Select Field", required: true, required_indicator: true } %>
|
|
149
|
-
<%# form.check_box :example_checkbox_required_indicator, props: { label: true, text: "Checkbox Label", required: true, required_indicator: true } %>
|
|
134
|
+
<%= form.typeahead :example_typeahead_field, props: { label: true, required: true, required_indicator: true } %>
|
|
135
|
+
<%= form.text_field :example_text_field, props: { label: true, required: true, required_indicator: true } %>
|
|
136
|
+
<%= form.text_field :example_text_field_2, props: { label: "Text Field Custom Label", required: true, required_indicator: true } %>
|
|
137
|
+
<%= form.phone_number_field :example_phone_number_field, props: { label: true, required: true, required_indicator: true } %>
|
|
138
|
+
<%= form.email_field :example_email_field, props: { label: true, required: true, required_indicator: true } %>
|
|
139
|
+
<%= form.number_field :example_number_field, props: { label: true, required: true, required_indicator: true } %>
|
|
140
|
+
<%= form.search_field :example_search_field, props: { label: true, required: true, required_indicator: true } %>
|
|
141
|
+
<%= form.password_field :example_password_field, props: { label: true, required: true, required_indicator: true } %>
|
|
142
|
+
<%= form.url_field :example_url_field, props: { label: true, required: true, required_indicator: true } %>
|
|
143
|
+
<%= form.text_area :example_text_area, props: { label: true, required: true, required_indicator: true } %>
|
|
144
|
+
<%= form.text_area :example_text_area_2, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
|
|
145
|
+
<%# form.check_box :example_checkbox, props: { label: true, text: "Checkbox Label", required: true, required_indicator: true } %>
|
|
146
|
+
<%= form.time_picker :example_time_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
150
147
|
<%= form.date_picker :example_date_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
151
|
-
<%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Date Picker
|
|
148
|
+
<%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Custom Date Picker Label", required: true, required_indicator: true } %>
|
|
149
|
+
<%= form.select :example_select_required_indicator, [["Yes", 1], ["No", 2]], props: { label: true, required: true, required_indicator: true } %>
|
|
150
|
+
<%= form.select :example_select_required_indicator_2, [["Yes", 1], ["No", 2]], props: { label: "Example Select Field", required: true, required_indicator: true } %>
|
|
152
151
|
<%= form.multi_level_select :example_multi_level_select_required_indicator, props: {
|
|
153
152
|
label: true,
|
|
154
153
|
margin_y: 'sm',
|
|
@@ -157,14 +156,14 @@
|
|
|
157
156
|
tree_data: tree_data
|
|
158
157
|
} %>
|
|
159
158
|
<%= form.multi_level_select :example_multi_level_select_required_indicator_custom, props: {
|
|
160
|
-
label: "Multi Level Select
|
|
159
|
+
label: "Custom Multi Level Select Label",
|
|
161
160
|
margin_y: 'sm',
|
|
162
161
|
required: true,
|
|
163
162
|
required_indicator: true,
|
|
164
163
|
tree_data: tree_data
|
|
165
164
|
} %>
|
|
166
|
-
<%= form.
|
|
167
|
-
<%= form.
|
|
165
|
+
<%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options, required: true, required_indicator: true } %>
|
|
166
|
+
<%= form.dropdown_field :example_dropdown_2, props: { label: "Dropdown Custom Label", options: example_dropdown_options, required: true, required_indicator: true } %>
|
|
168
167
|
|
|
169
168
|
<%= form.actions do |action| %>
|
|
170
169
|
<%= action.submit %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= pb_rails("icon", props: { icon: "powergon", font_style: "fak", fixed_width: true, size: "5x" }) %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import Icon from '../_icon'
|
|
4
|
+
|
|
5
|
+
import '../../../../../../playbook-website/app/javascript/scripts/custom-icons'
|
|
6
|
+
|
|
7
|
+
const IconFaKit = (props) => {
|
|
8
|
+
return (
|
|
9
|
+
<div>
|
|
10
|
+
<Icon
|
|
11
|
+
{...props}
|
|
12
|
+
fixedWidth
|
|
13
|
+
fontStyle="fak"
|
|
14
|
+
icon="powergon"
|
|
15
|
+
size="5x"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default IconFaKit
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Our Icon kit allows integration with [FontAwesome's custom kit](https://fontawesome.com/v6/docs/web/setup/use-kit#contentHeader) functionality out-of-the-box.
|
|
2
|
+
|
|
3
|
+
All you need to do is 3 things:
|
|
4
|
+
1) Import your custom-icon.js file as outlined in the FontAwesome docs.
|
|
5
|
+
2) Use our fontStyle prop called "fak" so that our Icon component knows you are using a "fa-kit" icon.
|
|
6
|
+
3) Pass in your FaKit name as a string to our icon prop (This is the name that you designated when you uploaded the icon on their site).
|
|
7
|
+
|
|
@@ -8,6 +8,7 @@ examples:
|
|
|
8
8
|
- icon_border: Icon Border
|
|
9
9
|
- icon_sizes: Icon Sizes
|
|
10
10
|
- icon_custom: Icon Custom
|
|
11
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
|
11
12
|
- icon_color: Icon Color
|
|
12
13
|
|
|
13
14
|
react:
|
|
@@ -19,6 +20,7 @@ examples:
|
|
|
19
20
|
- icon_border: Icon Border
|
|
20
21
|
- icon_sizes: Icon Sizes
|
|
21
22
|
- icon_custom: Icon Custom
|
|
23
|
+
- icon_fa_kit: Icon with FontAwesome Kit
|
|
22
24
|
- icon_color: Icon Color
|
|
23
25
|
|
|
24
26
|
swift:
|
|
@@ -6,4 +6,5 @@ export { default as IconPull } from './_icon_pull.jsx'
|
|
|
6
6
|
export { default as IconBorder } from './_icon_border.jsx'
|
|
7
7
|
export { default as IconSizes } from './_icon_sizes.jsx'
|
|
8
8
|
export { default as IconCustom } from './_icon_custom.jsx'
|
|
9
|
+
export { default as IconFaKit} from './_icon_fa_kit.jsx'
|
|
9
10
|
export { default as IconColor } from './_icon_color.jsx'
|
|
@@ -11,7 +11,6 @@ examples:
|
|
|
11
11
|
- pb_circle_chart_with_title: With Title
|
|
12
12
|
- pb_circle_chart_inner_sizes: Inner Circle Size Options
|
|
13
13
|
- pb_circle_chart_custom_tooltip: Tooltip Customization
|
|
14
|
-
- pb_circle_chart_centered_data: Centered Data
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
react:
|
|
@@ -26,6 +25,5 @@ examples:
|
|
|
26
25
|
- pb_circle_chart_with_title: With Title
|
|
27
26
|
- pb_circle_chart_inner_sizes: Inner Circle Size Options
|
|
28
27
|
- pb_circle_chart_custom_tooltip: Tooltip Customization
|
|
29
|
-
- pb_circle_chart_centered_data: Centered Data
|
|
30
28
|
|
|
31
29
|
|
|
@@ -8,5 +8,4 @@ export { default as PbCircleChartDataWithLegend } from './_pb_circle_chart_data_
|
|
|
8
8
|
export { default as PbCircleChartDataLegendPosition } from './_pb_circle_chart_data_legend_position.jsx'
|
|
9
9
|
export { default as PbCircleChartWithTitle } from './_pb_circle_chart_with_title.jsx'
|
|
10
10
|
export { default as PbCircleChartInnerSizes } from './_pb_circle_chart_inner_sizes.jsx'
|
|
11
|
-
export { default as PbCircleChartCustomTooltip } from './_pb_circle_chart_custom_tooltip.jsx'
|
|
12
|
-
export { default as PbCircleChartCenteredData } from './_pb_circle_chart_centered_data.jsx'
|
|
11
|
+
export { default as PbCircleChartCustomTooltip } from './_pb_circle_chart_custom_tooltip.jsx'
|