playbook_ui_docs 14.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4216 → 14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3930

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -1
  4. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +7 -30
  5. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +2 -0
  6. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
  7. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -3
  8. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -3
  10. data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
  11. data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
  12. data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
  13. data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
  14. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
  15. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -4
  16. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +0 -2
  17. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -2
  18. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/index.js +0 -1
  19. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md +1 -1
  20. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.html.erb +1 -1
  21. data/dist/playbook-doc.js +1 -1
  22. metadata +2 -28
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx +0 -72
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md +0 -5
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +0 -45
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md +0 -1
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +0 -9
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +0 -33
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +0 -10
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +0 -34
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +0 -1
  32. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb +0 -41
  33. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx +0 -71
  34. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md +0 -1
  35. data/app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md +0 -1
  36. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -39
  37. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
  38. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +0 -19
  39. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +0 -27
  40. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md +0 -1
  41. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +0 -93
  42. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md +0 -1
  43. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +0 -105
  44. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +0 -1
  45. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +0 -106
  46. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +0 -1
  47. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb +0 -336
  48. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx +0 -97
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.5.0.pre.alpha.PLAY1485selectablecardoverflowoutlinebug4216
4
+ version: 14.5.0.pre.alpha.PLAY1486highchartscssdrivenPOC3930
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: 2024-10-23 00:00:00.000000000 Z
12
+ date: 2024-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -41,8 +41,6 @@ files:
41
41
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
42
42
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
43
43
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
44
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
45
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
46
44
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
47
45
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md
48
46
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx
@@ -665,8 +663,6 @@ files:
665
663
  - app/pb_kits/playbook/pb_drawer/docs/index.js
666
664
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb
667
665
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
668
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
669
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
670
666
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
671
667
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
672
668
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
@@ -674,15 +670,10 @@ files:
674
670
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
675
671
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
676
672
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
677
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
678
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
679
673
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
680
674
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
681
675
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
682
676
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md
683
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb
684
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx
685
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md
686
677
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
687
678
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
688
679
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
@@ -742,10 +733,6 @@ files:
742
733
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb
743
734
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
744
735
  - app/pb_kits/playbook/pb_filter/docs/_filter_placement.md
745
- - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.html.erb
746
- - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props.jsx
747
- - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_rails.md
748
- - app/pb_kits/playbook/pb_filter/docs/_filter_popover_props_react.md
749
736
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
750
737
  - app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx
751
738
  - app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb
@@ -815,8 +802,6 @@ files:
815
802
  - app/pb_kits/playbook/pb_form/docs/_description.md
816
803
  - app/pb_kits/playbook/pb_form/docs/_footer.md
817
804
  - app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb
818
- - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb
819
- - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md
820
805
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb
821
806
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.md
822
807
  - app/pb_kits/playbook/pb_form/docs/example.yml
@@ -851,9 +836,6 @@ files:
851
836
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx
852
837
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.html.erb
853
838
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
854
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb
855
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx
856
- - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.md
857
839
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
858
840
  - app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx
859
841
  - app/pb_kits/playbook/pb_form_pill/docs/example.yml
@@ -1154,8 +1136,6 @@ files:
1154
1136
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb
1155
1137
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx
1156
1138
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md
1157
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb
1158
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.md
1159
1139
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb
1160
1140
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx
1161
1141
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.md
@@ -1169,10 +1149,6 @@ files:
1169
1149
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb
1170
1150
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx
1171
1151
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md
1172
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx
1173
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md
1174
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx
1175
- - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md
1176
1152
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb
1177
1153
  - app/pb_kits/playbook/pb_multi_level_select/docs/example.yml
1178
1154
  - app/pb_kits/playbook/pb_multi_level_select/docs/index.js
@@ -1197,8 +1173,6 @@ files:
1197
1173
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default.jsx
1198
1174
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md
1199
1175
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md
1200
- - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.html.erb
1201
- - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_size.jsx
1202
1176
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md
1203
1177
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md
1204
1178
  - app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml
