playbook_ui_docs 16.11.0.pre.alpha.PLAY308717843 → 16.11.0.pre.alpha.doublealpha17836

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.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +8 -5
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +0 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +3 -6
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.md +6 -6
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell.jsx +69 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell.md +3 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell_rails.html.erb +49 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell_rails.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers.html.erb +40 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers.jsx +55 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers_rails.md +1 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers_react.md +1 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +3 -1
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.overrides.json +1 -1
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -0
  18. metadata +10 -4
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.html.erb +0 -41
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.md +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16199fa35aee34255b80731ea475a79cf2f90da42bafda7149d371ef09416cda
4
- data.tar.gz: 8aa699eedd584c848e70b2923a84f77cdb42108a41df9c7c7417fb7e897b13a7
3
+ metadata.gz: dbe4162b2f38554a5b3e72cbc0bf1ecac8ff17c23b82355fbf0834da2b712c4e
4
+ data.tar.gz: 3cf832ce292d5d545328b424d10afbee0c9b7f2348b8d0e5d328c6c770aa8100
5
5
  SHA512:
6
- metadata.gz: 5e7b655a96cad1bc78d3d9e50399490c8d5fc85a6faba248d0ffe14209c4754a7ec87de163e09f103b0a211e303ca86abe937bf01b47a946dbd2978fd66a722d
7
- data.tar.gz: f72cd77a3beb55030c1710e728f3313e7cff7f4d3f2d7f412f26f9f6d5ef4786508eedd30e849e903f0d3d11cf8ac1b2bb6b88aa1b256965f8a71741dc2a1baf
6
+ metadata.gz: fb8408536fcba40c45124a74021b0749d24fa028f5ccefa378788fc2316837e50da727c0bb3a78d89187840de1db31eadd246a86b301566316f51db83ab27b0d
7
+ data.tar.gz: 9502b076480530cf88d8a038298f397ba76ca2fb0a059722e88a32b0c97e72414d61dc8f808ff948e1a5eede0974ce926780ccc5acd400a7b9862b6463e9e5eb
@@ -1,12 +1,15 @@
1
1
  The `columnStyling` prop is an optional item that can be used within `columnDefinitions` as shown in the code snippet below. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
- 1. `headerAlignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
4
- 2. `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
5
- 3. `fontColor`: This will allow you to control the font color for a given column.
6
- 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).
3
+ 1) `headerAlignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
4
+
5
+ 2) `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
6
+
7
+ 3) `fontColor`: This will allow you to control the font color for a given column.
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).
7
10
 
8
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.
9
12
 
10
- See [Column Styling: Width](https://playbook.powerapp.cloud/kits/advanced_table/styling/react#column-styling-width) for the full guide (Playbook ↔ TanStack mapping, floor-only vs bands, and when to use one vs three values).
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).
11
14
 
12
15
  `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.
@@ -3,7 +3,6 @@
3
3
  accessor: "year",
4
4
  label: "Year",
5
5
  cellAccessors: ["quarter", "month", "day"],
6
- column_styling: { width: 124 },
7
6
  },
8
7
  {
9
8
  accessor: "newEnrollments",
@@ -1,12 +1,9 @@
1
1
  The `column_styling` prop is an optional item that can be used within `column_definitions` as shown in the code snippet below. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
3
  1) `header_alignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
4
- 2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
5
- 3) `font_color`: This will allow you to control the font color for a given column.
6
- 4) Column width: optional keys on `column_styling` are `min_width`, `width`, and `max_width` (numbers = pixels; CSS strings allowed). This example sets `width` on Year for a fixed hierarchy column (see the width doc for `min_width` and bands).
7
4
 
8
- Fixed width: pass `width` only and Playbook sets min and max to the same value automatically you do not need all three for an exact width.
5
+ 2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
9
6
 
10
- See [Column Styling: Width](https://playbook.powerapp.cloud/kits/advanced_table/styling/rails#column-styling-width) for the full guide (floor-only vs bands, and when to use one vs three values).
7
+ 3) `font_color`: This will allow you to control the font color for a given column.
11
8
 
