playbook_ui_docs 14.13.0.pre.alpha.play1852reacthookformsupportradio6213 → 14.13.0.pre.alpha.play1884progresspill6064

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  7. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +19 -0
  8. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +26 -0
  9. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +10 -0
  10. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +17 -0
  11. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +19 -0
  12. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +16 -0
  13. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +35 -0
  14. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +42 -0
  15. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +13 -0
  16. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +15 -0
  17. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +4 -0
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -1
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -1
  20. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -2
  21. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +0 -1
  22. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +2 -2
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +1 -4
  24. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -2
  25. data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
  26. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -1
  27. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -1
  28. data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +0 -2
  29. data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +0 -1
  30. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -2
  31. data/app/pb_kits/playbook/pb_radio/docs/index.js +0 -1
  32. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
  33. data/app/pb_kits/playbook/pb_table/docs/example.yml +1 -4
  34. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -2
  35. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +0 -14
  36. data/dist/playbook-doc.js +1 -1
  37. metadata +14 -25
  38. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +0 -75
  39. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +0 -33
  40. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +0 -3
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
  43. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +0 -69
  44. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +0 -1
  45. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +0 -90
  46. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +0 -5
  47. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +0 -37
  48. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +0 -1
  49. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +0 -1
  50. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +0 -18
  51. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +0 -1
  52. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +0 -1
  53. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +0 -60
  54. data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.md +0 -1
  55. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +0 -51
  56. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +0 -2
  57. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +0 -96
  58. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +0 -101
  59. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +0 -1
  60. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click_react.md → _table_with_collapsible_with_custom_click.md} +0 -0
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: 14.13.0.pre.alpha.play1852reacthookformsupportradio6213
4
+ version: 14.13.0.pre.alpha.play1884progresspill6064
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: 2025-02-20 00:00:00.000000000 Z
12
+ date: 2025-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -46,7 +46,6 @@ files:
46
46
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb
47
47
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx
48
48
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md
49
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx
50
49
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb
51
50
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx
52
51
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md
@@ -92,9 +91,7 @@ files:
92
91
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx
93
92
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md
94
93
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
95
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
96
94
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
97
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
98
95
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
99
96
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
100
97
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
@@ -127,6 +124,17 @@ files:
127
124
  - app/pb_kits/playbook/pb_avatar/docs/_footer.md
128
125
  - app/pb_kits/playbook/pb_avatar/docs/example.yml
129
126
  - app/pb_kits/playbook/pb_avatar/docs/index.js
127
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb
128
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx
129
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb
130
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx
131
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx
132
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb
133
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb
134
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx
135
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb
136
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml
137
+ - app/pb_kits/playbook/pb_avatar_action_button/docs/index.js
130
138
  - app/pb_kits/playbook/pb_background/docs/_background_category.html.erb
131
139
  - app/pb_kits/playbook/pb_background/docs/_background_category.jsx
132
140
  - app/pb_kits/playbook/pb_background/docs/_background_category.md
@@ -189,8 +197,6 @@ files:
189
197
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md
190
198
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb
191
199
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx
192
- - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx
193
- - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md
194
200
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb
195
201
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx
196
202
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md
@@ -348,8 +354,6 @@ files:
348
354
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md
349
355
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb
350
356
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md
351
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx
352
- - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md
353
357
  - app/pb_kits/playbook/pb_checkbox/docs/_description.md
354
358
  - app/pb_kits/playbook/pb_checkbox/docs/example.yml
355
359
  - app/pb_kits/playbook/pb_checkbox/docs/index.js
@@ -712,8 +716,6 @@ files:
712
716
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
713
717
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb
714
718
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md
715
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx
716
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md
717
719
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
718
720
  - app/pb_kits/playbook/pb_draggable/docs/index.js
719
721
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx
@@ -1374,8 +1376,6 @@ files:
1374
1376
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.html.erb
1375
1377
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.jsx
1376
1378
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_toggle.md
1377
- - app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx
1378
- - app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md
1379
1379
  - app/pb_kits/playbook/pb_overlay/docs/example.yml
1380
1380
  - app/pb_kits/playbook/pb_overlay/docs/index.js
1381
1381
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
@@ -1488,10 +1488,6 @@ files:
1488
1488
  - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb
