playbook_ui_docs 13.10.0.pre.alpha.PLAY1046multilevelsingleselectphase21365 → 13.10.0.pre.alpha.PLAY1051removinghighchartsdependency1465

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_button/docs/_button_circle_swift.md +28 -0
  3. data/app/pb_kits/playbook/pb_button/docs/_button_default_swift.md +23 -0
  4. data/app/pb_kits/playbook/pb_button/docs/_button_full_width_swift.md +9 -0
  5. data/app/pb_kits/playbook/pb_button/docs/_button_icon_options_swift.md +18 -0
  6. data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +11 -0
  7. data/app/pb_kits/playbook/pb_button/docs/_button_size_swift.md +20 -0
  8. data/app/pb_kits/playbook/pb_button/docs/example.yml +8 -0
  9. data/app/pb_kits/playbook/pb_card/docs/_card_background_swift.md +29 -0
  10. data/app/pb_kits/playbook/pb_card/docs/_card_border_none_swift.md +7 -0
  11. data/app/pb_kits/playbook/pb_card/docs/_card_border_radius_swift.md +33 -0
  12. data/app/pb_kits/playbook/pb_card/docs/_card_header_swift.md +33 -0
  13. data/app/pb_kits/playbook/pb_card/docs/_card_highlight_swift.md +17 -0
  14. data/app/pb_kits/playbook/pb_card/docs/_card_light_swift.md +7 -0
  15. data/app/pb_kits/playbook/pb_card/docs/_card_padding_swift.md +33 -0
  16. data/app/pb_kits/playbook/pb_card/docs/_card_props_swift.md +10 -0
  17. data/app/pb_kits/playbook/pb_card/docs/_card_selected_swift.md +0 -0
  18. data/app/pb_kits/playbook/pb_card/docs/_card_separator_swift.md +11 -0
  19. data/app/pb_kits/playbook/pb_card/docs/_card_shadow_swift.md +21 -0
  20. data/app/pb_kits/playbook/pb_card/docs/_card_styles_swift.md +17 -0
  21. data/app/pb_kits/playbook/pb_card/docs/_card_tag_swift.md +0 -0
  22. data/app/pb_kits/playbook/pb_card/docs/example.yml +12 -0
  23. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default_swift.md +10 -0
  24. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md +12 -0
  25. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md +12 -0
  26. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md +7 -0
  27. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +7 -0
  28. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_props.md +6 -0
  29. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_swift.md +16 -0
  30. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_defaul_swift.md +7 -0
  31. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_swift.md +11 -0
  32. data/app/pb_kits/playbook/pb_icon_circle/docs/example.yml +7 -0
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +1 -0
  34. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +45 -104
  35. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +43 -100
  36. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -2
  37. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -1
  38. data/app/pb_kits/playbook/pb_table/docs/_table_header.html.erb +47 -31
  39. data/app/pb_kits/playbook/pb_table/docs/_table_header.md +5 -0
  40. data/dist/playbook-doc.js +8 -8
  41. metadata +29 -4
  42. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +0 -139
  43. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +0 -151