12
- `column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
9
+ `column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
@@ -1,6 +1,6 @@
1
1
  AdvancedTable column width is controlled in two equivalent places on each leaf `columnDefinitions` entry. Playbook maps them to inline styles on header and body cells (and forwards numeric values into TanStack Table’s column model).
2
2
 
3
- **1)** Playbook `columnStyling` and TanStack `ColumnDef` use the same three ideas:
3
+ 1) Playbook `columnStyling` and TanStack `ColumnDef` use the same three ideas:
4
4
 
5
5
  - Preferred / target width: `columnStyling` `width` maps to TanStack `size` on the same column object.
6
6
  - Minimum width (floor): `columnStyling` `minWidth` maps to TanStack `minSize`.
@@ -10,7 +10,7 @@ Numbers are pixels. You can also pass CSS length strings on `columnStyling` (e.g
10
10
 
11
11
  If both APIs set the same axis, `columnStyling` wins for that axis when Playbook builds cell styles.
12
12
 
13
- **2)** Fixed width: set `width` only
13
+ 2) Fixed width: set `width` only
14
14
 
15
15
  If you pass only `width` (or only `size`) and do not set `minWidth` / `maxWidth` (or `minSize` / `maxSize`), Playbook treats that as a fixed column: it sets all three to the same value under the hood so you do not have to repeat yourself.
16
16
 
@@ -26,7 +26,7 @@ size: 200
26
26
 
27
27
  Use this when the column should stay one width (e.g. a hierarchy column with expand controls).
28
28
 
29
- **3)** Floor only: `minWidth` / `minSize`
29
+ 3) Floor only: `minWidth` / `minSize`
30
30
 
31
31
  Set only a minimum when the column may grow with the table or content but must not shrink below a baseline (common fix for horizontal “jump” when rows expand):
32
32
 
@@ -34,7 +34,7 @@ Set only a minimum when the column may grow with the table or content but must n
34
34
  columnStyling: { minWidth: 160 }
35
35
  ```
36
36
 
37
- **4)** Flexible band: min + preferred + max
37
+ 4) Flexible band: min + preferred + max
38
38
 
39
39
  Set two or three values when you want a range. CSS uses preferred `width` clamped between `minWidth` and `maxWidth`:
40
40
 
@@ -46,7 +46,7 @@ Example from the table below (Attendance): `minWidth: 108`, `width: 124`, `maxWi
46
46
 
47
47
  You only need all three when you want that band. If min and max are omitted, `width` alone is enough for a fixed column.
48
48
 
49
- **5)** TanStack band without `columnStyling`
49
+ 5) TanStack band without `columnStyling`
50
50
 
51
51
  The Meetings column uses only TanStack fields:
52
52
 
@@ -56,7 +56,7 @@ The Meetings column uses only TanStack fields:
56
56
 
57
57
  Playbook applies the same min / preferred / max idea to cell styles. Setting only `size: 200` would lock all three to 200, same as `width: 200` in `columnStyling`.
58
58
 
59
- **6)** What the example table shows
59
+ 6) What the example table shows
60
60
 
61
61
  - Year (fixed): `columnStyling: { width: 128 }` — locked to 128px.
62
62
  - Enrollments (floor): `columnStyling: { minWidth: 160 }` — at least 160px; can grow.