1489
1489
  - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx
1490
1490
  - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md
1491
- - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb
1492
- - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx
1493
- - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md
1494
- - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md
1495
1491
  - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_status.html.erb
1496
1492
  - app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_status.jsx
1497
1493
  - app/pb_kits/playbook/pb_progress_pills/docs/example.yml
@@ -1552,8 +1548,6 @@ files:
1552
1548
  - app/pb_kits/playbook/pb_radio/docs/_radio_orientation_swift.md
1553
1549
  - app/pb_kits/playbook/pb_radio/docs/_radio_padding_swift.md
1554
1550
  - app/pb_kits/playbook/pb_radio/docs/_radio_props_swift.md
1555
- - app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx
1556
- - app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.md
1557
1551
  - app/pb_kits/playbook/pb_radio/docs/_radio_spacing_swift.md
1558
1552
  - app/pb_kits/playbook/pb_radio/docs/_radio_subtitle_swift.md
1559
1553
  - app/pb_kits/playbook/pb_radio/docs/example.yml
@@ -1857,10 +1851,8 @@ files:
1857
1851
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx
1858
1852
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md
1859
1853
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_react.md
1860
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb
1861
1854
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx
1862
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md
1863
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_react.md
1855
+ - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md
1864
1856
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx
1865
1857
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md
1866
1858
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb
@@ -1873,9 +1865,6 @@ files:
1873
1865
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md
1874
1866
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb
1875
1867
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md
1876
- - app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb
1877
- - app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx
1878
- - app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md
1879
1868
  - app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.jsx
1880
1869
  - app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.md
1881
1870
  - app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb
