playbook_ui_docs 13.28.0 → 13.29.0.pre.alpha.testingcollapsibleissue3052

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +40 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +3 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +2 -1
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom.html.erb → _bar_graph_custom_rails.html.erb} +3 -3
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +2 -0
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +53 -0
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +4 -0
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +158 -0
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +119 -0
  14. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +50 -0
  15. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -0
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +51 -0
  17. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +11 -0
  18. data/app/pb_kits/playbook/pb_draggable/docs/index.js +5 -0
  19. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +10 -0
  20. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  21. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +33 -32
  22. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
  23. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +2 -0
  24. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
  25. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
  26. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +34 -0
  27. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +2 -0
  28. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +51 -50
  29. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
  30. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +54 -0
  31. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +2 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +37 -38
  33. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +1 -0
  34. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +53 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +1 -0
  36. data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_row.html.erb → _table_outer_padding.html.erb} +7 -7
  37. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +76 -0
  38. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +1 -0
  39. data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
  40. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  41. data/dist/menu.yml +5 -2
  42. data/dist/playbook-doc.js +10 -10
  43. metadata +30 -10
  44. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +0 -63
  45. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +0 -52
  46. /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column.html.erb → _table_alignment_column_rails.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f364a8bd557be9abd38e709e55f56126ced42e98b45b148a4fcbdcc06079d80f
4
- data.tar.gz: f5a6f2bc623fb625cb2a6fde77c25a40b425ba50a908c9d87e050ae3c72798c6
3
+ metadata.gz: 3989a7998287dbfdeb6f70a5350de16e07f58a24a708d7960d90509bde13d460
4
+ data.tar.gz: 26d31983c514bea9c5c4556ea867235c422ed3c62f12d084a993f8eaff6f3a7e
5
5
  SHA512:
6
- metadata.gz: 3775ee5187f6745895b9158828f8047ecd8215c782f6db38dc05012263ab9c4b6a757a392833fd2367a1725a1a0d0cc352de06ed1c0a9ff4d3305846896a2634
7
- data.tar.gz: 72d0bbf9ca6fca782d48df2e40f870b1fa34248e533a5acfe454adb49a46338ad15a2c90f398e66bf5f0f8c21527a5c38994b7c4ee519a6a72acf44daa7df346
6
+ metadata.gz: 3d3bddef7c00879f999a9daf00eb7f60122c7cb41ba786457c2c3221a316ce8114990b03f31d9f92554a85d48f44b07eb6434fdc95bf45dae536f69966c1cf8d
7
+ data.tar.gz: 1eef88d2153999d0601102f50ec09771a16b395f4f10a552643a410fabfd7070cb24ce1bd02a9525d37dad36371613f978dfdc1075bb31a58173a9f6338eb9dc
@@ -0,0 +1,40 @@
1
+ <%
2
+ column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ cellAccessors: ["quarter", "month", "day"],
7
+ },
8
+ {
9
+ accessor: "newEnrollments",
10
+ label: "New Enrollments",
11
+ },
12
+ {
13
+ accessor: "scheduledMeetings",
14
+ label: "Scheduled Meetings",
15
+ },
16
+ {
17
+ accessor: "attendanceRate",
18
+ label: "Attendance Rate",
19
+ },
20
+ {
21
+ accessor: "completedClasses",
22
+ label: "Completed Classes",
23
+ },
24
+ {
25
+ accessor: "classCompletionRate",
26
+ label: "Class Completion Rate",
27
+ },
28
+ {
29
+ accessor: "graduatedStudents",
30
+ label: "Graduated Students",
31
+ }
32
+ ]
33
+
34
+ subrow_headers = ["Quarter", "Month", "Day"]
35
+ %>
36
+
37
+ <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
38
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
40
+ <% end %>
@@ -0,0 +1,3 @@
1
+ `subrow_headers` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
+
3
+ `enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
@@ -1,3 +1,3 @@
1
1
  `subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
2
 
3
- `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all', 'header" or "none". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'header' by default.
3
+ `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
@@ -1,6 +1,7 @@
1
1
  examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
+ - advanced_table_beta_subrow_headers: SubRow Headers
4
5
  react:
5
6
  - advanced_table_default: Default (Required Props)
6
7
  - advanced_table_loading: Loading State
@@ -12,4 +13,3 @@ examples:
12
13
  - advanced_table_table_options: Table Options
13
14
  - advanced_table_table_props: Table Props
14
15
  - advanced_table_inline_row_loading: inline Row Loading
15
-
@@ -1 +1,2 @@
1
- See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
1
+ The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
+ It's important to note that certain options may require specific script imports to function properly.
@@ -15,7 +15,7 @@
15
15
  data: [1111,677,3245,500,200]
16
16
  }] %>
17
17
 
