playbook_ui_docs 16.11.0.pre.alpha.play3070timezoneformats17921 → 16.11.0.pre.alpha.testkey2
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.md +5 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +6 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width.md +6 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.html.erb +41 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.md +49 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_rails.html.erb +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_rails.html.erb +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.html.erb +5 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.md +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_card/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_currency/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/docs/_playground.json +3 -1
- data/app/pb_kits/playbook/pb_date_stacked/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_playground.json +2 -1
- data/app/pb_kits/playbook/pb_filter/docs/_playground.json +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_icon/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_layout/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_list/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_map/docs/_playground.json +7 -0
- data/app/pb_kits/playbook/pb_map/docs/_playground.overrides.json +5 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.json +9 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_playground.overrides.json +6 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.json +9 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_playground.overrides.json +6 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.json +9 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_playground.overrides.json +6 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.json +9 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_playground.overrides.json +6 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_size.html.erb +1 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_size.jsx +16 -0
- data/app/pb_kits/playbook/pb_pill/docs/_pill_size.md +1 -0
- data/app/pb_kits/playbook/pb_pill/docs/_playground.json +11 -0
- data/app/pb_kits/playbook/pb_pill/docs/_playground.overrides.json +11 -1
- data/app/pb_kits/playbook/pb_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.json +2 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +11 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +11 -0
- data/app/pb_kits/playbook/pb_section_separator/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.json +5 -4
- data/app/pb_kits/playbook/pb_time_picker/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +7 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.md +11 -1
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2393f306e459c8a41adf1a22b7be172445de8f4a5a7de539b45dc40c12bdd3a1
|
|
4
|
+
data.tar.gz: acc6d1c6b3d1e6e11b019578c4a30c9e19376e3fb1145573bfbe51e103380ca1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dc860e6b1e6f19c67bce60001774e98138af08c5f1b3e5b6b5e72242e1461aefe720bfb38428d3e02f1385498a3caad0152723ce74e12c7aa80be64a8f7c720
|
|
7
|
+
data.tar.gz: d28900ed5b7ead57516ff15e0eaa3906c94d9c9d0bc1216f2dbd7873edf9ea563f0603ebba56f7787fc1f90f347538a2d5fd1260e28b66fb3eeb0719849cdeb4
|
|
@@ -1,15 +1,12 @@
|
|
|
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
|
|
4
|
-
|
|
5
|
-
|
|
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).
|
|
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).
|
|
10
7
|
|
|
11
8
|
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
9
|
|
|
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).
|
|
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).
|
|
14
11
|
|
|
15
12
|
`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,9 +1,12 @@
|
|
|
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
|
-
|
|
5
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`.
|
|
6
|
-
|
|
7
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
|
+
|
|
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.
|
|
9
|
+
|
|
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).
|
|
8
11
|
|
|
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.
|
|
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.
|
|
@@ -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.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.html.erb
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
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 %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_width_rails.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
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.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_rails.html.erb
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<%# Example sort method for demonstration purposes %>
|
|
2
|
+
<% if params["sort"] %>
|
|
3
|
+
<% sort_param = params["sort"].gsub(/_(asc|desc)\z/, "") %>
|
|
4
|
+
<% sort_direction = params["sort"].end_with?("_asc") ? 1 : -1 %>
|
|
5
|
+
<% @table_data_with_id.sort! do |a, b|
|
|
6
|
+
value_a = a[sort_param] || a[sort_param.to_sym]
|
|
7
|
+
value_b = b[sort_param] || b[sort_param.to_sym]
|
|
8
|
+
|
|
9
|
+
value_a = value_a.to_i if value_a.is_a?(String) && value_a.match?(/^\d+$/)
|
|
10
|
+
value_b = value_b.to_i if value_b.is_a?(String) && value_b.match?(/^\d+$/)
|
|
11
|
+
|
|
12
|
+
sort_direction * (value_a <=> value_b)
|
|
13
|
+
end %>
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
16
|
+
<% column_definitions = [
|
|
17
|
+
{
|
|
18
|
+
accessor: "year",
|
|
19
|
+
label: "Year",
|
|
20
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
21
|
+
sort_menu: [
|
|
22
|
+
{ item: "Year", link: "?sort=year_asc#pinned_rows_both_table", active: params["sort"] == "year_asc", direction: "asc" },
|
|
23
|
+
{ item: "Year", link: "?sort=year_desc#pinned_rows_both_table", active: params["sort"] == "year_desc", direction: "desc" }
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
accessor: "newEnrollments",
|
|
28
|
+
label: "New Enrollments",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
accessor: "scheduledMeetings",
|
|
32
|
+
label: "Scheduled Meetings",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
accessor: "attendanceRate",
|
|
36
|
+
label: "Attendance Rate",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
accessor: "completedClasses",
|
|
40
|
+
label: "Completed Classes",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
accessor: "classCompletionRate",
|
|
44
|
+
label: "Class Completion Rate",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
accessor: "graduatedStudents",
|
|
48
|
+
label: "Graduated Students",
|
|
49
|
+
}
|
|
50
|
+
] %>
|
|
51
|
+
|
|
52
|
+
<% pinned_rows = { top: ["8"], bottom: ["1"] } %>
|
|
53
|
+
|
|
54
|
+
<%= pb_rails("advanced_table", props: { id: "pinned_rows_both_table", table_data: @table_data_with_id, column_definitions: column_definitions, max_height: "xs", pinned_rows: pinned_rows, responsive: "none", table_props: { sticky: true }}) do %>
|
|
55
|
+
<%= pb_rails("advanced_table/table_header", props: { table_id: "pinned_rows_both_table", column_definitions: column_definitions }) %>
|
|
56
|
+
<%= pb_rails("advanced_table/table_body", props: { table_id: "pinned_rows_both_table", table_data: @table_data_with_id, column_definitions: column_definitions, pinned_rows: pinned_rows }) %>
|
|
57
|
+
<% end %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This code snippet demonstrates `pinned_rows` taking a hash with an array of row ids to both the `top` and `bottom` keys.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_rails.html.erb
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<%# Example sort method for demonstration purposes %>
|
|
2
|
+
<% if params["sort"] %>
|
|
3
|
+
<% sort_param = params["sort"].gsub(/_(asc|desc)\z/, "") %>
|
|
4
|
+
<% sort_direction = params["sort"].end_with?("_asc") ? 1 : -1 %>
|
|
5
|
+
<% @table_data_with_id.sort! do |a, b|
|
|
6
|
+
value_a = a[sort_param] || a[sort_param.to_sym]
|
|
7
|
+
value_b = b[sort_param] || b[sort_param.to_sym]
|
|
8
|
+
|
|
9
|
+
value_a = value_a.to_i if value_a.is_a?(String) && value_a.match?(/^\d+$/)
|
|
10
|
+
value_b = value_b.to_i if value_b.is_a?(String) && value_b.match?(/^\d+$/)
|
|
11
|
+
|
|
12
|
+
sort_direction * (value_a <=> value_b)
|
|
13
|
+
end %>
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
16
|
+
<% column_definitions = [
|
|
17
|
+
{
|
|
18
|
+
accessor: "year",
|
|
19
|
+
label: "Year",
|
|
20
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
21
|
+
sort_menu: [
|
|
22
|
+
{ item: "Year", link: "?sort=year_asc#pinned_rows_bottom_table", active: params["sort"] == "year_asc", direction: "asc" },
|
|
23
|
+
{ item: "Year", link: "?sort=year_desc#pinned_rows_bottom_table", active: params["sort"] == "year_desc", direction: "desc" }
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
accessor: "newEnrollments",
|
|
28
|
+
label: "New Enrollments",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
accessor: "scheduledMeetings",
|
|
32
|
+
label: "Scheduled Meetings",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
accessor: "attendanceRate",
|
|
36
|
+
label: "Attendance Rate",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
accessor: "completedClasses",
|
|
40
|
+
label: "Completed Classes",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
accessor: "classCompletionRate",
|
|
44
|
+
label: "Class Completion Rate",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
accessor: "graduatedStudents",
|
|
48
|
+
label: "Graduated Students",
|
|
49
|
+
}
|
|
50
|
+
] %>
|
|
51
|
+
|
|
52
|
+
<% pinned_rows = { bottom: ["8"] } %>
|
|
53
|
+
|
|
54
|
+
<%= pb_rails("advanced_table", props: { id: "pinned_rows_bottom_table", table_data: @table_data_with_id, column_definitions: column_definitions, max_height: "xs", pinned_rows: pinned_rows, responsive: "none", table_props: { sticky: true }}) do %>
|
|
55
|
+
<%= pb_rails("advanced_table/table_header", props: { table_id: "pinned_rows_bottom_table", column_definitions: column_definitions }) %>
|
|
56
|
+
<%= pb_rails("advanced_table/table_body", props: { table_id: "pinned_rows_bottom_table", table_data: @table_data_with_id, column_definitions: column_definitions, pinned_rows: pinned_rows }) %>
|
|
57
|
+
<% end %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This code snippet demonstrates `pinned_rows` taking a hash with an array of row ids to the `bottom` key.
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
label: "Year",
|
|
20
20
|
cellAccessors: ["quarter", "month", "day"],
|
|
21
21
|
sort_menu: [
|
|
22
|
-
{ item: "Year", link: "?sort=year_asc#
|
|
23
|
-
{ item: "Year", link: "?sort=year_desc#
|
|
22
|
+
{ item: "Year", link: "?sort=year_asc#pinned_rows_top_table", active: params["sort"] == "year_asc", direction: "asc" },
|
|
23
|
+
{ item: "Year", link: "?sort=year_desc#pinned_rows_top_table", active: params["sort"] == "year_desc", direction: "desc" }
|
|
24
24
|
],
|
|
25
25
|
},
|
|
26
26
|
{
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
<% pinned_rows = { top: ["8"] } %>
|
|
53
53
|
|
|
54
|
-
<%= pb_rails("advanced_table", props: { id: "
|
|
55
|
-
<%= pb_rails("advanced_table/table_header", props: { table_id: "
|
|
56
|
-
<%= pb_rails("advanced_table/table_body", props: { table_id: "
|
|
54
|
+
<%= pb_rails("advanced_table", props: { id: "pinned_rows_top_table", table_data: @table_data_with_id, column_definitions: column_definitions, max_height: "xs", pinned_rows: pinned_rows, responsive: "none", table_props: { sticky: true }}) do %>
|
|
55
|
+
<%= pb_rails("advanced_table/table_header", props: { table_id: "pinned_rows_top_table", column_definitions: column_definitions }) %>
|
|
56
|
+
<%= pb_rails("advanced_table/table_body", props: { table_id: "pinned_rows_top_table", table_data: @table_data_with_id, column_definitions: column_definitions, pinned_rows: pinned_rows }) %>
|
|
57
57
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Use the `pinned_rows` prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and will not change position if sorting is used.
|
|
1
|
+
Use the `pinned_rows` prop to pin specific rows to the top or bottom of an Advanced Table. Pinned rows will remain at the top or bottom when scrolling through table data and will not change position if sorting is used.
|
|
2
2
|
|
|
3
3
|
**NOTE:**
|
|
4
4
|
- Sticky header required: Pinned rows must be used with `sticky: true` via `table_props` (works with both responsive and non-responsive tables)
|
|
5
5
|
- Row ids required: Each object within the `table_data` array must contain a unique `id` in order to attach an id to all Rows for this to function.
|
|
6
|
-
- `pinned_rows` takes a hash with a `top` key containing an array of row ids, as shown in the code snippet below.
|
|
7
|
-
- For expandable rows, use the parent id in `pinned_rows[:top]`; all its children will automatically be pinned with it. If a child id is passed without the parent being pinned, nothing will be pinned.
|
|
6
|
+
- `pinned_rows` takes a hash with a `top` and/or `bottom` key containing an array of row ids, as shown in the code snippet below.
|
|
7
|
+
- For expandable rows, use the parent id in `pinned_rows[:top]` or `pinned_rows[:bottom]`; all its children will automatically be pinned with it. If a child id is passed without the parent being pinned, nothing will be pinned.
|
|
@@ -9,7 +9,9 @@ examples:
|
|
|
9
9
|
- advanced_table_table_props: Table Props
|
|
10
10
|
- advanced_table_sticky_header_rails: Sticky Header
|
|
11
11
|
- advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
|
|
12
|
-
- advanced_table_pinned_rows_rails: Pinned Rows
|
|
12
|
+
- advanced_table_pinned_rows_rails: Pinned Rows (Top)
|
|
13
|
+
- advanced_table_pinned_rows_bottom_rails: Pinned Rows (Bottom)
|
|
14
|
+
- advanced_table_pinned_rows_both_rails: Pinned Rows (Both)
|
|
13
15
|
- advanced_table_beta_sort: Enable Sorting
|
|
14
16
|
- advanced_table_responsive: Responsive Tables
|
|
15
17
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
|
@@ -28,6 +30,7 @@ examples:
|
|
|
28
30
|
- advanced_table_row_styling: Row Styling
|
|
29
31
|
- advanced_table_padding_control_per_row_rails: Padding Control using Row Styling
|
|
30
32
|
- advanced_table_column_styling_rails: Column Styling
|
|
33
|
+
- advanced_table_column_styling_width_rails: Column Styling Width
|
|
31
34
|
- advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
|
|
32
35
|
- advanced_table_padding_control_rails: Padding Control using Column Styling
|
|
33
36
|
- advanced_table_background_control_rails: Column Styling Background Color
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"propTargets": {},
|
|
4
4
|
"defaults": {
|
|
5
5
|
"background": true,
|
|
6
|
+
"minWidth": "360px",
|
|
6
7
|
"placement": "bottom-start",
|
|
7
8
|
"double": false,
|
|
8
9
|
"filters": {
|
|
@@ -10,7 +11,6 @@
|
|
|
10
11
|
"City": "San Francisco"
|
|
11
12
|
},
|
|
12
13
|
"isCollapsed": false,
|
|
13
|
-
"minWidth": "360px",
|
|
14
14
|
"onCollapse": "() => {}",
|
|
15
15
|
"onSortChange": "() => {}",
|
|
16
16
|
"popoverProps": {},
|
|
@@ -116,6 +116,13 @@
|
|
|
116
116
|
"type": "info"
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
+
"externalDependencies": {
|
|
120
|
+
"packages": [
|
|
121
|
+
"maplibre-gl"
|
|
122
|
+
],
|
|
123
|
+
"optional": true,
|
|
124
|
+
"note": "Map wraps MapLibre. The host app must already have maplibre-gl (and any required CSS) installed. Agents must not install packages — tell the user if they are missing."
|
|
125
|
+
},
|
|
119
126
|
"structureModes": {
|
|
120
127
|
"default": "maplibre",
|
|
121
128
|
"modes": {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": ["maplibre-gl"],
|
|
4
|
+
"optional": true,
|
|
5
|
+
"note": "Map wraps MapLibre. The host app must already have maplibre-gl (and any required CSS) installed. Agents must not install packages — tell the user if they are missing."
|
|
6
|
+
},
|
|
2
7
|
"structureModes": {
|
|
3
8
|
"default": "maplibre",
|
|
4
9
|
"modes": {
|
|
@@ -389,6 +389,15 @@
|
|
|
389
389
|
"type": "info"
|
|
390
390
|
}
|
|
391
391
|
},
|
|
392
|
+
"externalDependencies": {
|
|
393
|
+
"packages": [
|
|
394
|
+
"highcharts",
|
|
395
|
+
"highcharts-react-official"
|
|
396
|
+
],
|
|
397
|
+
"optional": true,
|
|
398
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
399
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
400
|
+
},
|
|
392
401
|
"externalImports": [
|
|
393
402
|
"import { PbBarGraph } from 'playbook-ui/charts'"
|
|
394
403
|
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": ["highcharts", "highcharts-react-official"],
|
|
4
|
+
"optional": true,
|
|
5
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
6
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
7
|
+
},
|
|
2
8
|
"template": "<PbBarGraph{{props}} />",
|
|
3
9
|
"externalImports": [
|
|
4
10
|
"import { PbBarGraph } from 'playbook-ui/charts'"
|
|
@@ -226,6 +226,15 @@
|
|
|
226
226
|
"type": "info"
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
|
+
"externalDependencies": {
|
|
230
|
+
"packages": [
|
|
231
|
+
"highcharts",
|
|
232
|
+
"highcharts-react-official"
|
|
233
|
+
],
|
|
234
|
+
"optional": true,
|
|
235
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
236
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
237
|
+
},
|
|
229
238
|
"externalImports": [
|
|
230
239
|
"import { PbCircleChart } from 'playbook-ui/charts'"
|
|
231
240
|
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": ["highcharts", "highcharts-react-official"],
|
|
4
|
+
"optional": true,
|
|
5
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
6
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
7
|
+
},
|
|
2
8
|
"template": "<PbCircleChart{{props}} />",
|
|
3
9
|
"externalImports": [
|
|
4
10
|
"import { PbCircleChart } from 'playbook-ui/charts'"
|
|
@@ -160,6 +160,15 @@
|
|
|
160
160
|
"type": "info"
|
|
161
161
|
}
|
|
162
162
|
},
|
|
163
|
+
"externalDependencies": {
|
|
164
|
+
"packages": [
|
|
165
|
+
"highcharts",
|
|
166
|
+
"highcharts-react-official"
|
|
167
|
+
],
|
|
168
|
+
"optional": true,
|
|
169
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
170
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
171
|
+
},
|
|
163
172
|
"externalImports": [
|
|
164
173
|
"import { PbGaugeChart } from 'playbook-ui/charts'"
|
|
165
174
|
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": ["highcharts", "highcharts-react-official"],
|
|
4
|
+
"optional": true,
|
|
5
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
6
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
7
|
+
},
|
|
2
8
|
"template": "<PbGaugeChart{{props}} />",
|
|
3
9
|
"externalImports": [
|
|
4
10
|
"import { PbGaugeChart } from 'playbook-ui/charts'"
|
|
@@ -403,6 +403,15 @@
|
|
|
403
403
|
"type": "info"
|
|
404
404
|
}
|
|
405
405
|
},
|
|
406
|
+
"externalDependencies": {
|
|
407
|
+
"packages": [
|
|
408
|
+
"highcharts",
|
|
409
|
+
"highcharts-react-official"
|
|
410
|
+
],
|
|
411
|
+
"optional": true,
|
|
412
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
413
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
414
|
+
},
|
|
406
415
|
"externalImports": [
|
|
407
416
|
"import { PbLineGraph } from 'playbook-ui/charts'"
|
|
408
417
|
]
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": ["highcharts", "highcharts-react-official"],
|
|
4
|
+
"optional": true,
|
|
5
|
+
"note": "This kit wraps Highcharts and does not ship it. The host app must already have these packages installed before using the kit. Agents must not install packages — tell the user if they are missing.",
|
|
6
|
+
"docs": "https://api.highcharts.com/highcharts/"
|
|
7
|
+
},
|
|
2
8
|
"template": "<PbLineGraph{{props}} />",
|
|
3
9
|
"externalImports": [
|
|
4
10
|
"import { PbLineGraph } from 'playbook-ui/charts'"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= pb_rails("pill", props: { size: "sm", text: "Small" }) %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Set pill size to small with `size: "sm"` / `size="sm"`.
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"name": "Appearance",
|
|
25
25
|
"props": [
|
|
26
26
|
"variant",
|
|
27
|
+
"size",
|
|
27
28
|
"textTransform"
|
|
28
29
|
]
|
|
29
30
|
}
|
|
@@ -47,6 +48,16 @@
|
|
|
47
48
|
},
|
|
48
49
|
"children": ""
|
|
49
50
|
},
|
|
51
|
+
{
|
|
52
|
+
"name": "Small",
|
|
53
|
+
"props": {
|
|
54
|
+
"text": "small",
|
|
55
|
+
"size": "sm",
|
|
56
|
+
"variant": "neutral",
|
|
57
|
+
"textTransform": "lowercase"
|
|
58
|
+
},
|
|
59
|
+
"children": ""
|
|
60
|
+
},
|
|
50
61
|
{
|
|
51
62
|
"name": "Preserve Casing",
|
|
52
63
|
"props": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"name": "Appearance",
|
|
14
|
-
"props": ["variant", "textTransform"]
|
|
14
|
+
"props": ["variant", "size", "textTransform"]
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"presets": [
|
|
@@ -33,6 +33,16 @@
|
|
|
33
33
|
},
|
|
34
34
|
"children": ""
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Small",
|
|
38
|
+
"props": {
|
|
39
|
+
"text": "small",
|
|
40
|
+
"size": "sm",
|
|
41
|
+
"variant": "neutral",
|
|
42
|
+
"textTransform": "lowercase"
|
|
43
|
+
},
|
|
44
|
+
"children": ""
|
|
45
|
+
},
|
|
36
46
|
{
|
|
37
47
|
"name": "Preserve Casing",
|
|
38
48
|
"props": {
|
|
@@ -3,6 +3,7 @@ examples:
|
|
|
3
3
|
rails:
|
|
4
4
|
- pill_default: Default
|
|
5
5
|
- pill_variants: Variants
|
|
6
|
+
- pill_size: Size
|
|
6
7
|
- pill_example: Example
|
|
7
8
|
|
|
8
9
|
|
|
@@ -10,6 +11,7 @@ examples:
|
|
|
10
11
|
react:
|
|
11
12
|
- pill_default: Default
|
|
12
13
|
- pill_variants: Variants
|
|
14
|
+
- pill_size: Size
|
|
13
15
|
- pill_example: Example
|
|
14
16
|
|
|
15
17
|
swift:
|
|
@@ -127,6 +127,17 @@
|
|
|
127
127
|
"type": "info"
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
+
"externalDependencies": {
|
|
131
|
+
"packages": [
|
|
132
|
+
"react-trix",
|
|
133
|
+
"trix",
|
|
134
|
+
"@tiptap/react",
|
|
135
|
+
"@tiptap/starter-kit",
|
|
136
|
+
"@tiptap/extension-link"
|
|
137
|
+
],
|
|
138
|
+
"optional": true,
|
|
139
|
+
"note": "Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."
|
|
140
|
+
},
|
|
130
141
|
"structureModes": {
|
|
131
142
|
"default": "advanced",
|
|
132
143
|
"modes": {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
+
"externalDependencies": {
|
|
3
|
+
"packages": [
|
|
4
|
+
"react-trix",
|
|
5
|
+
"trix",
|
|
6
|
+
"@tiptap/react",
|
|
7
|
+
"@tiptap/starter-kit",
|
|
8
|
+
"@tiptap/extension-link"
|
|
9
|
+
],
|
|
10
|
+
"optional": true,
|
|
11
|
+
"note": "Default React editor uses Trix (pass TrixEditor from react-trix). Advanced editor uses TipTap. The host app must already have the needed packages installed. Agents must not install packages — tell the user if they are missing. Rails advanced TipTap may load via the kit’s esm.sh script."
|
|
12
|
+
},
|
|
2
13
|
"structureModes": {
|
|
3
14
|
"default": "advanced",
|
|
4
15
|
"modes": {
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
"template": "<SkeletonLoading{{props}} />",
|
|
3
3
|
"propTargets": {},
|
|
4
4
|
"defaults": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"height": "16px",
|
|
6
|
+
"width": "100%",
|
|
7
7
|
"borderRadius": "sm",
|
|
8
8
|
"gap": "xxs",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"stack": 1,
|
|
10
|
+
"color": "default",
|
|
11
|
+
"dark": false
|
|
11
12
|
},
|
|
12
13
|
"groups": [
|
|
13
14
|
{
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<%= pb_rails("typeahead", props: { id: "typeahead-pills-example1", default_options: [options.first], options: options, label: "Products", name: :foo, pills: true }) %>
|
|
11
11
|
|
|
12
12
|
<%= pb_rails("button", props: {id: "clear-pills", text: "Clear All Options", variant: "secondary"}) %>
|
|
13
|
+
<%= pb_rails("button", props: {id: "set-pills", text: "Restore Default Options", variant: "secondary"}) %>
|
|
13
14
|
|
|
14
15
|
<!-- This section is an example of the available JavaScript event hooks -->
|
|
15
16
|
<%= javascript_tag defer: "defer" do %>
|
|
@@ -28,4 +29,10 @@
|
|
|
28
29
|
document.querySelector('#clear-pills').addEventListener('click', function() {
|
|
29
30
|
document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:clear'))
|
|
30
31
|
})
|
|
32
|
+
|
|
33
|
+
document.querySelector('#set-pills').addEventListener('click', function() {
|
|
34
|
+
document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:set', {
|
|
35
|
+
detail: [{ label: 'Windows', value: '#FFA500' }]
|
|
36
|
+
}))
|
|
37
|
+
})
|
|
31
38
|
<% end %>
|
|
@@ -8,6 +8,8 @@ You can also pass `default_options` which will populate the initial pill selecti
|
|
|
8
8
|
|
|
9
9
|
`default_options: [{ label: 'Windows', value: '#FFA500' }]`
|
|
10
10
|
|
|
11
|
+
When present, the kit root gets `data-default-value` (JSON of `{ label, value }` only) for restore-after-clear via `:set`. Extra option fields are omitted; if serialization fails, the attribute is left off so the kit still mounts.
|
|
12
|
+
|
|
11
13
|
#### Rails: Subscribing to JS Events
|
|
12
14
|
|
|
13
15
|
JavaScript events are triggered based on actions you take within the kit such as selection, removal and clearing.
|
|
@@ -21,4 +23,12 @@ This kit utilizes a default `id` prop named `react-select-input`. It is **highly
|
|
|
21
23
|
|
|
22
24
|
The same rule regarding the `id` prop applies to publishing JS events. The examples below will use the unique `id` prop named `typeahead-pills-example1`:
|
|
23
25
|
|
|
24
|
-
`pb-typeahead-kit-typeahead-pills-example1:clear` event to clear all options.
|
|
26
|
+
`pb-typeahead-kit-typeahead-pills-example1:clear` event to clear all options.
|
|
27
|
+
|
|
28
|
+
`pb-typeahead-kit-typeahead-pills-example1:set` event to set options without treating it as a user click (no `result-option-select`). Pass `detail` as `[{ label, value }, ...]` (or a single object for single-select):
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:set', {
|
|
32
|
+
detail: [{ label: 'Windows', value: '#FFA500' }]
|
|
33
|
+
}))
|
|
34
|
+
```
|
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.
|
|
4
|
+
version: 16.11.0.pre.alpha.testkey2
|
|
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-
|
|
12
|
+
date: 2026-07-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -78,6 +78,8 @@ 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
|
|
81
83
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx
|
|
82
84
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md
|
|
83
85
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx
|
|
@@ -134,8 +136,12 @@ files:
|
|
|
134
136
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
|
|
135
137
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx
|
|
136
138
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both.jsx
|
|
139
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_rails.html.erb
|
|
140
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_rails.md
|
|
137
141
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_both_react.md
|
|
138
142
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom.jsx
|
|
143
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_rails.html.erb
|
|
144
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_rails.md
|
|
139
145
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_bottom_react.md
|
|
140
146
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.html.erb
|
|
141
147
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.md
|
|
@@ -2072,6 +2078,9 @@ files:
|
|
|
2072
2078
|
- app/pb_kits/playbook/pb_pill/docs/_pill_example.jsx
|
|
2073
2079
|
- app/pb_kits/playbook/pb_pill/docs/_pill_example.md
|
|
2074
2080
|
- app/pb_kits/playbook/pb_pill/docs/_pill_props_swift.md
|
|
2081
|
+
- app/pb_kits/playbook/pb_pill/docs/_pill_size.html.erb
|
|
2082
|
+
- app/pb_kits/playbook/pb_pill/docs/_pill_size.jsx
|
|
2083
|
+
- app/pb_kits/playbook/pb_pill/docs/_pill_size.md
|
|
2075
2084
|
- app/pb_kits/playbook/pb_pill/docs/_pill_variants.html.erb
|
|
2076
2085
|
- app/pb_kits/playbook/pb_pill/docs/_pill_variants.jsx
|
|
2077
2086
|
- app/pb_kits/playbook/pb_pill/docs/_pill_variants_swift.md
|