@@ -1,75 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable, Pill } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnHeadersCustomCell = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- label: "Enrollment Data",
14
- columns: [
15
- {
16
- accessor: "newEnrollments",
17
- label: "New Enrollments",
18
- customRenderer: (row, value) => (
19
- <Pill text={value}
20
- variant="success"
21
- />
22
- ),
23
- },
24
- {
25
- accessor: "scheduledMeetings",
26
- label: "Scheduled Meetings",
27
- customRenderer: (row, value) => (
28
- <Pill text={value}
29
- variant="info"
30
- />
31
- ),
32
- },
33
- ],
34
- },
35
- {
36
- label: "Performance Data",
37
- columns: [
38
- {
39
- accessor: "attendanceRate",
40
- label: "Attendance Rate",
41
- },
42
- {
43
- accessor: "completedClasses",
44
- label: "Completed Classes",
45
- customRenderer: (row, value) => (
46
- <Pill text={value}
47
- variant="error"
48
- />
49
- ),
50
- },
51
- {
52
- accessor: "classCompletionRate",
53
- label: "Class Completion Rate",
54
- },
55
- {
56
- accessor: "graduatedStudents",
57
- label: "Graduated Students",
58
- },
59
- ],
60
- },
61
- ];
62
-
63
-
64
- return (
65
- <>
66
- <AdvancedTable
67
- columnDefinitions={columnDefinitions}
68
- tableData={MOCK_DATA}
69
- {...props}
70
- />
71
- </>
72
- )
73
- }
74
-
75
- export default AdvancedTableColumnHeadersCustomCell
@@ -1,33 +0,0 @@
1
- <% column_definitions = [
2
- {
3
- accessor: "year",
4
- label: "Year",
5
- cellAccessors: ["quarter", "month", "day"],
6
- },
7
- {
8
- accessor: "newEnrollments",
9
- label: "New Enrollments",
10
- },
11
- {
12
- accessor: "scheduledMeetings",
13
- label: "Scheduled Meetings",
14
- },
15
- {
16
- accessor: "attendanceRate",
17
- label: "Attendance Rate",
18
- },
19
- {
20
- accessor: "completedClasses",
21
- label: "Completed Classes",
22
- },
23
- {
24
- accessor: "classCompletionRate",
25
- label: "Class Completion Rate",
26
- },
27
- {
28
- accessor: "graduatedStudents",
29
- label: "Graduated Students",
30
- }
31
- ] %>
32
-
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>
@@ -1,3 +0,0 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. 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.
2
-
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
@@ -1,64 +0,0 @@
1
- import React from 'react'
2
- import Highcharts from "highcharts";
3
- import HighchartsReact from "highcharts-react-official";
4
-
5
- import "../BarGraphStyles.scss";
6
- // Your path might look more like this
7
- //import "playbook-ui/dist/pb_bar_graph/BarGraphStyles.scss";
8
-
9
- const columnChartData = [
10
- {
11
- name: "Installation",
12
- data: [1475, 200, 3000, 654, 656],
13
- },
14
- {
15
- name: "Manufacturing",
16
- data: [4434, 524, 2320, 440, 500],
17
- },
18
- {
19
- name: "Sales & Distribution",
20
- data: [3387, 743, 1344, 434, 440],
21
- },
22
- {
23
- name: "Project Development",
24
- data: [3227, 878, 999, 780, 1000],
25
- },
26
- {
27
- name: "Other",
28
- data: [1111, 677, 3245, 500, 200],
29
- },
30
- ];
31
-
32
- const columnOptions = {
33
- chart: {
34
- type: "column",
35
- },
36
- series: columnChartData,
37
- title: {
38
- text: "Solar Employment Growth by Sector, 2010-2016",
39
- },
40
- subtitle: {
41
- text: "Source: thesolarfoundation.com",
42
- },
43
- xAxis: {
44
- categories: ["Jan", "Feb", "Mar", "Apr", "May"],
45
- },
46
- yAxis: {
47
- min: 0,
48
- title: {
49
- text: "Number of Employees",
50
- },
51
- },
52
- legend: { enabled: false },
53
- credits: { enabled: false },
54
- };
55
-
56
- const BarGraphPbStyles = () => (
57
- <div>
58
- <HighchartsReact highcharts={Highcharts}
59
- options={columnOptions}
60
- />
61
- </div>
62
- )
63
-
64
- export default BarGraphPbStyles
@@ -1 +0,0 @@
1
- You don't need to use the bar graph kit to apply the styles to your Highcharts bar graph. Just import the BarGraphStyles.scss to your component and the styles will apply automatically.
@@ -1,69 +0,0 @@
1
- import React, { useState } from "react"
2
- import { useForm } from "react-hook-form"
3
- import { Button, Checkbox, Flex, Body } from "playbook-ui"
4
-
5
- const CheckboxReactHook = () => {
6
- const { register, handleSubmit } = useForm({
7
- defaultValues: {
8
- Small: false,
9
- Medium: false,
10
- Large: false,
11
- },
12
- })
13
-
14
- const [submittedData, setSubmittedData] = useState({
15
- Small: false,
16
- Medium: false,
17
- Large: false,
18
- })
19
-
20
- const onSubmit = (data) => {
21
- setSubmittedData(data)
22
- }
23
-
24
- return (
25
- <Flex orientation="row">
26
- <Flex align="start"
27
- orientation="column"
28
- paddingRight="lg"
29
- >
30
- <form onSubmit={handleSubmit(onSubmit)}>
31
- <Checkbox padding="xs"
32
- text="Small"
33
- {...register("Small")}
34
- />
35
- <br />
36
- <Checkbox padding="xs"
37
- text="Medium"
38
- {...register("Medium")}
39
- />
40
- <br />
41
- <Checkbox padding="xs"
42
- text="Large"
43
- {...register("Large")}
44
- />
45
- <br />
46
- <Button htmlType="submit"
47
- marginTop="sm"
48
- text="submit"
49
- />
50
- </form>
51
- </Flex>
52
- <Flex align="start"
53
- orientation="column"
54
- >
55
- <Body padding="xs"
56
- text={`Small: ${submittedData.Small ? "true" : "false"}`}
57
- />
58
- <Body padding="xs"
59
- text={`Medium: ${submittedData.Medium ? "true" : "false"}`}
60
- />
61
- <Body padding="xs"
62
- text={`Large: ${submittedData.Large ? "true" : "false"}`}
63
- />
64
- </Flex>
65
- </Flex>
66
- )
67
- }
68
-
69
- export default CheckboxReactHook
@@ -1 +0,0 @@
1
- You can pass react hook props to the checkbox kit.
@@ -1,90 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Flex, Table, Body, Avatar, DraggableProvider } from "playbook-ui";
3
-
4
- // Initial items to be dragged
5
- const data = [
6
- {
7
- id: "1",
8
- task: "Task 1",
9
- assignee_name: "Terry Miles",
10
- assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
11
- },
12
- {
13
- id: "2",
14
- task: "Task 2",
15
- assignee_name: "Sophia Miles",
16
- assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
17
- },
18
- {
19
- id: "3",
20
- task: "Task 3",
21
- assignee_name: "Alice Jones",
22
- assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
23
- },
24
- {
25
- id: "4",
26
- task: "Task 4",
27
- assignee_name: "Mike James",
28
- assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
29
- },
30
- {
31
- id: "5",
32
- task: "Task 5",
33
- assignee_name: "James Guy",
34
- assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
35
- }
36
- ];
37
-
38
- const DraggableWithTableReact = (props) => {
39
- const [initialState, setInitialState] = useState(data);
40
-
41
- return (
42
- <>
43
- <DraggableProvider initialItems={data}
44
- onReorder={(items) => setInitialState(items)}
45
- >
46
- <Table
47
- responsive="none"
48
- size="sm"
49
- {...props}
50
- >
51
- <Table.Head>
52
- <Table.Row>
53
- <Table.Header>{"id"}</Table.Header>
54
- <Table.Header>{"name"}</Table.Header>
55
- <Table.Header>{"task number"}</Table.Header>
56
- </Table.Row>
57
- </Table.Head>
58
- <Table.Body draggableContainer>
59
- {initialState.map(({ id, task, assignee_name, assignee_img }) => (
60
- <Table.Row
61
- dragId={id}
62
- draggableItem
63
- key={id}
64
- >
65
- <Table.Cell>{id}</Table.Cell>
66
- <Table.Cell>
67
- <Flex align="center">
68
- <Avatar
69
- imageUrl={assignee_img}
70
- size="xs"
71
- />
72
- <Body
73
- paddingLeft="xxs"
74
- text={assignee_name}
75
- {...props}
76
- />
77
- </Flex>
78
- </Table.Cell>
79
- <Table.Cell>{task}</Table.Cell>
80
- </Table.Row>
81
- ))}
82
- </Table.Body>
83
- </Table>
84
- </DraggableProvider>
85
- </>
86
-
87
- );
88
- };
89
-
90
- export default DraggableWithTableReact;
@@ -1,5 +0,0 @@
1
- The draggable kit can also be used in conjunction with the table kit to create draggable table rows. To do this:
2
-
3
- - Wrap the Table with the `DraggableProvider` and manage state as shown.
4
- - use the `draggableContainer` prop on the Table.Body to designate it as the Draggable Container
5
- - use the `draggableItem` prop on the Table.Row to designate it as the Draggable Item. Make sure to also pass id to the `dragId` prop here.
@@ -1,37 +0,0 @@
1
- import React, { forwardRef } from 'react'
2
- import {
3
- Overlay,
4
- Card,
5
- Flex,
6
- FlexItem,
7
- } from 'playbook-ui'
8
-
9
- const InlineCardsExample = forwardRef(function InlineCardsExample(ref) {
10
- return (
11
- <Flex
12
- columnGap="lg"
13
- orientation="row"
14
- ref={ref}
15
- >
16
- {Array.from({ length: 15 }, (_, index) => (
17
- <FlexItem key={index}>
18
- <Card>{"Card Content"}</Card>
19
- </FlexItem>
20
- ))}
21
- </Flex>
22
- )
23
- })
24
-
25
- const OverlayVerticalDynamicMultiDirectional = () => (
26
- <>
27
- <Overlay
28
- color="card_light"
29
- dynamic
30
- layout={{"x": "xl"}}
31
- >
32
- <InlineCardsExample />
33
- </Overlay>
34
- </>
35
- )
36
-
37
- export default OverlayVerticalDynamicMultiDirectional
@@ -1 +0,0 @@
1
- Pass the `dynamic` prop to make the overlay render while the scrollbar isn't at either end on the scrollbar. You must also add a `ref` to the child that's being passed through the Overlay.
@@ -1 +0,0 @@
1
- <%= pb_rails("progress_pills", props: { aria: { label: "2 out of 5 steps complete" }, steps: 5, active: 2, full_width_pill: true }) %>
@@ -1,18 +0,0 @@
1
- import React from 'react'
2
- import ProgressPills from '../_progress_pills'
3
-
4
- const ProgressPillsFullWidth = (props) => {
5
- return (
6
- <>
7
- <ProgressPills
8
- active={2}
9
- aria={{ label: '2 out of 5 steps complete' }}
10
- fullWidthPill
11
- steps={5}
12
- {...props}
13
- />
14
- </>
15
- )
16
- }
17
-
18
- export default ProgressPillsFullWidth
@@ -1 +0,0 @@
1
- Pass `full_width_pill: true` to the Progress Pill kit to get true 100% full width pills. The kit will take up the full width of the container that it is in.
@@ -1 +0,0 @@
1
- Pass `fullWidthPill` to the Progress Pill kit to get true 100% full width pills. The kit will take up the full width of the container that it is in.
@@ -1,60 +0,0 @@
1
- import React from "react"
2
- import { useForm } from "react-hook-form"
3
- import { Radio, Flex, Body } from "playbook-ui"
4
-
5
- const RadioReactHook = () => {
6
- const { register, watch } = useForm({
7
- defaultValues: {
8
- size: "Small",
9
- },
10
- })
11
-
12
- const selectedSize = watch("size", "Small")
13
-
14
- return (
15
- <Flex orientation="row">
16
- <Flex
17
- align="start"
18
- orientation="column"
19
- paddingRight="lg"
20
- >
21
- <Radio
22
- alignment="left"
23
- label="Small"
24
- marginBottom='sm'
25
- name="size"
26
- value="Small"
27
- {...register("size")}
28
- />
29
- <br />
30
- <Radio
31
- alignment="left"
32
- label="Medium"
33
- marginBottom='sm'
34
- name="size"
35
- value="Medium"
36
- {...register("size")}
37
- />
38
- <br />
39
- <Radio
40
- alignment="left"
41
- label="Large"
42
- marginBottom='sm'
43
- name="size"
44
- value="Large"
45
- {...register("size")}
46
- />
47
- </Flex>
48
- <Flex
49
- align="start"
50
- orientation="column"
51
- >
52
- <Body
53
- text={`Selected Size: ${selectedSize}`}
54
- />
55
- </Flex>
56
- </Flex>
57
- )
58
- }
59
-
60
- export default RadioReactHook
@@ -1 +0,0 @@
1
- You can pass react hook props to the radio kit.
@@ -1,51 +0,0 @@
1
- <% content = capture do %>
2
- <%= pb_rails("card", props: { border_none: true, border_radius: "none", padding: "md" }) do %>
3
- <%= pb_rails("body", props: { text: "Nested content inside a Table Row" }) %>
4
- <% end %>
5
- <% end %>
6
-
7
- <%= pb_rails("table", props: { size: "sm" }) do %>
8
- <%= pb_rails("table/table_head") do %>
9
- <%= pb_rails("table/table_row") do %>
10
- <%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
11
- <%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
12
- <%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
13
- <%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
14
- <%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
15
- <%= pb_rails("table/table_header", props: { text: ""}) %>
16
- <% end %>
17
- <% end %>
18
- <%= pb_rails("table/table_body") do %>
19
- <%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: true, toggle_cell_id: "cell-1", id: "5" }) do %>
20
- <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
21
- <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
22
- <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
23
- <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
24
- <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
25
- <%= pb_rails("table/table_cell", props: { text_align: "right", id: "cell-1", cursor: "pointer" }) do %>
26
- <%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
27
- <% end %>
28
- <% end %>
29
- <%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: true, toggle_cell_id: "cell-2", id: "6" }) do %>
30
- <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
31
- <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
32
- <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
33
- <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
34
- <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
35
- <%= pb_rails("table/table_cell", props: { text_align: "right", id: "cell-2", cursor: "pointer" }) do %>
36
- <%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
37
- <% end %>
38
- <% end %>
39
- <%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: true, toggle_cell_id: "cell-3", id: "7" }) do %>
40
- <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
41
- <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
42
- <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
43
- <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
44
- <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
45
- <%= pb_rails("table/table_cell", props: { text_align: "right", id: "cell-3", cursor: "pointer" }) do %>
46
- <%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
47
- <% end %>
48
- <% end %>
49
- <% end %>
50
- <% end %>
51
-