18
- <% custom_options = {
18
+ <% bar_graph_options = {
19
19
  customOptions: {
20
20
  subtitle: {
21
21
  text: "Overwritten subtitle",
@@ -45,5 +45,5 @@
45
45
  y_axis_min: 0,
46
46
  subtitle: 'Subtitle to replace',
47
47
  title: 'Bar Graph with Custom Overrides',
48
- custom_options: custom_options
49
- }) %>
48
+ custom_options: bar_graph_options
49
+ }) %>
@@ -0,0 +1,2 @@
1
+ The `custom_options` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
+ It's important to note that certain options may require specific script imports to function properly.
@@ -8,7 +8,7 @@ examples:
8
8
  - bar_graph_height: Height
9
9
  - bar_graph_spline: Spline
10
10
  - bar_graph_colors: Color Overrides
11
- - bar_graph_custom: Custom Overrides
11
+ - bar_graph_custom_rails: Custom Overrides
12
12
  - bar_graph_stacked: Stacked
13
13
  - bar_graph_negative_numbers: Negative Numbers
14
14
  - bar_graph_secondary_y_axis: Secondary Y-Axis
@@ -0,0 +1,53 @@
1
+ import React, { useState } from "react";
2
+ import { SelectableList, Draggable, DraggableProvider } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ text: "Task 1",
9
+ },
10
+ {
11
+ id: "2",
12
+ text: "Task 2",
13
+ },
14
+ {
15
+ id: "3",
16
+ text: "Task 3",
17
+ },
18
+ {
19
+ id: "4",
20
+ text: "Task 4",
21
+ },
22
+ ];
23
+
24
+ const DraggableDefault = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+ return (
28
+ <>
29
+ <DraggableProvider initialItems={data}
30
+ onChange={(items) => setInitialState(items)}
31
+ >
32
+ <Draggable.Container {...props}>
33
+ <SelectableList variant="checkbox">
34
+ {initialState.map(({ id, text }) => (
35
+ <Draggable.Item id={id}
36
+ key={id}
37
+ >
38
+ <SelectableList.Item
39
+ label={text}
40
+ name={id}
41
+ value={id}
42
+ />
43
+ </Draggable.Item>
44
+ ))}
45
+ </SelectableList>
46
+ </Draggable.Container>
47
+ </DraggableProvider>
48
+ </>
49
+
50
+ );
51
+ };
52
+
53
+ export default DraggableDefault;
@@ -0,0 +1,4 @@
1
+ To use the Draggable kit, you must use the DraggableProvider and pass in `initialItems`. The `onChange` is a function that returns the data as it changes as items are reordered. Use this to manage state as shown.
2
+
3
+ The `Draggable.Container` specifies the container within which items can be dropped.
4
+ The `Draggable.Item` specifies the items that can be dragged and dropped. `Draggable.Item` requires `id` to be passed in as shown.
@@ -0,0 +1,158 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Caption,
5
+ Card,
6
+ FlexItem,
7
+ Badge,
8
+ Avatar,
9
+ Title,
10
+ Body,
11
+ Draggable,
12
+ DraggableProvider,
13
+ } from "../../";
14
+
15
+ // Initial groups to drag between
16
+ const containers = ["To Do", "In Progress", "Done"];
17
+
18
+ // Initial items to be dragged
19
+ const data = [
20
+ {
21
+ id: "1",
22
+ container: "To Do",
23
+ title: "Task 1",
24
+ description: "Bug fixes",
25
+ assignee_name: "Terry Miles",
26
+ assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
27
+ },
28
+ {
29
+ id: "2",
30
+ container: "To Do",
31
+ title: "Task 2",
32
+ description: "Documentation",
33
+ assignee_name: "Sophia Miles",
34
+ assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
35
+ },
36
+ {
37
+ id: "3",
38
+ container: "In Progress",
39
+ title: "Task 3",
40
+ description: "Add a variant",
41
+ assignee_name: "Alice Jones",
42
+ assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
43
+ },
44
+ {
45
+ id: "4",
46
+ container: "To Do",
47
+ title: "Task 4",
48
+ description: "Add jest tests",
49
+ assignee_name: "Mike James",
50
+ assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
51
+ },
52
+ {
53
+ id: "5",
54
+ container: "Done",
55
+ title: "Task 5",
56
+ description: "Alpha testing",
57
+ assignee_name: "James Guy",
58
+ assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
59
+ },
60
+ {
61
+ id: "6",
62
+ container: "In Progress",
63
+ title: "Task 6",
64
+ description: "Release",
65
+ assignee_name: "Sally Jones",
66
+ assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
67
+ },
68
+ ];
69
+
70
+ const DraggableMultipleContainer = (props) => {
71
+ const [initialState, setInitialState] = useState(data);
72
+
73
+ const badgeProperties = (container) => {
74
+ switch (container) {
75
+ case "To Do":
76
+ return { text: "queue", color: "warning" };
77
+ case "In Progress":
78
+ return { text: "progress", color: "primary" };
79
+ default:
80
+ return { text: "done", color: "success" };
81
+ }
82
+ };
83
+
84
+ return (
85
+ <DraggableProvider initialItems={data}
86
+ onChange={(items) => setInitialState(items)}
87
+ >
88
+ <Flex
89
+ justifyContent="center"
90
+ {...props}
91
+ >
92
+ {containers?.map((container) => (
93
+ <Draggable.Container
94
+ container={container}
95
+ key={container}
96
+ padding="sm"
97
+ >
98
+ <Caption textAlign="center">{container}</Caption>
99
+ <Flex
100
+ alignItems="stretch"
101
+ orientation="column"
102
+ >
103
+ {initialState
104
+ .filter((item) => item.container === container)
105
+ .map(
106
+ ({
107
+ assignee_img,
108
+ assignee_name,
109
+ description,
110
+ id,
111
+ title,
112
+ }) => (
113
+ <Draggable.Item
114
+ container={container}
115
+ id={id}
116
+ key={id}
117
+ >
118
+ <Card
119
+ marginBottom="sm"
120
+ padding="sm"
121
+ >
122
+ <Flex justify="between">
123
+ <FlexItem>
124
+ <Flex>
125
+ <Avatar
126
+ imageUrl={assignee_img}
127
+ name={assignee_name}
128
+ size="xxs"
129
+ />
130
+ <Title paddingLeft="xs"
131
+ size={4}
132
+ text={title}
133
+ />
134
+ </Flex>
135
+ </FlexItem>
136
+ <Badge
137
+ marginLeft="sm"
138
+ rounded
139
+ text={badgeProperties(container).text}
140
+ variant={badgeProperties(container).color}
141
+ />
142
+ </Flex>
143
+ <Body paddingTop="xs"
144
+ text={description}
145
+ />
146
+ </Card>
147
+ </Draggable.Item>
148
+ )
149
+ )}
150
+ </Flex>
151
+ </Draggable.Container>
152
+ ))}
153
+ </Flex>
154
+ </DraggableProvider>
155
+ );
156
+ };
157
+
158
+ export default DraggableMultipleContainer;
@@ -0,0 +1,119 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Badge,
5
+ Title,
6
+ Icon,
7
+ Draggable,
8
+ DraggableProvider,
9
+ Card,
10
+ Caption,
11
+ } from "../../";
12
+
13
+ // Initial items to be dragged
14
+ const data = [
15
+ {
16
+ id: "1",
17
+ text: "Joe Black",
18
+ },
19
+ {
20
+ id: "2",
21
+ text: "Nancy White",
22
+ },
23
+ {
24
+ id: "3",
25
+ text: "Bill Green",
26
+ },
27
+ ];
28
+
29
+ const DraggableWithCards = (props) => {
30
+ const [initialState, setInitialState] = useState(data);
31
+
32
+ return (
33
+ <DraggableProvider
34
+ initialItems={data}
35
+ onChange={(items) => setInitialState(items)}
36
+ >
37
+ <Draggable.Container {...props}>
38
+ {initialState.map(({ id, text }) => (
39
+ <Draggable.Item id={id}
40
+ key={id}
41
+ >
42
+ <Card
43
+ highlight={{ position: "side", color: "primary" }}
44
+ marginBottom="xs"
45
+ >
46
+ <Flex alignItems="stretch"
47
+ flexDirection="column"
48
+ >
49
+ <Flex gap="xs">
50
+ <Title size={4}
51
+ text={text}
52
+ />
53
+ <Badge
54
+ text="35-12345"
55
+ variant="primary"
56
+ />
57
+ </Flex>
58
+
59
+ <Flex
60
+ gap="sm"
61
+ spacing="between"
62
+ >
63
+ <Caption
64
+ size="xs"
65
+ text="8:00A"
66
+ />
67
+ <Flex gap="xxs">
68
+ <Caption
69
+ size="xs"
70
+ text="Township Name"
71
+ />
72
+ <Caption size="xs"
73
+ text="•"
74
+ />
75
+ <Caption size="xs"
76
+ text="90210"
77
+ />
78
+ </Flex>
79
+ </Flex>
80
+
81
+ <Flex gap="xxs"
82
+ spacing="between"
83
+ >
84
+ <Flex gap="xxs">
85
+ <Caption color="error"
86
+ size="xs"
87
+ >
88
+ <Icon icon="house-circle-exclamation" />
89
+ </Caption>
90
+ <Caption color="success"
91
+ size="xs">
92
+ <Icon icon="file-circle-check" />
93
+ </Caption>
94
+ </Flex>
95
+ <Flex>
96
+ <Badge rounded
97
+ text="Schedule QA"
98
+ variant="warning"
99
+ />
100
+ <Badge rounded
101
+ text="Flex"
102
+ variant="primary"
103
+ />
104
+ <Badge rounded
105
+ text="R99"
106
+ variant="primary"
107
+ />
108
+ </Flex>
109
+ </Flex>
110
+ </Flex>
111
+ </Card>
112
+ </Draggable.Item>
113
+ ))}
114
+ </Draggable.Container>
115
+ </DraggableProvider>
116
+ );
117
+ };
118
+
119
+ export default DraggableWithCards;
@@ -0,0 +1,50 @@
1
+ import React, { useState } from "react";
2
+ import { DraggableProvider, List, ListItem } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ text: "Philadelphia",
9
+ },
10
+ {
11
+ id: "2",
12
+ text: "New Jersey",
13
+ },
14
+ {
15
+ id: "3",
16
+ text: "Maryland",
17
+ },
18
+ {
19
+ id: "4",
20
+ text: "Connecticut",
21
+ },
22
+ ];
23
+
24
+ const DraggableWithList = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+
28
+ return (
29
+ <>
30
+ <DraggableProvider initialItems={data}
31
+ onChange={(items) => setInitialState(items)}
32
+ >
33
+ <List draggable
34
+ {...props}
35
+ >
36
+ {initialState.map(({ id, text }) => (
37
+ <ListItem id={id}
38
+ key={id}
39
+ >
40
+ {text}
41
+ </ListItem>
42
+ ))}
43
+ </List>
44
+ </DraggableProvider>
45
+ </>
46
+
47
+ );
48
+ };
49
+
50
+ export default DraggableWithList;
@@ -0,0 +1 @@
1
+ For a simplified version of the Draggable API fro the List kit, use the DraggableProvider to wrap the List use the `draggable` prop on List. The dev must manage state as shown and pass in id to the ListItem.
@@ -0,0 +1,51 @@
1
+ import React, { useState } from "react";
2
+ import { SelectableList, DraggableProvider } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ text: "Task 1",
9
+ },
10
+ {
11
+ id: "2",
12
+ text: "Task 2",
13
+ },
14
+ {
15
+ id: "3",
16
+ text: "Task 3",
17
+ },
18
+ {
19
+ id: "4",
20
+ text: "Task 4",
21
+ },
22
+ ];
23
+
24
+ const DraggableWithSelectableList = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+ return (
28
+ <>
29
+ <DraggableProvider initialItems={data}
30
+ onChange={(items) => setInitialState(items)}
31
+ >
32
+ <SelectableList draggable
33
+ variant="checkbox"
34
+ {...props}
35
+ >
36
+ {initialState.map(({ id, text }) => (
37
+ <SelectableList.Item id={id}
38
+ key={id}
39
+ label={text}
40
+ name={id}
41
+ value={id}
42
+ />
43
+ ))}
44
+ </SelectableList>
45
+ </DraggableProvider>
46
+ </>
47
+
48
+ );
49
+ };
50
+
51
+ export default DraggableWithSelectableList
@@ -0,0 +1,11 @@
1
+ examples:
2
+
3
+
4
+ react:
5
+ - draggable_default: Default
6
+ - draggable_with_list: Draggable with List Kit
7
+ - draggable_with_selectable_list: Draggable with SelectableList Kit
8
+ - draggable_with_cards: Draggable with Cards
9
+ - draggable_multiple_containers: Dragging Across Multiple Containers
10
+
11
+
@@ -0,0 +1,5 @@
1
+ export { default as DraggableDefault } from './_draggable_default.jsx'
2
+ export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
+ export { default as DraggableWithList } from './_draggable_with_list.jsx'
4
+ export { default as DraggableWithSelectableList } from './_draggable_with_selectable_list.jsx'
5
+ export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
@@ -13,6 +13,15 @@
13
13
  ]
14
14
  %>
15
15
 
16
+ <%
17
+ example_dropdown_options = [
18
+ { label: 'United States', value: 'United States', id: 'us' },
19
+ { label: 'Canada', value: 'Canada', id: 'ca' },
20
+ { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
21
+ ]
22
+
23
+ %>
24
+
16
25
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
17
26
  <%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
18
27
  <%= form.text_field :example_text_field, props: { label: true } %>
@@ -23,6 +32,7 @@
23
32
  <%= form.password_field :example_password_field, props: { label: true } %>
24
33
  <%= form.url_field :example_url_field, props: { label: true } %>
25
34
  <%= form.text_area :example_text_area, props: { label: true } %>
35
+ <%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options } %>
26
36
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true } %>
27
37
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
28
38
  <%= form.check_box :example_checkbox,
@@ -1 +1 @@
1
- A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color here: https://playbook.powerapp.cloud/utilities
1
+ A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.