@@ -0,0 +1,69 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import Flex from "../../pb_flex/_flex"
4
+ import Badge from "../../pb_badge/_badge"
5
+ import Title from "../../pb_title/_title"
6
+ import MOCK_DATA from "./advanced_table_mock_data.json"
7
+
8
+ const AdvancedTableFullWidthCell = (props) => {
9
+ const columnDefinitions = [
10
+ {
11
+ accessor: "year",
12
+ label: "Year",
13
+ cellAccessors: ["quarter", "month", "day"],
14
+ customRenderer: (row, value) => (
15
+ <Flex justify="between">
16
+ <Title size={4}
17
+ text={value}
18
+ />
19
+ <Badge dark
20
+ marginLeft="xxs"
21
+ text={row.original.newEnrollments > 20 ? "High" : "Low"}
22
+ variant="neutral"
23
+ />
24
+ </Flex>
25
+ ),
26
+ },
27
+ {
28
+ accessor: "newEnrollments",
29
+ label: "New Enrollments",
30
+ },
31
+ {
32
+ accessor: "scheduledMeetings",
33
+ label: "Scheduled Meetings",
34
+ },
35
+ {
36
+ accessor: "attendanceRate",
37
+ label: "Attendance Rate",
38
+ },
39
+ {
40
+ accessor: "completedClasses",
41
+ label: "Completed Classes",
42
+ },
43
+ {
44
+ accessor: "classCompletionRate",
45
+ label: "Class Completion Rate",
46
+ },
47
+ {
48
+ accessor: "graduatedStudents",
49
+ label: "Graduated Students",
50
+ },
51
+ ]
52
+
53
+ return (
54
+ <div>
55
+ <AdvancedTable
56
+ columnDefinitions={columnDefinitions}
57
+ enableToggleExpansion="all"
58
+ fullWidthCell
59
+ tableData={MOCK_DATA}
60
+ {...props}
61
+ >
62
+ <AdvancedTable.Header enableSorting />
63
+ <AdvancedTable.Body />
64
+ </AdvancedTable>
65
+ </div>
66
+ )
67
+ }
68
+
69
+ export default AdvancedTableFullWidthCell
@@ -0,0 +1,3 @@
1
+ `fullWidthCell` is an optional boolean prop that defaults to `false`. When set to `true`, the first column's cell content takes up the full available width of the cell.
2
+
3
+ This is especially useful with custom cell renderers that need horizontal space — for example, a `Flex` with `justify="between"` that places content on both the left and right edges of the cell.
@@ -0,0 +1,49 @@
1
+ <%
2
+ column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ cellAccessors: ["quarter", "month", "day"],
7
+ custom_renderer: ->(row, value) {
8
+ capture do
9
+ pb_rails("flex", props: { justify: "between" }) do
10
+ pb_rails("title", props: { text: value, size: 4 }) +
11
+ pb_rails("badge", props: { dark: true, margin_left: "xxs", text: row[:newEnrollments].to_i > 20 ? "High" : "Low", variant: "neutral" })
12
+ end
13
+ end
14
+ }
15
+ },
16
+ {
17
+ accessor: "newEnrollments",
18
+ label: "New Enrollments",
19
+ },
20
+ {
21
+ accessor: "scheduledMeetings",
22
+ label: "Scheduled Meetings",
23
+ },
24
+ {
25
+ accessor: "attendanceRate",
26
+ label: "Attendance Rate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ },
32
+ {
33
+ accessor: "classCompletionRate",
34
+ label: "Class Completion Rate",
35
+ },
36
+ {
37
+ accessor: "graduatedStudents",
38
+ label: "Graduated Students",
39
+ }
40
+ ]
41
+ %>
42
+
43
+ <%= pb_rails("advanced_table", props: {
44
+ id: "full_width_cell",
45
+ table_data: @table_data,
46
+ column_definitions: column_definitions,
47
+ enable_toggle_expansion: "all",
48
+ full_width_cell: true
49
+ }) %>
@@ -0,0 +1,3 @@
1
+ `full_width_cell` is an optional boolean prop that defaults to `false`. When set to `true`, the first column's cell content takes up the full available width of the cell.
2
+
3
+ This is especially useful with custom cell renderers that need horizontal space — for example, a `Flex` with `justify: "between"` that places content on both the left and right edges of the cell.
@@ -0,0 +1,40 @@
1
+ <%
2
+ column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ cellAccessors: ["quarter", "month", "day"],
7
+ },
8
+ {
9
+ accessor: "newEnrollments",
10
+ label: "New Enrollments",
11
+ },
12
+ {
13
+ accessor: "scheduledMeetings",
14
+ label: "Scheduled Meetings",
15
+ },
16
+ {
17
+ accessor: "attendanceRate",
18
+ label: "Attendance Rate",
19
+ },
20
+ {
21
+ accessor: "completedClasses",
22
+ label: "Completed Classes",
23
+ },
24
+ {
25
+ accessor: "classCompletionRate",
26
+ label: "Class Completion Rate",
27
+ },
28
+ {
29
+ accessor: "graduatedStudents",
30
+ label: "Graduated Students",
31
+ }
32
+ ]
33
+
34
+ subrow_headers = ["Quarter", "", "Day"]
35
+ %>
36
+
37
+ <%= pb_rails("advanced_table", props: { id: "skipping-subrow-headers", table_data: @table_data, column_definitions: column_definitions }) do %>
38
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "skipping-subrow-headers", column_definitions: column_definitions }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "skipping-subrow-headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
40
+ <% end %>
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+
6
+ const AdvancedTableSkippingSubrowHeaders = (props) => {
7
+ const columnDefinitions = [
8
+ {
9
+ accessor: "year",
10
+ label: "Year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ },
17
+ {
18
+ accessor: "scheduledMeetings",
19
+ label: "Scheduled Meetings",
20
+ },
21
+ {
22
+ accessor: "attendanceRate",
23
+ label: "Attendance Rate",
24
+ },
25
+ {
26
+ accessor: "completedClasses",
27
+ label: "Completed Classes",
28
+ },
29
+ {
30
+ accessor: "classCompletionRate",
31
+ label: "Class Completion Rate",
32
+ },
33
+ {
34
+ accessor: "graduatedStudents",
35
+ label: "Graduated Students",
36
+ },
37
+ ]
38
+
39
+ const subRowHeaders = ["Quarter", "", "Day"]
40
+
41
+
42
+ return (
43
+ <div>
44
+ <AdvancedTable
45
+ columnDefinitions={columnDefinitions}
46
+ tableData={MOCK_DATA}
47
+ {...props}
48
+ >
49
+ <AdvancedTable.Header />
50
+ <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
51
+ </AdvancedTable>
52
+ </div>
53
+ );
54
+ };
55
+ export default AdvancedTableSkippingSubrowHeaders;
@@ -0,0 +1 @@
1
+ Pass an empty string at any index in `sub_row_headers` to skip the rendering of a subrow header while still nesting the data under it.
@@ -0,0 +1 @@
1
+ Pass an empty string at any index in `subRowHeaders` to skip the rendering of a subrow header while still nesting the data under it.
@@ -9,6 +9,7 @@
9
9
  "defaults": {
10
10
  "columnGroupBorderColor": "none",
11
11
  "enableToggleExpansion": "header",
12
+ "fullWidthCell": false,
12
13
  "inlineRowLoading": false,
13
14
  "loading": false,
14
15
  "responsive": "scroll",
@@ -92,7 +93,8 @@
92
93
  "name": "Column Configuration",
93
94
  "props": [
94
95
  "columnVisibilityControl",
95
- "columnGroupBorderColor"
96
+ "columnGroupBorderColor",
97
+ "fullWidthCell"
96
98
  ]
97
99
  },
98
100
  {
@@ -160,7 +160,7 @@
160
160
  },
161
161
  {
162
162
  "name": "Column Configuration",
163
- "props": ["columnVisibilityControl", "columnGroupBorderColor"]
163
+ "props": ["columnVisibilityControl", "columnGroupBorderColor", "fullWidthCell"]
164
164
  },
165
165
  {
166
166
  "name": "Table engine",
@@ -3,6 +3,7 @@ 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_skipping_subrow_headers: Skipping Subrow Headers
6
7
  - advanced_table_enable_toggle_expansion_rails: Enable Toggle Expansion
7
8
  - advanced_table_collapsible_trail_rails: Collapsible Trail
8
9
  - advanced_table_table_props: Table Props
@@ -12,6 +13,7 @@ examples:
12
13
  - advanced_table_beta_sort: Enable Sorting
13
14
  - advanced_table_responsive: Responsive Tables
14
15
  - advanced_table_custom_cell_rails: Custom Components for Cells
16
+ - advanced_table_full_width_cell_rails: Full Width Cell
15
17
  - advanced_table_with_custom_header_rails: Custom Header Cell
16
18
  - advanced_table_with_custom_header_multi_header_rails: Custom Header with Multiple Headers
17
19
  - advanced_table_column_headers: Multi-Header Columns
@@ -26,7 +28,6 @@ examples:
26
28
  - advanced_table_row_styling: Row Styling
27
29
  - advanced_table_padding_control_per_row_rails: Padding Control using Row Styling
28
30
  - advanced_table_column_styling_rails: Column Styling
29
- - advanced_table_column_styling_width_rails: Column Styling Width
30
31
  - advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
31
32
  - advanced_table_padding_control_rails: Padding Control using Column Styling
32
33
  - advanced_table_background_control_rails: Column Styling Background Color
@@ -46,6 +47,7 @@ examples:
46
47
  - advanced_table_expanded_control: Expanded Control
47
48
  - advanced_table_expand_by_depth: Expand by Depth
48
49
  - advanced_table_subrow_headers: SubRow Headers
50
+ - advanced_table_skipping_subrow_headers: Skipping Subrow Headers
49
51
  - advanced_table_cascade_collapse: Cascade Collapse
50
52
  - advanced_table_collapsible_trail: Collapsible Trail
51
53
  - advanced_table_table_options: Table Options
@@ -57,6 +59,7 @@ examples:
57
59
  - advanced_table_sticky_scroll_limitation: Sticky Header and Column Scroll Limitation
58
60
  - advanced_table_responsive: Responsive Tables
59
61
  - advanced_table_custom_cell: Custom Components for Cells
62
+ - advanced_table_full_width_cell: Full Width Cell
60
63
  - advanced_table_with_custom_header: Custom Header Cell
61
64
  - advanced_table_with_custom_header_multi_header: Custom Header with Multiple Headers
62
65
  - advanced_table_pagination: Pagination
@@ -10,6 +10,7 @@ export { default as AdvancedTableTableProps } from './_advanced_table_table_prop
10
10
  export { default as AdvancedTableInlineRowLoading } from './_advanced_table_inline_row_loading.jsx'
11
11
  export { default as AdvancedTableResponsive } from './_advanced_table_responsive.jsx'
12
12
  export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cell.jsx'
13
+ export { default as AdvancedTableFullWidthCell } from './_advanced_table_full_width_cell.jsx'
13
14
  export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
14
15
  export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
15
16
  export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
@@ -53,5 +54,6 @@ export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advance
53
54
  export { default as AdvancedTableColumnStylingBackgroundCustom } from './_advanced_table_column_styling_background_custom.jsx'
54
55
  export { default as AdvancedTableCascadeCollapse } from './_advanced_table_cascade_collapse.jsx'
55
56
  export { default as AdvancedTableSortParentOnly } from './_advanced_table_sort_parent_only.jsx'
57
+ export { default as AdvancedTableSkippingSubrowHeaders } from './_advanced_table_skipping_subrow_headers.jsx'
56
58
  export { default as AdvancedTablePinnedRowsBottom } from './_advanced_table_pinned_rows_bottom.jsx'
57
59
  export { default as AdvancedTablePinnedRowsBoth } from './_advanced_table_pinned_rows_both.jsx'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.11.0.pre.alpha.PLAY308717843
4
+ version: 16.11.0.pre.alpha.doublealpha17836
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-07-21 00:00:00.000000000 Z
12
+ date: 2026-07-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -78,8 +78,6 @@ files:
78
78
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md
79
79
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.jsx
80
80
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.md
81
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.html.erb
82
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.md
83
81
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx
84
82
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md
85
83
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx
@@ -102,6 +100,10 @@ files:
102
100
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md
103
101
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
104
102
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.md
103
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell.jsx
104
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell.md
105
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell_rails.html.erb
106
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_full_width_cell_rails.md
105
107
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_grouped_headers_composition.jsx
106
108
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_grouped_headers_composition.md
107
109
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx
@@ -163,6 +165,10 @@ files:
163
165
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_react.md
164
166
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb
165
167
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md
168
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers.html.erb
169
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers.jsx
170
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers_rails.md
171
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_skipping_subrow_headers_react.md
166
172
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
167
173
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md
168
174
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx
@@ -1,41 +0,0 @@
1
- <% column_definitions = [
2
- {
3
- accessor: "year",
4
- label: "Year (fixed)",
5
- cellAccessors: ["quarter", "month", "day"],
6
- # width alone locks min + max to the same value (128px).
7
- column_styling: { width: 128 },
8
- },
9
- {
10
- accessor: "newEnrollments",
11
- label: "Enrollments (floor)",
12
- column_styling: { min_width: 160 },
13
- },
14
- {
15
- accessor: "scheduledMeetings",
16
- label: "Meetings (preferred)",
17
- column_styling: { width: 200, min_width: 160, max_width: 240 },
18
- },
19
- {
20
- accessor: "attendanceRate",
21
- label: "Attendance (min / pref / max)",
22
- column_styling: { min_width: 108, width: 124, max_width: 168 },
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Completion %",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated",
35
- },
36
- ] %>
37
-
38
- <%= pb_rails("advanced_table", props: { id: "column-styling-width", table_data: @table_data, column_definitions: column_definitions }) do %>
39
- <%= pb_rails("advanced_table/table_header", props: { table_id: "column-styling-width", column_definitions: column_definitions }) %>
40
- <%= pb_rails("advanced_table/table_body", props: { table_id: "column-styling-width", table_data: @table_data, column_definitions: column_definitions }) %>
41
- <% end %>
@@ -1,49 +0,0 @@
1
- AdvancedTable column width is controlled on each leaf `column_definitions` entry via `column_styling`. Playbook maps these keys to inline styles on header and body cells.
2
-
3
- **1)** `column_styling` width keys:
4
-
5
- - Preferred / target width: `width`
6
- - Minimum width (floor): `min_width`
7
- - Maximum width (ceiling): `max_width`
8
-
9
- Numbers are pixels. You can also pass CSS length strings (e.g. `"12rem"`, `"200px"`).
10
-
11
- **2)** Fixed width: set `width` only
12
-
13
- If you pass only `width` and do not set `min_width` / `max_width`, Playbook treats that as a fixed column: it sets all three to the same value under the hood so you do not have to repeat yourself.
14
-
15
- ```ruby
16
- column_styling: { width: 128 }
17
- # Applied as width, min-width, and max-width: 128px
18
- ```
19
-
20
- Use this when the column should stay one width (e.g. a hierarchy column with expand controls).
21
-
22
- **3)** Floor only: `min_width`
23
-
24
- Set only a minimum when the column may grow with the table or content but must not shrink below a baseline (common fix for horizontal “jump” when rows expand):
25
-
26
- ```ruby
27
- column_styling: { min_width: 160 }
28
- ```
29
-
30
- **4)** Flexible band: min + preferred + max
31
-
32
- Set two or three values when you want a range. CSS uses preferred `width` clamped between `min_width` and `max_width`:
33
-
34
- - `min_width`: won’t shrink below this.
35
- - `width`: preferred size when space allows.
36
- - `max_width`: won’t grow above this.
37
-
38
- Example from the table below (Attendance): `min_width: 108`, `width: 124`, `max_width: 168` → preferred 124px, allowed between 108 and 168.
39
-
40
- You only need all three when you want that band. If min and max are omitted, `width` alone is enough for a fixed column.
41
-
42
- **5)** What the example table shows
43
-
44
- - Year (fixed): `column_styling: { width: 128 }` — locked to 128px.
45
- - Enrollments (floor): `column_styling: { min_width: 160 }` — at least 160px; can grow.
46
- - Meetings (preferred): `width` / `min_width` / `max_width` — preferred 200px, between 160–240.
47
- - Attendance (min / pref / max): all three — preferred 124px, between 108–168.
48
-
49
- Grouped columns: put width options on leaf definitions (columns with an `accessor`), not on parent group headers.