@@ -1,127 +1,68 @@
1
- <% treeData = [
2
- {
3
- label: "HQ",
4
- value: "HQ",
5
- id: "hq",
6
- },
7
- {
8
- label: "Philadelphia",
9
- value: "Philadelphia",
10
- id: "phl",
1
+ <% treeData = [{
2
+ label: "Power Home Remodeling",
3
+ value: "Power Home Remodeling",
4
+ id: "200",
5
+ expanded: true,
11
6
  children: [
12
7
  {
13
- label: "Marketing & Sales PHL",
14
- value: "Marketing & Sales PHL",
15
- id: "marketingPHL",
16
- },
17
- {
18
- label: "Installation Office PHL",
19
- value: "Installation Office PHL",
20
- id: "installationPHL",
21
- },
22
- {
23
- label: "Warehouse PHL",
24
- value: "Warehouse PHL",
25
- id: "warehousePHL",
26
- },
27
- ]
28
- },
29
- {
30
- label: "New Jersey",
31
- value: "New Jersey",
32
- id: "nj",
33
- children: [
34
- {
35
- label: "New Jersey",
36
- value: "New Jersey",
37
- id: "nj1",
8
+ label: "People",
9
+ value: "People",
10
+ id: "201",
11
+ expanded: true,
38
12
  children: [
39
13
  {
40
- label: "Marketing & Sales NJ",
41
- value: "Marketing & Sales NJ",
42
- id: "marketingNJ",
14
+ label: "Talent Acquisition",
15
+ value: "Talent Acquisition",
16
+ id: "202",
43
17
  },
44
18
  {
45
- label: "Installation Office NJ",
46
- value: "Installation Office NJ",
47
- id: "installationNJ",
19
+ label: "Business Affairs",
20
+ value: "Business Affairs",
21
+ id: "203",
22
+ children: [
23
+ {
24
+ label: "Initiatives",
25
+ value: "Initiatives",
26
+ id: "204",
27
+ },
28
+ {
29
+ label: "Learning & Development",
30
+ value: "Learning & Development",
31
+ id: "205",
32
+ },
33
+ ],
48
34
  },
49
35
  {
50
- label: "Warehouse NJ",
51
- value: "Warehouse NJ",
52
- id: "warehouseNJ",
36
+ label: "People Experience",
37
+ value: "People Experience",
38
+ id: "206",
53
39
  },
54
40
  ],
55
41
  },
56
42
  {
57
- label: "Princeton",
58
- value: "Princeton",
59
- id: "princeton",
43
+ label: "Contact Center",
44
+ value: "Contact Center",
45
+ id: "207",
60
46
  children: [
61
47
  {
62
- label: "Marketing & Sales Princeton",
63
- value: "Marketing & Sales Princeton",
64
- id: "marketingPR",
48
+ label: "Appointment Management",
49
+ value: "Appointment Management",
50
+ id: "208",
65
51
  },
66
52
  {
67
- label: "Installation Office Princeton",
68
- value: "Installation Office Princeton",
69
- id: "installationPR",
53
+ label: "Customer Service",
54
+ value: "Customer Service",
55
+ id: "209",
70
56
  },
71
57
  {
72
- label: "Warehouse Princeton",
73
- value: "Warehouse Princeton",
74
- id: "warehousePR",
58
+ label: "Energy",
59
+ value: "Energy",
60
+ id: "210",
75
61
  },
76
- ]
77
- },
78
- ]
79
- },
80
- {
81
- label: "Maryland",
82
- value: "Maryland",
83
- id: "MD",
84
- children: [
85
- {
86
- label: "Marketing & Sales MD",
87
- value: "Marketing & Sales MD",
88
- id: "marketingMD",
89
- },
90
- {
91
- label: "Installation Office MD",
92
- value: "Installation Office MD",
93
- id: "installationMD",
94
- },
95
- {
96
- label: "Warehouse MD",
97
- value: "Warehouse MD",
98
- id: "warehouseMD",
99
- },
100
- ]
101
- },
102
- {
103
- label: "Connecticut",
104
- value: "Connecticut",
105
- id: "CT",
106
- children: [
107
- {
108
- label: "Marketing & Sales CT",
109
- value: "Marketing & Sales CT",
110
- id: "marketingCT",
111
- },
112
- {
113
- label: "Installation Office CT",
114
- value: "Installation Office CT",
115
- id: "installationCT",
116
- },
117
- {
118
- label: "Warehouse CT",
119
- value: "Warehouse CT",
120
- id: "warehouseCT",
62
+ ],
121
63
  },
122
- ]
123
- },
124
- ]; %>
64
+ ],
65
+ }] %>
125
66
 