@@ -1,72 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable, Pill, Body, Flex, Detail, Caption } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableCustomCell = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
-
12
- },
13
- {
14
- accessor: "newEnrollments",
15
- label: "New Enrollments",
16
- customRenderer: (row, value) => (
17
- <Pill text={value}
18
- variant="success"
19
- />
20
- ),
21
- },
22
- {
23
- accessor: "scheduledMeetings",
24
- label: "Scheduled Meetings",
25
- customRenderer: (row, value) => <Body><a href="#">{value}</a></Body>,
26
- },
27
- {
28
- accessor: "attendanceRate",
29
- label: "Attendance Rate",
30
- customRenderer: (row, value) => (
31
- <Flex alignItems="end"
32
- orientation="column"
33
- >
34
- <Detail bold
35
- color="default"
36
- text={value}
37
- />
38
- <Caption size="xs">{row.original.graduatedStudents}</Caption>
39
- </Flex>
40
- ),
41
- },
42
- {
43
- accessor: "completedClasses",
44
- label: "Completed Classes",
45
- },
46
- {
47
- accessor: "classCompletionRate",
48
- label: "Class Completion Rate",
49
- },
50
- {
51
- accessor: "graduatedStudents",
52
- label: "Graduated Students",
53
- },
54
- ]
55
-
56
- return (
57
- <div>
58
- <AdvancedTable
59
- columnDefinitions={columnDefinitions}
60
- enableToggleExpansion="all"
61
- responsive="none"
62
- tableData={MOCK_DATA}
63
- {...props}
64
- >
65
- <AdvancedTable.Header enableSorting />
66
- <AdvancedTable.Body />
67
- </AdvancedTable>
68
- </div>
69
- )
70
- }
71
-
72
- export default AdvancedTableCustomCell
@@ -1,5 +0,0 @@
1
- The Advanced Table also allows for rendering custom components within individual Cells. To achieve this, you can make use of the optional `customRenderer` item within each columnDefinition. This function gives you access to the current Cell's value if you just want to use that with a custom Kit, but it also gives you access to the entire `row` object. The row object provides all data for the current row. To access the data, use `row.original` which is the entire data object for the current row. See the code snippet below for 3 separate use cases and how they were acheived.
2
-
3
- See [here](https://playbook.powerapp.cloud/kits/advanced_table/react#columnDefinitions) for more indepth information on columnDefinitions are how to use them.
4
-
5
- See [here](https://github.com/powerhome/playbook/tree/master/playbook/app/pb_kits/playbook/pb_advanced_table#readme) for the structure of the tableData used.
@@ -1,45 +0,0 @@
1
- import React, { useRef } from 'react'
2
- import { Button, Dropdown } from 'playbook-ui'
3
-
4
- const options = [
5
- {
6
- label: "United States",
7
- value: "United States",
8
- },
9
- {
10
- label: "Canada",
11
- value: "Canada",
12
- },
13
- {
14
- label: "Pakistan",
15
- value: "Pakistan",
16
- }
17
- ]
18
-
19
- const DropdownClearSelection = (props) => {
20
- const dropdownRef = useRef(null)
21
-
22
- const handleReset = () => {
23
- if (dropdownRef.current) {
24
- dropdownRef.current.clearSelected()
25
- }
26
- }
27
-
28
- return (
29
- <>
30
- <Dropdown
31
- defaultValue={options[2]}
32
- options={options}
33
- ref={dropdownRef}
34
- {...props}
35
- />
36
- <Button
37
- marginTop="md"
38
- onClick={handleReset}
39
- text="Reset"
40
- />
41
- </>
42
- )
43
- }
44
-
45
- export default DropdownClearSelection
@@ -1 +0,0 @@
1
- To use an external control (like a reset button) to clear Dropdown selection, you can make use of the `useRef` hook. You must pass a ref to the Dropdown component and use that ref within the onClick for the external control in the way shown in the code snippet below.
@@ -1,9 +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
- <%= pb_rails("dropdown", props: {options: options, separators: false}) %>
@@ -1,33 +0,0 @@
1
- import React from 'react'
2
- import { Dropdown } from 'playbook-ui'
3
-
4
- const DropdownSeparatorsHidden = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "Canada",
13
- value: "Canada",
14
- },
15
- {
16
- label: "Pakistan",
17
- value: "Pakistan",
18
- }
19
- ];
20
-
21
-
22
- return (
23
- <div>
24
- <Dropdown
25
- options={options}
26
- separators={false}
27
- {...props}
28
- />
29
- </div>
30
- )
31
- }
32
-
33
- export default DropdownSeparatorsHidden
@@ -1,10 +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
- <%= pb_rails("dropdown", props: { options: options, variant: "subtle", separators: false }) %>
@@ -1,34 +0,0 @@
1
- import React from 'react'
2
- import { Dropdown } from 'playbook-ui'
3
-
4
- const DropdownSubtleVariant = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "Canada",
13
- value: "Canada",
14
- },
15
- {
16
- label: "Pakistan",
17
- value: "Pakistan",
18
- }
19
- ];
20
-
21
-
22
- return (
23
- <>
24
- <Dropdown
25
- options={options}
26
- separators={false}
27
- variant="subtle"
28
- {...props}
29
- />
30
- </>
31
- )
32
- }
33
-
34
- export default DropdownSubtleVariant
@@ -1 +0,0 @@
1
- For the `subtle` variant, it is recommended that you set the `Separators` prop to `false` to remove the separator lines between the options for a more cleaner look.
@@ -1,41 +0,0 @@
1
- <%=
2
- pb_rails("filter", props: {
3
- id: "filter_popover_props",
4
- position: "top",
5
- filters: [
6
- { name: "name", value: "John Wick" },
7
- { name: "city", value: "San Francisco"}
8
- ],
9
- sort_menu: [
10
- { item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
11
- { item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
12
- { item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
13
- ],
14
- template: "default",
15
- results: 1,
16
- popover_props: { width: "250px" },
17
- }) do
18
- %>
19
- <%
20
- example_collection = [
21
- OpenStruct.new(name: "USA", value: 1),
22
- OpenStruct.new(name: "Canada", value: 2),
23
- OpenStruct.new(name: "Brazil", value: 3),
24
- OpenStruct.new(name: "Philippines", value: 4),
25
- OpenStruct.new(name: "A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...", value: 5)
26
- ]
27
- %>
28
- <%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
29
- <%= form.text_field :example_text_field, props: { label: true } %>
30
- <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: {max_width: "sm", label: true } %>
31
-
32
- <%= form.actions do |action| %>
33
- <%= action.submit props: {
34
- text: "Apply",
35
- data: {
36
- disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe
37
- },}%>
38
- <%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
39
- <% end %>
40
- <% end %>
41
- <% end %>
@@ -1,71 +0,0 @@
1
- import React from 'react'
2
- import { Button, Filter, Flex, Select, TextInput } from 'playbook-ui'
3
-
4
- const FilterPopoverProps = (props) => {
5
- const options = [
6
- { value: 'USA' },
7
- { value: 'Canada' },
8
- { value: 'Brazil' },
9
- { value: 'Philippines' },
10
- { value: 'A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...' },
11
- ]
12
-
13
- const popoverProps = {
14
- width: "250px"
15
- }
16
-
17
- return (
18
- <Filter
19
- {...props}
20
- double
21
- filters={{
22
- 'Full Name': 'John Wick',
23
- 'City': 'San Francisco',
24
- }}
25
- popoverProps={popoverProps}
26
- results={1}
27
- sortOptions={{
28
- popularity: 'Popularity',
29
- // eslint-disable-next-line
30
- manager_title: 'Manager\'s Title',
31
- // eslint-disable-next-line
32
- manager_name: 'Manager\'s Name',
33
- }}
34
- sortValue={[{ name: 'popularity', dir: 'desc' }]}
35
- >
36
- {({ closePopover }) => (
37
- <form>
38
- <TextInput
39
- label="Example Text Field"
40
- placeholder="Enter Text"
41
- {...props}
42
- />
43
- <Select
44
- blankSelection="Select One..."
45
- label="Example Collection Select"
46
- name="Collection Select"
47
- options={options}
48
- {...props}
49
- />
50
- <Flex
51
- spacing="between"
52
- {...props}
53
- >
54
- <Button
55
- onClick={closePopover}
56
- text="Apply"
57
- {...props}
58
- />
59
- <Button
60
- text="Clear"
61
- variant="secondary"
62
- {...props}
63
- />
64
- </Flex>
65
- </form>
66
- )}
67
- </Filter>
68
- )
69
- }
70
-
71
- export default FilterPopoverProps
@@ -1 +0,0 @@
1
- This kit uses the [Popover kit](https://playbook.powerapp.cloud/kits/popover) under the hood for the Filter Popover which comes with its own set of props. If you want to apply certain Popover props to that underlying kit, you can do so by using the optional `popover_props` prop. This prop must be an object that contains valid Popover props. For a full list of Popover props, see [here](https://playbook.powerapp.cloud/kits/popover).
@@ -1 +0,0 @@
1
- This kit uses the [Popover kit](https://playbook.powerapp.cloud/kits/popover/react) under the hood for the Filter Popover which comes with its own set of props. If you want to apply certain Popover props to that underlying kit, you can do so by using the optional `popoverProps` prop. This prop must be an object that contains valid Popover props. For a full list of Popover props, see [here](https://playbook.powerapp.cloud/kits/popover/react).
@@ -1,39 +0,0 @@
1
- <%= pb_form_with(scope: :example, url: "", method: :get, loading: true) do |form| %>
2
- <%= form.text_field :example_text_field, props: { label: true } %>
3
-
4
- <%= form.actions do |action| %>
5
- <%= action.submit %>
6
- <%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
7
- <% end %>
8
- <% end %>
9
-
10
- <script>
11
- const loadingForm = document.querySelector(".pb_form_loading")
12
- if (loadingForm) {
13
- loadingForm.addEventListener("submit", function(event) {
14
- event.preventDefault();
15
-
16
- const submitButton = event['submitter'];
17
- const cancelButton = event['target'].querySelector('button[type="reset"]');
18
-
19
- if (submitButton) {
20
- let currentClass = submitButton.className;
21
- let newClass = currentClass.replace("_disabled_loading", "_enabled");
22
-
23
- let cancelClass = cancelButton ? cancelButton.className : "";
24
- let newCancelClass = cancelClass.replace("_disabled", "_enabled");
25
-
26
- setTimeout(function() {
27
- submitButton.disabled = false;
28
- submitButton.className = currentClass;
29
-
30
- if (cancelButton) {
31
- cancelButton.disabled = false;
32
- cancelButton.className = cancelClass;
33
- }
34
- }, 5000);
35
- }
36
- });
37
- }
38
- </script>
39
-
@@ -1 +0,0 @@
1
- Pressing Submit will trigger a loading state where the button content is replaced by a spinner icon and the submit button will be disabled.
@@ -1,19 +0,0 @@
1
- <%
2
- names = [
3
- { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
4
- { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
5
- { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
6
- { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
7
- { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
8
- ]
9
- %>
10
-
11
- <%= pb_rails("typeahead", props: {
12
- html_options: { style: { maxWidth: "240px" }},
13
- id: "typeahead-form-pill",
14
- is_multi: true,
15
- options: names,
16
- label: "Names",
17
- pills: true,
18
- truncate: 1,
19
- }) %>
@@ -1,27 +0,0 @@
1
- import React from 'react'
2
- import Typeahead from '../../pb_typeahead/_typeahead'
3
-
4
- const names = [
5
- { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
6
- { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
7
- { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
8
- { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
9
- { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
10
- ]
11
-
12
- const FormPillTruncatedText = (props) => {
13
- return (
14
- <>
15
- <Typeahead
16
- htmlOptions={{ style: { maxWidth: "240px" }}}
17
- isMulti
18
- label="Names"
19
- options={names}
20
- truncate={1}
21
- {...props}
22
- />
23
- </>
24
- )
25
- }
26
-
27
- export default FormPillTruncatedText
@@ -1 +0,0 @@
1
- For pills with longer text, the `truncate` global prop can be used to truncate the label within each Form Pill. See [here](https://playbook.powerapp.cloud/visual_guidelines/truncate) for more information on the truncate global prop.
@@ -1,93 +0,0 @@
1
- <% treeData = [{
2
- label: "Power Home Remodeling",
3
- value: "Power Home Remodeling",
4
- id: "100",
5
- expanded: true,
6
- children: [
7
- {
8
- label: "People",
9
- value: "People",
10
- id: "101",
11
- expanded: true,
12
- children: [
13
- {
14
- label: "Talent Acquisition",
15
- value: "Talent Acquisition",
16
- id: "102",
17
- },
18
- {
19
- label: "Business Affairs",
20
- value: "Business Affairs",
21
- id: "103",
22
- children: [
23
- {
24
- label: "Initiatives",
25
- value: "Initiatives",
26
- id: "104",
27
- },
28
- {
29
- label: "Learning & Development",
30
- value: "Learning & Development",
31
- id: "105",
32
- },
33
- ],
34
- },
35
- {
36
- label: "People Experience",
37
- value: "People Experience",
38
- id: "106",
39
- },
40
- ],
41
- },
42
- {
43
- label: "Contact Center",
44
- value: "Contact Center",
45
- id: "107",
46
- children: [
47
- {
48
- label: "Appointment Management",
49
- value: "Appointment Management",
50
- id: "108",
51
- },
52
- {
53
- label: "Customer Service",
54
- value: "Customer Service",
55
- id: "109",
56
- },
57
- {
58
- label: "Energy",
59
- value: "Energy",
60
- id: "110",
61
- },
62
- ],
63
- },
64
- ],
65
- }] %>
66
-
67
- <%= pb_rails("multi_level_select", props: {
68
- id: "multi-level-select-reset-example",
69
- name: "my_array",
70
- tree_data: treeData,
71
- return_all_selected: true
72
- }) %>
73
-
74
- <%= pb_rails("button", props: { text: "Reset", margin_top: "lg", id:"multilevelselect-reset-button" }) %>
75
-
76
-
77
- <script>
78
- window.addEventListener('DOMContentLoaded', () => {
79
- const exampleResetButton = document.querySelector("#multilevelselect-reset-button");
80
-
81
- exampleResetButton.addEventListener("click", () => {
82
- clearMultiLevelSelectById('multi-level-select-reset-example');
83
- });
84
- function clearMultiLevelSelectById(id) {
85
- const clearFunction = window[`clearMultiLevelSelect_${id}`];
86
- if (clearFunction) {
87
- clearFunction();
88
- } else {
89
- console.warn(`No clear function found for MultiLevelSelect with id: ${id}`);
90
- }
91
- }
92
- })
93
- </script>
@@ -1 +0,0 @@
1
- In order to clear the multilevelselect selection using an external trigger (like a reset button), the `clearMultiLevelSelect` function can be used. See the code snippet below to see this in action. The function is scoped by id so an id MUST be used on the multilevelselect kit and passed to the function as shown for it to work.