playbook_ui_docs 14.20.0.pre.alpha.revert4637revert4621PLAY2033atactionbarrails7855 β†’ 14.20.0.pre.rc.0

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +2 -6
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +0 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +1 -3
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  7. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +10 -0
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +0 -11
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +1 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +2 -33
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +1 -3
  12. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +1 -11
  13. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -5
  14. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -1
  15. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +0 -1
  16. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +11 -11
  17. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +11 -11
  18. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb +11 -11
  19. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +11 -11
  20. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.html.erb +11 -11
  21. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.jsx +11 -11
  22. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.html.erb +11 -11
  23. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.jsx +11 -11
  24. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.html.erb +11 -11
  25. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.jsx +11 -11
  26. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.html.erb +11 -11
  27. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.jsx +11 -11
  28. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.html.erb +11 -11
  29. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.jsx +11 -11
  30. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +11 -11
  31. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +11 -11
  32. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +11 -11
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +11 -11
  34. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_hook.jsx +11 -11
  35. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +11 -11
  36. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +11 -11
  37. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx +11 -11
  38. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +11 -11
  39. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.md +0 -2
  40. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.jsx +11 -11
  41. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md +1 -3
  42. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +22 -22
  43. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +22 -22
  44. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +22 -22
  45. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +22 -22
  46. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +11 -11
  47. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +11 -11
  48. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb +11 -11
  49. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
  50. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  51. data/dist/playbook-doc.js +2 -2
  52. metadata +3 -25
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.html.erb +0 -137
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.md +0 -3
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header_rails.html.erb +0 -40
  56. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header_rails.md +0 -1
  57. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +0 -31
  58. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.md +0 -5
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx +0 -56
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.md +0 -3
  61. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx +0 -58
  62. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.md +0 -3
  63. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb +0 -20
  64. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.md +0 -1
  65. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb +0 -19
  66. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.md +0 -3
  67. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb +0 -20
  68. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx +0 -57
  69. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.md +0 -1
  70. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb +0 -50
  71. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx +0 -105
  72. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb +0 -22
  73. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx +0 -67
  74. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.jsx +0 -23
  75. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.md +0 -1
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.20.0.pre.alpha.revert4637revert4621PLAY2033atactionbarrails7855
4
+ version: 14.20.0.pre.rc.0
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-05-23 00:00:00.000000000 Z
12
+ date: 2025-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -95,12 +95,8 @@ files:
95
95
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md
96
96
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx
97
97
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md
98
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.html.erb
99
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions_rails.md
100
98
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx
101
99
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md
102
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header_rails.html.erb
103
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header_rails.md
104
100
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.html.erb
105
101
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md
106
102
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_react.jsx
@@ -815,29 +811,13 @@ files:
815
811
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
816
812
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
817
813
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
814
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
818
815
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
819
816
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
820
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
821
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.md
822
817
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb
823
818
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
824
819
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
825
820
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
826
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx
827
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.md
828
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx
829
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.md
830
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb
831
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.md
832
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb
833
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.md
834
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb
835
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx
836
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.md
837
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb
838
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx
839
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb
840
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
841
821
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
842
822
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
843
823
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
@@ -2312,8 +2292,6 @@ files:
2312
2292
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx
2313
2293
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
2314
2294
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
2315
- - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.jsx
2316
- - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.md
2317
2295
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx
2318
2296
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md
2319
2297
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb
@@ -1,137 +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
- actions = [
34
- pb_rails("circle_icon_button", props: {
35
- icon: "file-csv",
36
- variant: "link",
37
- id: "export-selected-rows-btn",
38
- data: {
39
- action_type: "export"
40
- }
41
- }),
42
- pb_rails("circle_icon_button", props: {
43
- icon: "trash-alt",
44
- variant: "link",
45
- id: "delete-selected-rows-btn",
46
- data: {
47
- action_type: "delete"
48
- }
49
- })
50
- ]
51
- %>
52
-
53
- <%= pb_rails("advanced_table", props: {
54
- id: "selectable_rows_with_actions",
55
- table_data: @table_data_no_subrows,
56
- column_definitions: column_definitions,
57
- selectable_rows: true,
58
- enable_toggle_expansion: "none",
59
- actions: actions
60
- }) %>
61
-
62
- <script>
63
- // Handle action clicks using the data-selected-rows attribute
64
- window.handleActionClick = function(actionType) {
65
- const tableContainer = document.getElementById('selectable_rows_with_actions');
66
- if (!tableContainer) return;
67
-
68
- // Get selected rows from the data attribute
69
- const selectedRowsJSON = tableContainer.getAttribute('data-selected-rows');
70
- let selectedRowIds = [];
71
-
72
- try {
73
- // Parse the JSON string from the data attribute
74
- if (selectedRowsJSON) {
75
- selectedRowIds = JSON.parse(selectedRowsJSON);
76
- }
77
- } catch (e) {
78
- // Fallback if JSON parsing fails
79
- const checkboxes = tableContainer.querySelectorAll('input[type="checkbox"]:checked');
80
- const selectedCheckboxes = Array.from(checkboxes).filter(checkbox =>
81
- checkbox.id !== 'select-all-rows' &&
82
- !checkbox.closest('#select-all-rows')
83
- );
84
- selectedRowIds = selectedCheckboxes.map(checkbox => checkbox.id);
85
- }
86
-
87
- // Show appropriate message
88
- if (!selectedRowIds || selectedRowIds.length === 0) {
89
- alert('No Selection Made');
90
- } else {
91
- if (actionType === 'export') {
92
- alert(`Row ids ${selectedRowIds.join(', ')} will be exported!`);
93
- } else if (actionType === 'delete') {
94
- alert(`Row ids ${selectedRowIds.join(', ')} will be deleted!`);
95
- }
96
- }
97
- };
98
-
99
- // Add event listeners when the DOM is ready
100
- document.addEventListener('DOMContentLoaded', function() {
101
- // Get the buttons
102
- const exportBtn = document.getElementById('export-selected-rows-btn');
103
- const deleteBtn = document.getElementById('delete-selected-rows-btn');
104
-
105
- // Add click event listeners
106
- if (exportBtn) {
107
- exportBtn.addEventListener('click', function(e) {
108
- e.preventDefault();
109
- window.handleActionClick('export');
110
- });
111
- }
112
-
113
- if (deleteBtn) {
114
- deleteBtn.addEventListener('click', function(e) {
115
- e.preventDefault();
116
- window.handleActionClick('delete');
117
- });
118
- }
119
-
120
- // Optional: Event delegation through the action bar
121
- const actionBar = document.querySelector('.row-selection-actions-card');
122
- if (actionBar) {
123
- actionBar.addEventListener('click', function(e) {
124
- const exportButton = e.target.closest('#export-selected-rows-btn');
125
- const deleteButton = e.target.closest('#delete-selected-rows-btn');
126
-
127
- if (exportButton) {
128
- e.preventDefault();
129
- window.handleActionClick('export');
130
- } else if (deleteButton) {
131
- e.preventDefault();
132
- window.handleActionClick('delete');
133
- }
134
- });
135
- }
136
- });
137
- </script>
@@ -1,3 +0,0 @@
1
- Custom actions content can be rendered within the Actions Bar as shown in this doc example. The component passed to `actions` will be rendered on the right of the actionsBar.
2
-
3
- You can utilize script tags with your actions to provide your buttons with any clickable events needed.
@@ -1,40 +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: {
34
- id: "selectable_rows_with_actions",
35
- table_data: @table_data_no_subrows,
36
- column_definitions: column_definitions,
37
- selectable_rows: true,
38
- enable_toggle_expansion: "none",
39
- show_actions_bar: false
40
- }) %>
@@ -1 +0,0 @@
1
- `show_actions_bar` is an optional prop that renders the header at the top showing the row count. This is set to `true` by default but can be toggled off by setting it to `false`
@@ -1,31 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States', id: 'us' },
4
- { label: 'Canada', value: 'Canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
- ]
7
-
8
- %>
9
-
10
- <%
11
- options2 = [
12
- { label: 'India', value: 'India', id: 'in' },
13
- { label: 'Mexico', value: 'Mexico', id: 'mx' },
14
- { label: 'Brazil', value: 'Brazil', id: 'br' },
15
- { label: 'Argentina', value: 'Argentina', id: 'ar' },
16
- { label: 'Colombia', value: 'Colombia', id: 'co' },
17
- { label: 'Chile', value: 'Chile', id: 'cl' },
18
- { label: 'Peru', value: 'Peru', id: 'pe' },
19
- ]
20
-
21
- %>
22
-
23
- <%= pb_rails("dropdown", props: {options: options}) %>
24
-
25
- <script>
26
- document.addEventListener("pb:dropdown:selected", (e) => {
27
- const option = e.detail;
28
- const dropdown = e.target;
29
- console.log("Selected option:", option);
30
- })
31
- </script>
@@ -1,5 +0,0 @@
1
- This kit's `options` prop requires an array of objects, each of which will be used as the selectable options within the dropdown. Each option object can support any number of key-value pairs, but each MUST contain `label`, `value` and `id`.
2
-
3
- The kit also comes with a custom event called "pb:dropdown:selected" which updates dynamically with the selection as it changes. See code snippet to see this in action.
4
-
5
- In addition, a data attribute called `data-option-selected` with the selection is also rendered on the parent dropdown div.
@@ -1,56 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownMultiSelect = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "United Kingdom",
13
- value: "United Kingdom",
14
- },
15
- {
16
- label: "Canada",
17
- value: "Canada",
18
- },
19
- {
20
- label: "Pakistan",
21
- value: "Pakistan",
22
- },
23
- {
24
- label: "India",
25
- value: "India",
26
- },
27
- {
28
- label: "Australia",
29
- value: "Australia",
30
- },
31
- {
32
- label: "New Zealand",
33
- value: "New Zealand",
34
- },
35
- {
36
- label: "Italy",
37
- value: "Italy",
38
- },
39
- {
40
- label: "Spain",
41
- value: "Spain",
42
- }
43
- ];
44
-
45
- return (
46
- <div>
47
- <Dropdown
48
- multiSelect
49
- options={options}
50
- {...props}
51
- />
52
- </div>
53
- )
54
- }
55
-
56
- export default DropdownMultiSelect
@@ -1,3 +0,0 @@
1
- `multiSelect` is a boolean prop that if set to true will allow for multiple options to be selected from the Dropdown.
2
-
3
- `multiSelect` is set to false by default.
@@ -1,58 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownMultiSelectDisplay = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "United Kingdom",
13
- value: "United Kingdom",
14
- },
15
- {
16
- label: "Canada",
17
- value: "Canada",
18
- },
19
- {
20
- label: "Pakistan",
21
- value: "Pakistan",
22
- },
23
- {
24
- label: "India",
25
- value: "India",
26
- },
27
- {
28
- label: "Australia",
29
- value: "Australia",
30
- },
31
- {
32
- label: "New Zealand",
33
- value: "New Zealand",
34
- },
35
- {
36
- label: "Italy",
37
- value: "Italy",
38
- },
39
- {
40
- label: "Spain",
41
- value: "Spain",
42
- }
43
- ];
44
-
45
-
46
- return (
47
- <div>
48
- <Dropdown
49
- formPillProps={{size:"small", color:"neutral"}}
50
- multiSelect
51
- options={options}
52
- {...props}
53
- />
54
- </div>
55
- )
56
- }
57
-
58
- export default DropdownMultiSelectDisplay
@@ -1,3 +0,0 @@
1
- By default, the `multiSelect` prop will render selected options as the default FormPill. `FormPillProps` however can be used to customize these Pills with any props that exist for the FormPill.
2
-
3
- This prop must be an object that contains valid FormPill props. For a full list of FormPill props, see [here](https://playbook.powerapp.cloud/kits/form_pill/react).
@@ -1,20 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States', id: 'us' },
4
- { label: 'Canada', value: 'Canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
- { label: 'India', value: 'India', id: 'in' },
7
- { label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
8
- { label: 'Australia', value: 'Australia', id: 'au' },
9
- { label: 'New Zealand', value: 'New Zealand', id: 'nz' },
10
- { label: 'Germany', value: 'Germany', id: 'de' },
11
- { label: 'France', value: 'France', id: 'fr' },
12
- { label: 'Italy', value: 'Italy', id: 'it' },
13
- ]
14
- %>
15
-
16
- <%= pb_rails("dropdown", props: {
17
- options: options,
18
- multi_select: true,
19
- form_pill_props: { size:"small", color:"neutral" },
20
- }) %>
@@ -1 +0,0 @@
1
- By default, the `multi_select` prop will render selected options as the default form_pill. `form_pill_props` however can be used to customize these Pills with props that exist for the form_pill. Currently, only the '[color](https://playbook.powerapp.cloud/kits/form_pill/rails#form-pill-colors)' and '[size](https://playbook.powerapp.cloud/kits/form_pill/rails#form-pill-size)' props are supported as shown here.
@@ -1,19 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States', id: 'us' },
4
- { label: 'Canada', value: 'Canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
- { label: 'India', value: 'India', id: 'in' },
7
- { label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
8
- { label: 'Australia', value: 'Australia', id: 'au' },
9
- { label: 'New Zealand', value: 'New Zealand', id: 'nz' },
10
- { label: 'Germany', value: 'Germany', id: 'de' },
11
- { label: 'France', value: 'France', id: 'fr' },
12
- { label: 'Italy', value: 'Italy', id: 'it' },
13
- ]
14
- %>
15
-
16
- <%= pb_rails("dropdown", props: {
17
- options: options,
18
- multi_select: true,
19
- }) %>
@@ -1,3 +0,0 @@
1
- `multi_select` is a boolean prop that if set to true will allow for multiple options to be selected from the Dropdown.
2
-
3
- `multi_select` is set to false by default.
@@ -1,20 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States', id: 'us' },
4
- { label: 'Canada', value: 'Canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
- { label: 'India', value: 'India', id: 'in' },
7
- { label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
8
- { label: 'Australia', value: 'Australia', id: 'au' },
9
- { label: 'New Zealand', value: 'New Zealand', id: 'nz' },
10
- { label: 'Germany', value: 'Germany', id: 'de' },
11
- { label: 'France', value: 'France', id: 'fr' },
12
- { label: 'Italy', value: 'Italy', id: 'it' },
13
- ]
14
- %>
15
-
16
- <%= pb_rails("dropdown", props: {
17
- autocomplete: true,
18
- options: options,
19
- multi_select: true,
20
- }) %>
@@ -1,57 +0,0 @@
1
- import React from 'react'
2
- import Dropdown from '../../pb_dropdown/_dropdown'
3
-
4
- const DropdownMultiSelectWithAutocomplete = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "United Kingdom",
13
- value: "United Kingdom",
14
- },
15
- {
16
- label: "Canada",
17
- value: "Canada",
18
- },
19
- {
20
- label: "Pakistan",
21
- value: "Pakistan",
22
- },
23
- {
24
- label: "India",
25
- value: "India",
26
- },
27
- {
28
- label: "Australia",
29
- value: "Australia",
30
- },
31
- {
32
- label: "New Zealand",
33
- value: "New Zealand",
34
- },
35
- {
36
- label: "Italy",
37
- value: "Italy",
38
- },
39
- {
40
- label: "Spain",
41
- value: "Spain",
42
- }
43
- ];
44
-
45
- return (
46
- <div>
47
- <Dropdown
48
- autocomplete
49
- multiSelect
50
- options={options}
51
- {...props}
52
- />
53
- </div>
54
- )
55
- }
56
-
57
- export default DropdownMultiSelectWithAutocomplete
@@ -1 +0,0 @@
1
- `multiSelect` can also be used with the `autocomplete` functionality.
@@ -1,50 +0,0 @@
1
- <%
2
- options = [
3
- {
4
- label: "United States",
5
- value: "United States",
6
- areaCode: "+1",
7
- icon: "πŸ‡ΊπŸ‡Έ",
8
- id: "us"
9
- },
10
- {
11
- label: "Canada",
12
- value: "Canada",
13
- areaCode: "+1",
14
- icon: "πŸ‡¨πŸ‡¦",
15
- id: "ca"
16
- },
17
- {
18
- label: "Pakistan",
19
- value: "Pakistan",
20
- areaCode: "+92",
21
- icon: "πŸ‡΅πŸ‡°",
22
- id: "pk"
23
- }
24
- ]
25
-
26
- %>
27
-
28
- <%= pb_rails("dropdown", props: { options: options, multi_select: true }) do %>
29
- <%= pb_rails("dropdown/dropdown_trigger", props:{ multi_select: true }) %>
30
- <%= pb_rails("dropdown/dropdown_container") do %>
31
- <% options.each do |option| %>
32
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
33
- <%= pb_rails("flex", props: {
34
- align: "center",
35
- justify: "between",
36
- }) do %>
37
- <%= pb_rails("flex/flex_item") do %>
38
- <%= pb_rails("flex") do %>
39
- <%= pb_rails("icon", props: {icon: option[:icon]}) %>
40
- <%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
41
- <% end %>
42
- <% end %>
43
- <%= pb_rails("flex/flex_item") do %>
44
- <%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
45
- <% end %>
46
- <% end %>
47
- <% end %>
48
- <% end %>
49
- <% end %>
50
- <% end %>