126
67
  <%= pb_rails("multi_level_select", props: {
127
68
  id: "multi-level-select-single-rails",
@@ -3,126 +3,69 @@ import MultiLevelSelect from "../_multi_level_select";
3
3
 
4
4
  const treeData = [
5
5
  {
6
- label: "HQ",
7
- value: "HQ",
8
- id: "hq",
9
- },
10
- {
11
- label: "Philadelphia",
12
- value: "Philadelphia",
13
- id: "phl",
6
+ label: "Power Home Remodeling",
7
+ value: "Power Home Remodeling",
8
+ id: "powerhome2",
9
+ expanded: true,
14
10
  children: [
15
11
  {
16
- label: "Marketing & Sales PHL",
17
- value: "Marketing & Sales PHL",
18
- id: "marketingPHL",
19
- },
20
- {
21
- label: "Installation Office PHL",
22
- value: "Installation Office PHL",
23
- id: "installationPHL",
24
- },
25
- {
26
- label: "Warehouse PHL",
27
- value: "Warehouse PHL",
28
- id: "warehousePHL",
29
- },
30
- ]
31
- },
32
- {
33
- label: "New Jersey",
34
- value: "New Jersey",
35
- id: "nj",
36
- children: [
37
- {
38
- label: "New Jersey",
39
- value: "New Jersey",
40
- id: "nj1",
12
+ label: "People",
13
+ value: "People",
14
+ id: "people2",
15
+ expanded: true,
41
16
  children: [
42
17
  {
43
- label: "Marketing & Sales NJ",
44
- value: "Marketing & Sales NJ",
45
- id: "marketingNJ",
18
+ label: "Talent Acquisition",
19
+ value: "Talent Acquisition",
20
+ id: "talent2",
46
21
  },
47
22
  {
48
- label: "Installation Office NJ",
49
- value: "Installation Office NJ",
50
- id: "installationNJ",
23
+ label: "Business Affairs",
24
+ value: "Business Affairs",
25
+ id: "business2",
26
+ children: [
27
+ {
28
+ label: "Initiatives",
29
+ value: "Initiatives",
30
+ id: "initiative2",
31
+ },
32
+ {
33
+ label: "Learning & Development",
34
+ value: "Learning & Development",
35
+ id: "development2",
36
+ },
37
+ ],
51
38
  },
52
39
  {
53
- label: "Warehouse NJ",
54
- value: "Warehouse NJ",
55
- id: "warehouseNJ",
40
+ label: "People Experience",
41
+ value: "People Experience",
42
+ id: "experience2",
56
43
  },
57
44
  ],
58
45
  },
59
46
  {
60
- label: "Princeton",
61
- value: "Princeton",
62
- id: "princeton",
47
+ label: "Contact Center",
48
+ value: "Contact Center",
49
+ id: "contact2",
63
50
  children: [
64
51
  {
65
- label: "Marketing & Sales Princeton",
66
- value: "Marketing & Sales Princeton",
67
- id: "marketingPR",
52
+ label: "Appointment Management",
53
+ value: "Appointment Management",
54
+ id: "appointment2",
68
55
  },
69
56
  {
70
- label: "Installation Office Princeton",
71
- value: "Installation Office Princeton",
72
- id: "installationPR",
57
+ label: "Customer Service",
58
+ value: "Customer Service",
59
+ id: "customer2",
73
60
  },
74
61
  {
75
- label: "Warehouse Princeton",
76
- value: "Warehouse Princeton",
77
- id: "warehousePR",
62
+ label: "Energy",
63
+ value: "Energy",
64
+ id: "energy2",
78
65
  },
79
- ]
80
- },
81
- ]
82
- },
83
- {
84
- label: "Maryland",
85
- value: "Maryland",
86
- id: "MD",
87
- children: [
88
- {
89
- label: "Marketing & Sales MD",
90
- value: "Marketing & Sales MD",
91
- id: "marketingMD",
92
- },
93
- {
94
- label: "Installation Office MD",
95
- value: "Installation Office MD",
96
- id: "installationMD",
97
- },
98
- {
99
- label: "Warehouse MD",
100
- value: "Warehouse MD",
101
- id: "warehouseMD",
102
- },
103
- ]
104
- },
105
- {
106
- label: "Connecticut",
107
- value: "Connecticut",
108
- id: "CT",
109
- children: [
110
- {
111
- label: "Marketing & Sales CT",
112
- value: "Marketing & Sales CT",
113
- id: "marketingCT",
114
- },
115
- {
116
- label: "Installation Office CT",
117
- value: "Installation Office CT",
118
- id: "installationCT",
119
- },
120
- {
121
- label: "Warehouse CT",
122
- value: "Warehouse CT",
123
- id: "warehouseCT",
66
+ ],
124
67
  },
125
- ]
68
+ ],
126
69
  },
127
70
  ];
