playbook_ui_docs 12.37.0.pre.alpha.PLAYaddingdatapropselectkit1071 → 12.38.0.pre.alpha.PBNTR78selectkitmultipleprop1094
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_select/docs/{_select_data_attributes.html.erb → _select_attributes.html.erb} +3 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.html.erb +36 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.jsx +50 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.md +1 -0
- data/app/pb_kits/playbook/pb_select/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
- data/dist/playbook-doc.js +4 -4
- metadata +7 -4
- /data/app/pb_kits/playbook/pb_select/docs/{_select_data_attributes.md → _select_attributes.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f12c91c026a23ed3fa8df39512011d79eb4807bfb313e0e1db224123042589ea
|
|
4
|
+
data.tar.gz: 8ba1588e199adbb9de6e86683473fded972a444d66096caa43c4585bb30004a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 773c2337e6335e5c4798b1e01e40539e055acba614f074d9105c5a298f0a5c50e2e83aa3f20a2787d616c547cc85013409608d854e2ffeca51910d6cf6e29a49
|
|
7
|
+
data.tar.gz: 864e07f65b4ea5faa0ab48362381d1a14e1417c377c0b1b182c90056d300c54f30e49acae16a9f29413a294342cd47939ec6caac5b3df3c6f52b457a56c498c7
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<%= pb_rails("select", props: {
|
|
2
|
+
label: "Favorite Food",
|
|
3
|
+
name: "food",
|
|
4
|
+
multiple: true,
|
|
5
|
+
options: [
|
|
6
|
+
{
|
|
7
|
+
value: "1",
|
|
8
|
+
value_text: "Burgers",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: "2",
|
|
12
|
+
selected: true,
|
|
13
|
+
value_text: "Pizza",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: "3",
|
|
17
|
+
value_text: "Tacos",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: "4",
|
|
21
|
+
value_text: "BBQ",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: "4",
|
|
25
|
+
value_text: "Sushi",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "4",
|
|
29
|
+
value_text: "Chinese",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "4",
|
|
33
|
+
value_text: "Hot Dogs",
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
}) %>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import Select from '../_select'
|
|
4
|
+
|
|
5
|
+
const SelectMultiple = (props) => {
|
|
6
|
+
const options = [
|
|
7
|
+
{
|
|
8
|
+
value: '1',
|
|
9
|
+
text: 'Burgers',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
value: '2',
|
|
13
|
+
text: 'Pizza',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: '3',
|
|
17
|
+
text: 'Tacos',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: '3',
|
|
21
|
+
text: 'BBQ',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: '3',
|
|
25
|
+
text: 'Sushi',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: '3',
|
|
29
|
+
text: 'Chinese',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: '3',
|
|
33
|
+
text: 'Hot Dogs',
|
|
34
|
+
},
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div>
|
|
39
|
+
<Select
|
|
40
|
+
label="Favorite Food"
|
|
41
|
+
multiple
|
|
42
|
+
name="food"
|
|
43
|
+
options={options}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default SelectMultiple
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
We recommend using a typeahead for better UX
|
|
@@ -11,7 +11,8 @@ examples:
|
|
|
11
11
|
- select_error: Select w/ Error
|
|
12
12
|
- select_inline: Select Inline
|
|
13
13
|
- select_inline_compact: Select Inline Compact
|
|
14
|
-
-
|
|
14
|
+
- select_attributes: Select W/ Attributes
|
|
15
|
+
- select_multiple: Select Multiple
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
|
|
@@ -26,3 +27,4 @@ examples:
|
|
|
26
27
|
- select_error: Select w/ Error
|
|
27
28
|
- select_inline: Select Inline
|
|
28
29
|
- select_inline_compact: Select Inline Compact
|
|
30
|
+
- select_multiple: Select Multiple
|
|
@@ -8,3 +8,4 @@ export { default as SelectValueTextSame } from './_select_value_text_same.jsx'
|
|
|
8
8
|
export { default as SelectError } from './_select_error.jsx'
|
|
9
9
|
export { default as SelectInline } from './_select_inline.jsx'
|
|
10
10
|
export { default as SelectInlineCompact } from './_select_inline_compact.jsx'
|
|
11
|
+
export { default as SelectMultiple } from './_select_multiple.jsx'
|