128
71
 
@@ -2,7 +2,6 @@ examples:
2
2
  rails:
3
3
  - multi_level_select_default: Default
4
4
  - multi_level_select_single: Single Select
5
- - multi_level_select_single_children_only: Single Select Ultimate Children Only
6
5
  - multi_level_select_return_all_selected: Return All Selected
7
6
  - multi_level_select_selected_ids: Selected Ids
8
7
  - multi_level_select_with_form: With Form
@@ -10,6 +9,5 @@ examples:
10
9
  react:
11
10
  - multi_level_select_default: Default
12
11
  - multi_level_select_single: Single Select
13
- - multi_level_select_single_children_only: Single Select Ultimate Children Only
14
12
  - multi_level_select_return_all_selected: Return All Selected
15
13
  - multi_level_select_selected_ids: Selected Ids
@@ -1,5 +1,4 @@
1
1
  export { default as MultiLevelSelectDefault } from './_multi_level_select_default.jsx'
2
2
  export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
3
- export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_select_single_children_only.jsx'
4
3
  export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
5
4
  export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
@@ -1,12 +1,37 @@
1
- <%= pb_rails("table", props: { size: "lg"} ) do %>
1
+ <%# Example data for demonstration purposes %>
2
+ <% data_rows = [
3
+ { 'territory' => 'North', 'firstname' => 'John', 'lastname' => 'Doe', 'age' => 30, 'job' => 'Engineer' },
4
+ { 'territory' => 'South', 'firstname' => 'Alice', 'lastname' => 'Smith', 'age' => 28, 'job' => 'Designer' },
5
+ { 'territory' => 'East', 'firstname' => 'Mike', 'lastname' => 'Johnson', 'age' => 35, 'job' => 'Manager' },
6
+ { 'territory' => 'West', 'firstname' => 'Sarah', 'lastname' => 'Brown', 'age' => 29, 'job' => 'Developer' },
7
+ { 'territory' => 'Central', 'firstname' => 'David', 'lastname' => 'Wilson', 'age' => 32, 'job' => 'Analyst' }
8
+ ]
9
+ %>
10
+
11
+ <%# Example sort method for demonstration purposes %>
12
+ <% if params["sort"] %>
13
+ <% sort_param = params["sort"].gsub(/_(asc|desc)\z/, "") %>
14
+ <% sort_direction = params["sort"].end_with?("_asc") ? 1 : -1 %>
15
+ <% data_rows.sort! do |a, b|
16
+ value_a = a[sort_param]
17
+ value_b = b[sort_param]
18
+
19
+ value_a = value_a.to_i if value_a.is_a?(String) && value_a.match?(/^\d+$/)
20
+ value_b = value_b.to_i if value_b.is_a?(String) && value_b.match?(/^\d+$/)
21
+
22
+ sort_direction * (value_a <=> value_b)
23
+ end %>
24
+ <% end %>
25
+
26
+ <%= pb_rails("table", props: { data_table: true, vertical_border: true, id: "table-header" } ) do %>
2
27
  <thead>
3
28
  <tr>
4
29
  <%= pb_rails("table/table_header", props: {
5
30
  text: "Territory",
6
31
  id: "territory",
7
32
  sort_menu: [
8
- { item: "Territory", link: "?sort=territory_desc", active: params["sort"] == "territory_desc", direction: "desc" },
9
- { item: "Territory", link: "?sort=territory_asc", active: params["sort"] == "territory_asc", direction: "asc" }
33
+ { item: "Territory", link: "?sort=territory_asc#table-header", active: params["sort"] == "territory_asc", direction: "asc" },
34
+ { item: "Territory", link: "?sort=territory_desc#table-header", active: params["sort"] == "territory_desc", direction: "desc" }
10
35
  ],
11
36
  }) %>
12
37
  <%= pb_rails("table/table_header", props: {
@@ -14,45 +39,36 @@
14
39
  text: "Full Name",
15
40
  colspan: 2,
16
41
  sort_menu: [
17
- { item: "First Name Descending", link: "?sort=firstname_desc", active: params["sort"] == "firstname_desc", direction: "desc" },
18
- { item: "First Name Ascending", link: "?sort=firstname_asc", active: params["sort"] == "firstname_asc", direction: "asc" },
19
- { item: "Last Name Descending", link: "?sort=lastname_desc", active: params["sort"] == "lastname_desc", direction: "desc" },
20
- { item: "Last Name Ascending", link: "?sort=lastname_asc", active: params["sort"] == "lastname_asc", direction: "asc" }
42
+ { item: "First Name Descending", link: "?sort=firstname_desc#table-header", active: params["sort"] == "firstname_desc", direction: "desc" },
43
+ { item: "First Name Ascending", link: "?sort=firstname_asc#table-header", active: params["sort"] == "firstname_asc", direction: "asc" },
44
+ { item: "Last Name Descending", link: "?sort=lastname_desc#table-header", active: params["sort"] == "lastname_desc", direction: "desc" },
45
+ { item: "Last Name Ascending", link: "?sort=lastname_asc#table-header", active: params["sort"] == "lastname_asc", direction: "asc" }
21
46
  ],
22
47
  }) %>
23
48
  <%= pb_rails("table/table_header", props: {
24
49
  text: "Age",
25
50
  id: "age",
26
- sort_dropdown: true,
27
51
  sort_menu: [
28
- { item: "Age Descending", link: "?sort=age_desc", active: params["sort"] == "age_desc", direction: "desc" },
29
- { item: "Age Ascending", link: "?sort=age_asc", active: params["sort"] == "age_asc", direction: "asc" }
52
+ { item: "Age Descending", link: "?sort=age_desc#table-header", active: params["sort"] == "age_desc", direction: "desc" },
53
+ { item: "Age Ascending", link: "?sort=age_asc#table-header", active: params["sort"] == "age_asc", direction: "asc" }
30
54
  ],
31
55
  }) %>
32
56
  <%= pb_rails("table/table_header", props: { text: "Job Title" }) %>
33
57
  </tr>
34
58
  </thead>
35
59
  <tbody>
36
- <tr>
37
- <td>Ter 1</td>
38
- <td>First Name 1</td>
39
- <td>Last Name 1</td>
40
- <td>Age 1</td>
41
- <td>Job 1</td>
42
- </tr>
43
- <tr>
44
- <td>Ter 2</td>
45
- <td>First Name 2</td>
46
- <td>Last Name 2</td>
47
- <td>Age 2</td>
48
- <td>Job 2</td>
49
- </tr>
50
- <tr>
51
- <td>Ter 3</td>
52
- <td>First Name 3</td>
53
- <td>Last Name 3</td>
54
- <td>Age 3</td>
55
- <td>Job 3</td>
56
- </tr>
60
+ <% data_rows.each do |row| %>
61
+ <tr>
62
+ <% row.each do |key, value| %>
63
+ <%= pb_rails("background", props: {
64
+ background_color: (params["sort"] && params["sort"].start_with?(key) ? "info_subtle" : "card_light"),
65
+ text_align: (value.is_a?(Integer) ? "right" : ""),
66
+ tag: "td"
67
+ }) do %>
68
+ <%= value %>
69
+ <% end %>
70
+ <% end %>
71
+ </tr>
72
+ <% end %>
57
73
  </tbody>
58
74
  <% end %>
@@ -6,3 +6,8 @@ presence of `sort_menu` enables the sort link within the header
6
6
  * `sort_dropdown` (boolean) optionally declares that (true) clicking a header's sort link opens a dropdown of sort options, or (false) each sort link click cycles through available sort_menu items in the order they are passed
7
7
  * passing a valid `colspan` will render sort options within a dropdown by default, without requiring `sort_dropdown` explicitly. Alternatively, the default sort dropdown can be prevented on headers with `colspan` by setting `sort_dropdown: false`, which reverts the column to sorting to multi-click default (each click of the sort link cycles through the available sort_menu items in the order they are passed)
8
8
  * `id` (string) is required for headers that have a dropdown (for popover reference); otherwise they are optional
9
+
10
+ </br>
11
+ <div class="pb_pill_kit_warning"><div class="pb_title_kit_size_4 pb_pill_text">Disclaimer</div></div>
12
+
13
+ This example uses a custom sort method that may need to be modified or replaced within your project.